axeldelafosse / stemgen

🎛 Stemgen is a Stem file generator. Convert any track into a Stem and have fun with Traktor.
https://stemgen.dev
MIT License
212 stars 39 forks source link

Bug: Incorrect handling of sampling rate of input file #3

Closed CorgiMan closed 3 years ago

CorgiMan commented 4 years ago

I change the stemgen file so that I can convert mp3 files. When doing so I found out that the stems created are sped up due to the sample rate of my input mp3 being higher than 44100. (I'm surprised that it doesn't cause a slowdown instead tbh).

Not sure if other formats have the same issue so didn't want to put up a pull request before figuring that out.

Solution for me was quite simple: Convert files with ffmped with -ar 44100 flag to convert the input file correctly.

axeldelafosse commented 3 years ago

Had the same issue with .opus files with a sample rate of 48,000 Hz. Fixed with https://github.com/axeldelafosse/stemgen/commit/3bdf45e81dd935907aed59a1f220577f2082e6c9. Thank you!

I don't recommend using .mp3 though so it is still "unsupported".