ffmpeg命令行:视频转yuv再重新编码封装的视频时长会变短?
ffprobe测得00.mov详细信息
Duration: 00:12:14.17, start: 0.000000, bitrate: 6361 kb/s
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x800 [SAR 1:1 DAR 12:5], 6162 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : libx264
Stream #0:1(eng): Audio: mp3 (.mp3 / 0x33706D2E), 44100 Hz, stereo, fltp, 191 kb/s (default)
Metadata:
handler_name : SoundHandler
视频转yuv:
ffmpeg -i 00.mov 01.yuv
yuv重新编码h264:
ffmpeg -s 1920x800 -pix_fmt yuv420p -i 01.yuv -vcodec libx264 -x264-params fps=24 02.h264
h264封装ts:
`ffmpeg -i 02.h264 03.ts`
ffprobe测得03.ts详细信息:
Duration: 00:11:44.80, start: 1.440000, bitrate: 2242 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, progressive), 1920x800 [SAR 1:1 DAR 12:5], 25 fps, 25 tbr, 90k tbn, 50 tbc
为什么重新编码封装的视频时长会变短,编码h264时我设置了fps=24为什么最后的结果是25fps,我应该如何修改ffmpeg命令才能让给重新编码封装后的视频时长与源视频时长一致
|