我将尝试合并多个文件,这些文件是GoPro Hero6分割电影以避免FAT 4GB限制的结果。ffmpeg非常适合此目的,但我需要编码在元数据流中的遥测数据,而默认情况下,ffmpeg似乎不会保留此数据。使用ffprobe
命令,您可以看到源视频具有:
Stream #0:3(eng): Data: none (gpmd / 0x646D7067), 36 kb/s (default)
Metadata:
creation_time : 2018-07-15T16:16:26.000000Z
handler_name : GoPro MET
我从研究中得知这是我需要的流(虽然我想复制所有流)。但是,当使用 ffmpeg -f concat
时,输出结果如下:
[concat @ 0x7febb9800000] Could not find codec parameters for stream 2 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[concat @ 0x7febb9800000] Could not find codec parameters for stream 3 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[concat @ 0x7febb9800000] Could not find codec parameters for stream 4 (Unknown: none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, concat, from 'tmp.txt':
Duration: N/A, start: 0.000000, bitrate: 66194 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 2704x1520 [SAR 1:1 DAR 169:95], 66005 kb/s, 59.94 fps, 59.94 tbr, 60k tbn, 119.88 tbc
Metadata:
creation_time : 2018-07-15T16:08:22.000000Z
handler_name : GoPro AVC
encoder : GoPro AVC encoder
timecode : 16:23:48:21
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s
Metadata:
creation_time : 2018-07-15T16:08:22.000000Z
handler_name : GoPro AAC
timecode : 16:23:48:21
Stream #0:2: Unknown: none
Stream #0:3: Unknown: none
Stream #0:4: Unknown: none
Output #0, mp4, to 'GH0089.MP4':
Metadata:
encoder : Lavf58.12.100
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709), 2704x1520 [SAR 1:1 DAR 169:95], q=2-31, 66005 kb/s, 0.02 fps, 59.94 tbr, 60k tbn, 60k tbc
Metadata:
creation_time : 2018-07-15T16:08:22.000000Z
handler_name : GoPro AVC
encoder : GoPro AVC encoder
timecode : 16:23:48:21
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s
Metadata:
creation_time : 2018-07-15T16:08:22.000000Z
handler_name : GoPro AAC
timecode : 16:23:48:21
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
警告信息“无法找到编解码器参数”特别有意思,“流映射”显示只有视频和音频流被映射。我已经尝试使用“map_metadata”但没有成功。也许我的格式不正确,但更可能是由于编解码器未被识别而导致的问题,我期望默认情况下所有流都可以被映射。
我希望能得到一个忽略警告并映射未被识别流的答案,而不需要理解它们。
感谢任何帮助。