262
57
How can I strip the audio track out of a video file with FFmpeg?
262
57
How can I strip the audio track out of a video file with FFmpeg?
370
You remove audio by using the -an
flag.
ffmpeg -i example.mkv -c copy -an example-nosound.mkv
Full ffmpeg documentation here.
103
You probably don't want to reencode the video (a slow and lossy process), so try:
ffmpeg -i [input_file] -vcodec copy -an [output_file]
(n.b. some Linux distributions now come with the avconv fork of ffmpeg)
1This didn't make any difference to me compared to the accepted solution. – nidi – 2017-12-29T00:49:09.040
2vcodec is an alias for -c:v
, so specifically it'd copy the video stream only. The only data you're preventing with this would be subtitles, metadata, etc from what I can see. – Rogue – 2018-03-08T15:48:27.777
In other words, this solution can conceivably lose more information than the accepted solution. – Alex – 2020-02-25T15:12:21.050
9
avconv -i [input_file] -vcodec copy -an [output_file]
If you cannot install ffmpeg
because of existing of avconv
try that .
I'm a
bash
andffmpeg
newbie but I put this answer together with some other pieces to createfunction ffsilent { ffmpeg -i $1 -c copy -an "$1-nosound.${1#*.}" }
which you can use in your profile to quickly create a silent version of any video file. – Aaron – 2019-12-16T15:18:09.607