您好,我有一个 MP4 视频,我想使用 ffmepg 更改 creation_time,而不更改其余的元数据。但我面临一些问题..
更改了major_brand 和更多内容。我希望那些是一样的。如果我把它放在 ffprobe.exe 这就是我看到的:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '6.mp4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp41mp42isom
creation_time : 2013-03-23 16:25:53
Duration: 00:00:06.55, start: 0.000000, bitrate: 919 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 480x480,
862 kb/s, 29.97 fps, 29.97 tbr, 600 tbn, 1200 tbc
Metadata:
creation_time : 2013-03-23 16:25:53
handler_name : Core Media Video
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 62 k
b/s
Metadata:
creation_time : 2013-03-23 16:25:53
handler_name : Core Media Audio
我想在运行时更改视频的创建时间:
ffmpeg.exe -i 6.mp4 -metadata creation_time="2013-06-22 15:00:00" -acodec copy -vcodec copy output.mp4
我得到:
Output #0, mp4, to 'output.mp4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp41mp42isom
creation_time : 2013-06-22 15:00:00
encoder : Lavf55.12.102
Stream #0:0(und): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 480x480, q=
2-31, 862 kb/s, 29.97 fps, 19200 tbn, 600 tbc
Metadata:
creation_time : 2013-03-23 16:25:53
handler_name : Core Media Video
Stream #0:1(und): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, mono, 62 kb
/s
Metadata:
creation_time : 2013-03-23 16:25:53
handler_name : Core Media Audio
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 194 fps=0.0 q=-1.0 Lsize= 738kB time=00:00:06.61 bitrate= 913.9kbits
/s
根据输出,因为我选择了“-acodec copy -vcodec copy”,所以一切都应该保持不变。但是当我为新创建的 .mp4 文件运行 ffprobe 时。这是输出:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 2013-06-22 15:00:00
encoder : Lavf55.12.102
Duration: 00:00:06.62, start: 0.000000, bitrate: 913 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 480x480,
862 kb/s, 29.97 fps, 30 tbr, 19200 tbn, 38400 tbc
Metadata:
creation_time : 2013-06-22 15:00:00
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 62 k
b/s
Metadata:
creation_time : 2013-06-22 15:00:00
handler_name : SoundHandler
如你所见,一切都变了,尽管我选择保持一切不变。
请帮助我。谢谢!