Chris Were's website

How to extract audio from a video file

This command extracts the audio from a video file and puts it in a MP3 file. This tutorial is designed for use on the command line for most of the mainstream Linux distributions, not for Windows or Mac systems. Ffmpeg automatically works out the right codecs to use from the output file extention, in this case it's MP3.

ffmpeg -i VIDEOFILE OUTPUTFILE.mp3

In this example it's Opus.

ffmpeg -i VIDEOFILE -vn OUTPUTFILE.opus

If you wish to do the same with ann Ogg file, you have to specify that you want audio only, you can do this with the -vn argument.

ffmpeg -i VIDEOFILE -vn OUTPUTFILE.ogg