Como faço para especificar várias chaves de tag de metadados do especificador de stream?
Por exemplo, isso copia o vídeo da entrada para a saída e seleciona apenas as faixas de áudio que estão em inglês (são duas, uma é Mono e a outra é Stereo):
ffmpeg -i "s1950e15 What's up Doc.mkv" -map 0:a:m:language:eng -map 0:v -c:v copy test.mkv
Da mesma forma, isso copia o vídeo do intut para a saída e seleciona apenas as faixas de áudio que são Mono (existem duas, uma em inglês e outra em francês):
ffmpeg -i "s1950e15 What's up Doc.mkv" -map 0:a:m:title:Mono -map 0:v -c:v copy test.mkv
Mas como seleciono a faixa de áudio em inglês e mono?
Isso é o que eu quero fazer, se fosse válido (não é):
ffmpeg -i "s1950e15 What's up Doc.mkv" -map 0:a:m:language:eng:m:title:Mono -map 0:v -c:v copy test.mkv
Eu tentei as combinações acima e várias, nenhuma das quais funcionou.
Aqui está a saída do ffmpeg:
Input #0, matroska,webm, from 's1950e15 What's up Doc.mkv':
Metadata:
encoder : libmakemkv v1.16.7 (1.3.10/1.5.2) win(x64-release)
creation_time : 2022-05-05T00:52:29.000000Z
Duration: 00:07:15.80, start: 0.000000, bitrate: 3853 kb/s
Stream #0:0(eng): Video: mpeg2video (Main), yuv420p(tv, progressive), 720x480 [SAR 8:9 DAR 4:3], 29.97 fps, 29.97 tbr, 1k tbn
Metadata:
BPS-eng : 3070452
DURATION-eng : 00:07:15.802033333
NUMBER_OF_FRAMES-eng: 10449
NUMBER_OF_BYTES-eng: 167263690
SOURCE_ID-eng : 0100E0
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.7 win(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2022-05-05 00:52:29
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Side data:
cpb: bitrate max/min/avg: 7500000/0/0 buffer size: 1835008 vbv_delay: N/A
Stream #0:1(eng): Audio: ac3, 48000 Hz, mono, fltp, 192 kb/s (default)
Metadata:
title : Mono
BPS-eng : 192000
DURATION-eng : 00:07:15.776000000
NUMBER_OF_FRAMES-eng: 13618
NUMBER_OF_BYTES-eng: 10458624
SOURCE_ID-eng : 0180BD
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.7 win(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2022-05-05 00:52:29
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:2(fre): Audio: ac3, 48000 Hz, mono, fltp, 192 kb/s
Metadata:
title : Mono
BPS-eng : 192000
DURATION-eng : 00:07:15.776000000
NUMBER_OF_FRAMES-eng: 13618
NUMBER_OF_BYTES-eng: 10458624
SOURCE_ID-eng : 0181BD
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.7 win(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2022-05-05 00:52:29
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:3(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Metadata:
title : Stereo
BPS-eng : 192000
DURATION-eng : 00:07:15.776000000
NUMBER_OF_FRAMES-eng: 13618
NUMBER_OF_BYTES-eng: 10458624
SOURCE_ID-eng : 0183BD
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.7 win(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2022-05-05 00:52:29
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:4(eng): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Metadata:
title : Stereo
BPS-eng : 192000
DURATION-eng : 00:07:15.776000000
NUMBER_OF_FRAMES-eng: 13618
NUMBER_OF_BYTES-eng: 10458624
SOURCE_ID-eng : 0185BD
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.7 win(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2022-05-05 00:52:29
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:5(eng): Subtitle: dvd_subtitle, 720x480 (default)
Metadata:
BPS-eng : 2609
DURATION-eng : 00:06:17.441033333
NUMBER_OF_FRAMES-eng: 58
NUMBER_OF_BYTES-eng: 123096
SOURCE_ID-eng : 0120BD
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.7 win(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2022-05-05 00:52:29
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:6(fre): Subtitle: dvd_subtitle, 720x480
Metadata:
BPS-eng : 2755
DURATION-eng : 00:06:55.912800000
NUMBER_OF_FRAMES-eng: 62
NUMBER_OF_BYTES-eng: 143280
SOURCE_ID-eng : 0121BD
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.7 win(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2022-05-05 00:52:29
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:7(spa): Subtitle: dvd_subtitle, 720x480
Metadata:
BPS-eng : 2704
DURATION-eng : 00:06:55.912800000
NUMBER_OF_FRAMES-eng: 64
NUMBER_OF_BYTES-eng: 140580
SOURCE_ID-eng : 0122BD
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.7 win(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2022-05-05 00:52:29
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
Stream #0:8(eng): Subtitle: subrip
Metadata:
BPS-eng : 150
DURATION-eng : 00:06:30.488000000
NUMBER_OF_FRAMES-eng: 129
NUMBER_OF_BYTES-eng: 7356
SOURCE_ID-eng : 0100E0
_STATISTICS_WRITING_APP-eng: MakeMKV v1.16.7 win(x64-release)
_STATISTICS_WRITING_DATE_UTC-eng: 2022-05-05 00:52:29
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
No momento, o ffmpeg verifica apenas o primeiro valor de metadados especificado. Vou colocar isso no meu ToDo para permitir mais chaves.