When dealing with files which contain multiple unnamed subtitle (or audio) tracks, the best_track function will not return anything and the ffmpeg will use -s (or -a) as map parameter. According to the ffmpeg docs this will select all suitable streams. This causes the subtitle extract to fail with the error below
[srt @ 0x558672431600] SRT supports only a single subtitles stream.
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:1 --
When dealing with files which contain multiple unnamed subtitle (or audio) tracks, the
best_track
function will not return anything and the ffmpeg will use-s
(or-a
) as map parameter. According to the ffmpeg docs this will select all suitable streams. This causes the subtitle extract to fail with the error below