如何指定多个流说明符元数据标签键?
例如,这会将视频从输入复制到输出,并且只选择那些英文音轨(有两个,一个是单声道,另一个是立体声):
ffmpeg -i "s1950e15 What's up Doc.mkv" -map 0:a:m:language:eng -map 0:v -c:v copy test.mkv
同样,这会将视频从 intut 复制到输出,并且只选择那些单声道的音轨(有两个,一个是英语,一个是法语):
ffmpeg -i "s1950e15 What's up Doc.mkv" -map 0:a:m:title:Mono -map 0:v -c:v copy test.mkv
但是如何选择英语和单声道的音轨?
如果有效(无效),这就是我想要做的:
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
我已经尝试了上述和各种组合,但都没有用。
这是 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
目前,ffmpeg 只检查指定的第一个元数据值。我会把它放在我的 ToDo 上以允许更多的键。