Table of Contents

ffmpeg - Decoding - Extract a specific stream

Check what streams exist

ffmpeg -i inputfile

returns:

Stream #0:0: Video: hevc .....
Stream #0:1(eng): Audio: aac ....
Stream #0:2(eng): Subtitle: ...
Stream #0:3(fre): Audio: aac ....
Stream #0:4(fre): Subtitle: aac ....

Extract a specific stream

ffmpeg -i inputfile.mkv -map 0:3 french-audio.mp3

NOTE: This extracts the 3rd stream.

  • Which, from the sample streams, would be the French audio.