【问题标题】:How to make ffmpeg.exe solve the inconsistent fps for input frame sequence?如何让ffmpeg.exe解决输入帧序列的fps不一致问题?
【发布时间】:2016-08-26 09:41:27
【问题描述】:

我们现在使用 ffmpeg.exe 将图像序列从 IPCAM 转换为 C# 中的 H.264 视频输出。在这里,我们将 ffmpeg.exe 的输出视频的 fps 设置为 10 帧。但是,来自 IPCAM 的图像序列的 fps 不是固定的。有时超过 10fps,有时低于 10fps。因此,如果我们使用 ffmpeg.exe 录制一小时的数据,录制的视频长度并不精确为一小时。请告诉我们ffmpeg.exe的哪些参数或命令可以使ffmpeg.exe自动解决这种不一致。谢谢你的帮助。

【问题讨论】:

    标签: c# ffmpeg aforge


    【解决方案1】:

    试试这两个命令:

    ffmpeg.exe -y -f rawvideo -vcodec rawvideo -s WxH -pix_fmt rgb24 -i \\.\pipe\" + pipename -vsync 0 -r 10 -an -b:v bitrate -vcodec h264_qsv -preset veryslow filename.mkv
    
    
    ffmpeg.exe -y -f rawvideo -vcodec rawvideo -s WxH -pix_fmt rgb24 -use_wallclock_as_timestamps 1 -i \\.\pipe\" + pipename -vsync 0 -r 10 -an -b:v bitrate -vcodec h264_qsv -preset veryslow -fflags +genpts filename.mkv
    

    不要更改为 MP4 的扩展名。如果上述任何一个工作,我们就可以将 MKV 复用到 MP4。

    ffmpeg.exe file.mkv -c copy file.mp4
    

    【讨论】:

    • 嗨@Mulvya,非常感谢您的帮助。我们会尝试的。
    猜你喜欢
    • 2019-03-13
    • 1970-01-01
    • 2015-03-12
    • 1970-01-01
    • 1970-01-01
    • 2013-10-07
    • 1970-01-01
    • 1970-01-01
    • 2021-03-27
    相关资源
    最近更新 更多