Skip to content

Instantly share code, notes, and snippets.

@Integralist
Created June 26, 2024 15:28
Show Gist options
  • Save Integralist/d076e8108f216c109d14a349e65ce490 to your computer and use it in GitHub Desktop.
Save Integralist/d076e8108f216c109d14a349e65ce490 to your computer and use it in GitHub Desktop.
Separate the musical instruments from a song and make an instrumental

Download the demucs app:
https://github.com/CarlGao4/Demucs-Gui/releases

Open the app and press "Load".

Click on the "File queue" tab.

Drag and drop your mp3 file into the app window.

Click on "Start separation".

Once finished, you'll find a folder in the same directory as your mp3 file.

This folder will contain separate .flac music files for the vocals, drums, guitar, bass etc.

You can then recombine the song, omitting the vocals, using the following terminal command:

brew install ffmpeg
ffmpeg -i other.flac -i bass.flac -i drums.flac -filter_complex "[0:a][1:a][2:a]amerge=inputs=3[aout]" -map "[aout]" -ac 2 -c:a libmp3lame instrumental.mp3

Note

Replace/update the -i other.flac, -i bass.flac etc, depending on what parts you want put back together.

The ffmpeg command will generate an instrumental.mp3 file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment