stemrollerapp / stemroller

Isolate vocals, drums, bass, and other instrumental stems from any song
https://www.stemroller.com
Other
2.65k stars 109 forks source link

keeping the original song file #67

Closed wc2184 closed 3 months ago

wc2184 commented 4 months ago

Since we're fetching the audio from youtube-dl, I just wanted to keep the original song as well, but currently you just run demucs and delete the original song file.

I simply copy the original song ('yt-audio) (from the temp directory) to the output directory, rename it to original, call ffmpeg on it to convert it to .wav (or mp3 depending on your preferences) with a sample rate of 44.1k which the same sample rate of the stems of demucs

tldr; add the original song to the output folder, convert it to wav/mp3

.wav

CleanShot 2024-07-05 at 15 14 35@2x

.mp3

CleanShot 2024-07-05 at 15 13 51@2x

wc2184 commented 4 months ago

Would you like to put this as a toggle instead of default? It does increase the time of processing by quite a bit, let me know if you would like for me to add it as a checkbox in the Preferences setting and leave it unticked it by default.

Something like this (this feature is not added in the PR, just my mockup):

CleanShot 2024-07-05 at 15 12 06@2x

iffyloop commented 4 months ago

@wc2184 Thanks for the PR! Sorry for my delayed reply, I'm actually looking into developing a new major version of StemRoller so the current (2.x) series is kind of in bugfix-only mode right now. I'd like to add this feature, but why does it increase the processing time by quite a bit? I think audio format conversion is usually pretty fast compared to the stem separation process. Do you need the file-type module? I thought ffmpeg could detect filetype automatically but I may be wrong.

iffyloop commented 3 months ago

This is now implemented in #75! Thank you for your suggestion and for creating this PR! Unfortunately I needed to change a few things to integrate it with the other updates today, so wasn't able to merge it in directly, but really appreciate your contribution!