Remove part of video only using command line (probably FFMPEG)

I have a 4 hour long .mp4 file and when I upload it to Youtube the entire audio track gets muted because of 30 seconds of some song between 01:21:47 and 01:22:24, how can I remove JUST this part of the video, or even better - just THIS part of the audio from the video?


Solution 1:

If you are sure it's just that portion of the audio, then you can just mute it:

ffmpeg -i input.mp4 -af volume=0:enable='between(t,01:21:47,01:22:24)' -c:v copy output.mp4

Depending on your shell, you may have to escape the colons in the timecodes, or maybe switch to seconds representation (01:21:47 = 4907, 01:22:24 = 4944).