Search code examples
videoffmpegmute

How to cut a Video and mute it in one step with FFmpeg?


I tried this:

 "ffmpeg -i input.mp4 -ss 00:00:50.0 -vcodec copy -an -t 20 output.mp4"

Because I know this is for cutting a s

 "ffmpeg -i input.mp4 -ss 00:00:50.0 -codec copy -t 20 output.mp4"

And I know this is for muting (deleting the all the sound from the video):

 "ffmpeg -i input.mp4 -ss 00:00:50.0 -vcodec copy -an -t 20 output.mp4"

from here: https://unix.stackexchange.com/a/33864

It doesnt work. naturally. otherwise I wouldnt ask here.

Who knows the answer? thx


Solution

  • This does the work:

    "ffmpeg -i 'input.mp4' -ss 30 -c copy -an -t 10 '"soundlessOutput.mp4'"