Extract Audio from a Video with ffmpeg (No Re-encode)
Save a video's audio track to its own file instantly by stream-copying instead of re-encoding.
Run ffmpeg -i video.mp4 -vn -acodec copy audio.m4a to dump the audio stream untouched into audio.m4a.
01Command
Command
$ ffmpeg -i video.mp4 -vn -acodec copy audio.m4a02What it does
-vn tells ffmpeg to drop the video stream and -acodec copy copies the audio bytes as-is, so the extraction takes seconds and loses zero quality. The output extension should match the source codec — .m4a for AAC (as in most MP4 files), .opus for WebM/Opus, .mp3 for MP3. If you need a different format, replace copy with an encoder, e.g. -acodec libmp3lame -b:a 192k, which re-encodes.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- ffmpeg(1) — Ubuntu manpageEvidence: Ubuntu manpage documents ffmpeg's -vn (disable video) and -acodec copy (stream copy audio codec) options
- ffmpeg(1) — Debian manpageEvidence: Debian manpage describes -vn disabling video recording and -acodec copy for codec stream copy
Last verified: 2026-09-19 · Category: Media