show subtitles list, get id and name of each subtitles track

Example

ffprobe command to list the stream ID and language:

ffprobe -loglevel error -select_streams s -show_entries stream=index:stream_tags=language -of csv=p=0 input.mkv

Result

5,eng
6,fao
7,ain

This shows the stream id #5 is English, #6 is Faroese, and #7 is Ainu. See List of ISO 639 codes (refer to 639-2/T or 639-2/B) for the language abbreviations.

-map option

You can use this information to create your command. If you want the English and Ainu languages use:

-map 0:5 -map 0:7

or

-map 0:s:0 -map 0:s:2

or

-map 0:s:m:language:eng -map 0:s:m:language:ain

See the -map option documentation for more info.

Tags:

Ffmpeg