
FFmpeg: How to Extract Audio from Any Video
Updated
Learn how to quickly extract audio from any video file using FFmpeg.

First, open your terminal and navigate to the folder where your video file is located. To pull the audio out of your video, type this command and press Enter:
ffmpeg -i video-file.mp4 audio-file.mp3
Here, the -i flag specifies your input video file, and the second filename is the audio file you want to create.
Depending on the length of your video, FFmpeg will take a few seconds to process, and you will see text scrolling through your terminal while it works.
Once it finishes and returns to your prompt, you can quickly verify your new file by running ls to confirm that audio-file.mp3 is listed in your directory.
As a quick tip, you aren't limited to MP3. You can change .mp3 to .opus, .wav, or .aac right in the command to extract the audio into whatever format you need.
Thanks for watching, and happy editing!
