Strip other people's music before upload with Demucs and ffmpeg

Car radio, shop speakers and festival stages trigger Content ID. Split the soundtrack into stems, find the music on drums plus bass, keep the voice, replace the music, rebuild audio only.

ffmpegClaude CodeBy handYouTubeadvanced30 minunverified
# 1. Soundtrack out of the film
ffmpeg -i film.mp4 -vn -ac 2 -ar 44100 film_audio.wav

# 2. Four stems on the Apple GPU (drop -d mps for CUDA or CPU)
demucs -d mps -o stems film_audio.wav
# no install: uvx --with numpy --from demucs demucs -d mps -o stems film_audio.wav
# output: stems/htdemucs/film_audio/vocals.wav drums.wav bass.wav other.wav

# 3. Find the music: threshold the RMS of drums+bass per second, merge windows closer than a few seconds, print the window map before changing anything (dry run).

# 4. Inside each window: the whole vocals stem + your score. Outside the windows: the original audio, sample for sample.

# 5. Rebuild audio only, video copied
ffmpeg -i film.mp4 -i clean_audio.wav -map 0:v -map 1:a -c:v copy -c:a aac film.clean.mp4

In Claude Code, paste the prompt as a message, or run /stem-split which does this end to end.

Steps

  1. Run the dry run and read the window map against the film: a window that starts mid-sentence means the threshold is too low.
  2. Inside the windows keep the whole vocals stem, not the parts the subtitles cover: STT misses exclamations, and 31 s of loud speech lived outside the subtitles on one film.
  3. Upload, then compare the platform's claimed time codes with your windows. Its claims are a check, not the map: Content ID sees a subset.

Example

Measured on one episode: 10 claims, about 4 minutes of songs, four of the claims blocking the video in two countries that were 21% of the channel’s audience. A claim is not a strike, but you do not choose the block.

Tips

  • Detect on drums + bass, not on the no-vocals stem. Demucs puts the engine, wind and city into `other`, and road noise is louder than the radio almost everywhere.
  • The singer's ghost stays in the vocals stem 5-10 dB under the speaker. It disappears under a new score; it does not disappear on its own.
  • Speed, measured on one Apple Silicon Mac: 60 s of a song took 8.3 s with `-d mps` and 15.7 s on CPU, so budget roughly 3-4 minutes per 20 minutes of audio. Without `-d mps` Demucs does not pick the Apple GPU.
  • Already published and the claim restricts nothing: leave it. Re-upload only for a block or lost monetisation; the platform's own 'erase song' takes days and cuts the whole segment, speech included.
  • In Claude Code, `/solo-stem-split` runs Demucs and `/solo-video-edit` does the detection, the replacement and the rebuild.

Read more

works withffmpeg: A terminal command you run yourself. · Claude Code: Runs as a skill or a prompt in the terminal; can read your files and write the result. · By hand: No tool needed: a checklist or a technique.
skillnpx skills add fortunto2/solo-factory --skill solo-stem-split · skill page · source
costFree. No API, no key.
statusUnverified: written from the technique, not yet run end to end by us.
licenseCC BY 4.0 for the text here; skills are MIT.
updated2026-11-10
for agentsstrip-other-peoples-music-demucs.md
#demucs#stems#content-id#copyright#ffmpeg#stem-split

Related

Music & sound beginner

Level every chapter to -16 LUFS with ffmpeg loudnorm

One ffmpeg line that brings a file to -16 LUFS integrated and -1.5 dBTP true peak without touching the video, the two-pass version for exact results, and the timestamp trap on upload.

ffmpeg
Music & sound intermediate

Voice cleanup checklist: room tone, de-ess, noise gate, in that order

Six passes that turn a phone or lav recording into a usable voice track, each with the ffmpeg filter and a starting parameter to adjust by ear, in the order that keeps the gate off word endings.

ffmpegCapCut / any editorBy hand
Music & sound advanced

Tear down a reference track by numbers: tempo, key, groove, balance

The agent reads a spectrogram instead of listening, splits stems with Demucs, fits tempo and phase to the kick, and rebuilds the vibe until the numbers match the reference.

Claude Code
Music & sound advanced

Mashups and ciphers with a beat grid: sdsp-mash

Pick pairs by BPM and key, split stems, stretch only the beat, and render one beat with verses from other songs, or a beat switch per verse, from a TOML file.

Claude Code
Skills & tools intermediate

Separate vocals, music and drums from a recording (/solo-stem-split)

Separate a song or a film's soundtrack into stems (vocals, drums, bass, other) with Demucs, locally, on the Apple GPU when there is one.

Claude Code
Music & sound intermediate

Live music in frame: one continuous audio span, picture cuts on top

When a band or a busker is in the shot, keep one unbroken stretch of that clip's audio under the whole scene and cut only the picture; cut the audio per shot and the beat restarts.

ffmpegCapCut / any editorClaude Code