
ffmpeg -i input.mov -map 0:a:0 output0.wav -map 0:a:1 output1.wav -map 0:a:2 output2.wav -map 0:a:3 output3.wav Each audio stream will be output as single, individual files. This input in this example has 4 audio streams. Various examples: ffmpeg -i input.mp4 -map 0:a output.mp3įfmpeg -i input.avi -map 0:a -c:a aac output.mka Similar to the examples above, but without -c copy. -map 0:a:3 selects audio stream #4 only ( ffmpeg starts counting from 0).Įxtract and re-encode audio / change format.See comparison of container formats.Įxample to extract audio stream #4: ffmpeg -i input.mkv -map 0:a:3 -c copy output.m4a Choose an output format that supports your audio format.Remove -c copy if you want the audio to be re-encoded. This copies the audio and does not re-encode it.


#Audio extractor online movie#
To encode a high quality MP3 or MP4 audio from a movie file (eg AVI, MP4, MOV, etc) or audio file (eg WAV), I find it's best to use -q:a 0 for variable bit rate and it's good practice to specify -map a to exclude video/subtitles and only grab audio: ffmpeg -i sample.avi -q:a 0 -map a sample.mp3
