10/15/2025

Learn to extract audio from video with a single FFmpeg command. This guide shows you how to easily convert MP4 to MP3 and control the audio quality and bitrate.

How to Extract Audio from Video Using FFmpeg (MP4 to MP3)

Ever wanted to convert a video lecture into an audio file to listen to on your commute? Or maybe save the song from a music video as an MP3? With FFmpeg, you don't need any complex software—just a single command line to extract audio perfectly.

🚀 Quick Path: The FFmpeg Command

To extract the full audio track from a video file (e.g., lecture.mp4) and save it as an MP3, use this command:

ffmpeg -i lecture.mp4 -vn audio.mp3

After running this, you will get a file named audio.mp3 containing only the sound from the original video.

🧠 The Breakdown: What Each Parameter Means

The key to this command is the -vn parameter. Let's break it down:

Parameter Explanation Example
ffmpeg The command to start the FFmpeg program. ffmpeg
-i lecture.mp4 -i stands for "input," followed by your source video file. -i music_video.mp4
-vn This is short for "Video No." It tells FFmpeg to completely discard the video stream and not process it. -vn
audio.mp3 The output audio filename. FFmpeg uses the .mp3 extension to automatically apply the MP3 encoder. podcast_episode.mp3

FAQ & Variations

Q: Can I control the quality of the output MP3?

A: Absolutely! You can use the -ab (audio bitrate) parameter to specify the bitrate for the audio. A higher bitrate results in better quality and a larger file. 192k is a great choice for general use, while 320k is often considered standard for high-quality MP3s.

For example, to extract a high-quality 320kbps MP3:

ffmpeg -i music_video.mp4 -vn -ab 320k song.mp3

Q: How can I extract a specific segment of the audio instead of the whole thing?

A: That's just as easy! You can combine the -ss (start time) and -to (to time) or -t (duration) parameters.

For example, to extract only 60 seconds of audio starting from the 10-second mark of the video:

ffmpeg -i video.mp4 -ss 00:00:10 -t 00:01:00 -vn extracted_clip.mp3
  • -ss 00:00:10: Starts the process at 10 seconds in.
  • -t 00:01:00: Sets the duration to 60 seconds.