FFmpeg recipe

FFmpeg: Extract Audio from an MP4 (Lossless)

Stream-copy extracts the audio without decoding/re-encoding. Bit-identical to the source. Container changes from MP4 to whatever the audio codec's native container is.

Command

ffmpeg -i input.mp4 -vn -c:a copy -y output.m4a
Prefer no terminal?
Use the Extract Audio in your browser
Open Extract Audio

What each flag does

-iInput file. Can be a video, audio, or image. Repeat for multiple inputs.
-vnStrip video (no video in output) — useful for audio-only extraction.
-c:aAudio codec for output. e.g. aac, libmp3lame, copy.
-yOverwrite output file without confirmation.

Notes & gotchas

  • Most MP4 audio is AAC, so the output extension is .m4a (AAC in MP4 container).
  • For MP3 output, re-encode with -c:a libmp3lame -b:a 192k -y output.mp3.
  • For WAV output (lossless PCM), use -c:a pcm_s16le -y output.wav.

Related recipes