我有一个原始H264视频,我试图通过命令转换为MP4:
ffmpeg -i 'Camera 4(172.16.2.12_554)_1_2014_07_16_15_20_08.h264' 'Camera
4(172.16.2.12_554)_1_2014_07_16_15_20_08.mp4'
FFMPEG不断删除所有帧。甚至不编码1帧。
请参阅下面的输出:
Seems stream 0 codec frame rate differs from container frame rate:
2400000.00 (2400000/1) -> 24.00 (24/1)
Input #0, h264, from 'Camera 4(172.16.2.12_554)_1_2014_07_16_15_20_08.h264':
Duration: N/A, bitrate: N/A
Stream #0.0: Video: h264 (Baseline), yuv420p, 1280x960 [PAR 1:1 DAR
4:3], 24 fps, 24 tbr, 1200k tbn, 2400k tbc
[buffer @ 0x820c140] w:1280 h:960 pixfmt:yuv420p
Output #0, mp4, to 'Camera 4(172.16.2.12_554)_1_2014_07_16_15_20_08.mp4':
Metadata:
encoder : Lavf53.21.1
Stream #0.0: Video: mpeg4, yuv420p, 1280x960 [PAR 1:1 DAR 4:3], q=2-31,
200 kb/s, 24 tbn, 24 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press ctrl-c to stop encoding
^Zame= 2 fps= 1 q=2.0 size= 225kB time=0.08 bitrate=22147.4kbits/s
dup=0 drop=842
答案 0 :(得分:0)
您可以尝试告诉ffmpeg您想要输出文件的fps:
只需输入以下内容:
ffmpeg -r "24" -i 'Camera 4(172.16.2.12_554)_1_2014_07_16_15_20_08.h264' 'Camera
4(172.16.2.12_554)_1_2014_07_16_15_20_08.mp4'