Isso funcionou para mim, N é o índice de legendas começando com 0:
ffmpeg -hide_banner -i myfile.mkv -map 0:s:N subtiles_N.srt
Saída de vídeo:
ffmpeg -i output.mkv
Input #0, matroska,webm, from 'output.mkv':
Metadata:
encoder : libebml v1.3.6 + libmatroska v1.4.9
creation_time : 2018-08-31T06:43:45.000000Z
Duration: 00:42:51.03, start: 0.000000, bitrate: 1928 kb/s
Stream #0:0: Video: h264 (Main), yuv420p(progressive), 960x540 [SAR 1:1 DAR 16:9], Closed Captions, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Usando isso:
"ffmpeg" -f lavfi -i "movie=output.mkv[out0+subcc]" -map s "output_map-s.srt"
Eu posso extrair o (CC), mas com códigos de tempo e tags ímpares.
1 00:00:00,019 --> 00:00:00,051 {\an7}dialogue
2 00:00:00,052 --> 00:00:00,134 {\an7}dialogue
3 00:00:00,135 --> 00:00:00,161 {\an7}dialogue
4 00:00:00,163 --> 00:00:00,178 {\an7}dialogue
5 00:00:00,179 --> 00:00:00,194 {\an7}dialogue
6 00:00:00,220 --> 00:00:00,246 {\an7}dialogue
7 00:00:00,272 --> 00:00:00,296 {\an7}-dialogue
Qual seria a frase correta para extrair o sincronizado (CC).
obrigado.
Isso funcionou para mim, N é o índice de legendas começando com 0:
ffmpeg -hide_banner -i myfile.mkv -map 0:s:N subtiles_N.srt