FFMPEG can remove audio: Here’s how

Last Updated on July 27, 2022 by Dave Farquhar

FFMPEG is a very versatile command line video editing tool. You can use it to do lots of things, and the last time I used it, I used it to convert between formats. But you can also use it to remove audio. Here are two options to use FFMPEG to remove audio, depending on what exactly you want. But most importantly, both options are fast and you won’t lose any quality.

Remove audio with FFMPEG

ffmpeg remove audio
To remove audio with FFMPEG, the key is the -an option with the -c copy option.

To remove audio but leave your subtitles and any metadata that might be there, use this option:

ffmpeg -i sourcefile -c copy -an outputfile

The -an option drops the audio. The -c copy option tells it to copy the video without re-encoding.

This option to remove audio with FFMPEG drops the audio, leaves the metadata, and skips re-encoding, just copying the existing video. This way you don’t lose any quality. It’s also faster. Today’s CPUs can encode very quickly, but you might as well skip re-encoding when you can. There’s no point in losing quality.

Video only with FFMPEG

There’s a second option that isn’t exactly the same as removing audio, but depending on what you’re doing, this option could be preferable. To remove everything but the video, including subtitles and any metadata from the file, use a slightly different option:

ffmpeg -i sourcefile -vcodec copy -an outputfile

The -an option drops the audio. The -c copy option tells it to copy the video without re-encoding. The -vcodec option removes everything but the video.

This option drops all but the video. This can result in a smaller file, but may not be exactly what you were after.

Which option should you use? If you’re not sure, go with the first. But if you don’t need the metadata and you want slightly smaller files, you can go with the second.

FFMPEG can do other cool tricks too, like merging files, for quick command line video editing.

If you found this post informative or helpful, please share it!