How to Extract Audio From a Video With FFmpeg
Pulling just the audio track out of a video file — useful before running a transcription tool, which almost always wants audio-only input.
Pulling just the audio track out of a video file — useful before running a transcription tool, which almost always wants audio-only input.
The command
ffmpeg -i input.mp4 -vn -acodec pcm_s16le -ar 16000 -ac 1 output.wavWhat each flag does
| -vn | Drops the video stream entirely — output is audio-only. |
| -acodec pcm_s16le | Uses uncompressed 16-bit PCM, the format most speech-to-text models expect. |
| -ar 16000 | Resamples to 16kHz — the standard sample rate for speech recognition models like Whisper. |
| -ac 1 | Downmixes to mono — speech transcription doesn't need stereo, and mono halves the file size. |
Where this goes wrong
If you skip -ar 16000 and leave the source's original sample rate (often 44.1kHz or 48kHz), most transcription tools will still work — they resample internally — but you're shipping a needlessly large file for no accuracy benefit.
If you just want a smaller compressed audio file instead
ffmpeg -i input.mp4 -vn -c:a aac -b:a 128k output.m4aUse this version when the audio is the deliverable itself (a podcast clip, a voiceover to reuse) rather than an intermediate file for transcription.
This is the exact first step NULLFRAME's templates run automatically — extracting clean audio, then transcribing it with real word-level timestamps before touching anything visual.
Get the kitCommon questions
Why WAV and not MP3 for transcription?+
Can I extract audio from multiple videos at once?+
-i multiple times with a filter_complex if you need them merged.