我有一个包含这些流的文件
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 45315 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.88 tbc (default)
Metadata:
creation_time : 2017-04-12T19:32:57.000000Z
handler_name : GoPro AVC
encoder : GoPro AVC encoder
timecode : 19:51:39:46
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
creation_time : 2017-04-12T19:32:57.000000Z
handler_name : GoPro AAC
timecode : 19:51:39:46
Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
Metadata:
creation_time : 2017-04-12T19:32:57.000000Z
handler_name : GoPro TCD
timecode : 19:51:39:46
Stream #0:3(eng): Data: none (gpmd / 0x646D7067), 34 kb/s (default)
Metadata:
creation_time : 2017-04-12T19:32:57.000000Z
handler_name : GoPro MET
Stream #0:4(eng): Data: none (fdsc / 0x63736466), 14 kb/s (default)
Metadata:
creation_time : 2017-04-12T19:32:57.000000Z
handler_name : GoPro SOS
并且只想输出 Stream #0:3(eng): Data: none (gpmd / 0x646D7067)
我可以用 -map 0:3 映射它,但有些文件在不同的位置具有相同的 Stream,如下所示:
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 60013 kb/s, 90 fps, 90 tbr, 90k tbn, 180 tbc (default)
Metadata:
creation_time : 2017-04-12T19:32:25.000000Z
handler_name : GoPro AVC
encoder : GoPro AVC encoder
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
creation_time : 2017-04-12T19:32:25.000000Z
handler_name : GoPro AAC
Stream #0:2(eng): Data: none (gpmd / 0x646D7067), 35 kb/s (default)
Metadata:
creation_time : 2017-04-12T19:32:25.000000Z
handler_name : GoPro MET
Stream #0:3(eng): Data: none (fdsc / 0x63736466), 18 kb/s (default)
Metadata:
creation_time : 2017-04-12T19:32:25.000000Z
handler_name : GoPro SOS
如何确保我选择了正确的?我尝试过使用 -map 0:m:handler_name:"GoPro MET" 之类的东西,但我总是遇到错误:
Stream map '0:m:handler_name:GoPro_MET' 不匹配任何流。
请注意,我以前从未使用过 ffmpeg,可能会遗漏一些明显的东西。
谢谢!