FFmpeg转码提示帧速率过高

使用ffmpeg转码视频文件时,提示

“Frame rate very high for a muxer not efficiently supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2″

说明此视频文件帧速率过高,可以添加 -vsync 2 参数解决问题.

Edit to add explanation:

The -vsync parameter is a video sync method. It determines the way in which frames are passed from the input to the output. Here are the possible options, taken from the current ffmpeg docs.

0 or passthrough – Each frame is passed with its timestamp from the demuxer to the muxer.

1 or cfr – Frames will be duplicated and dropped to achieve exactly the requested constant frame rate.

2 or vfr – Frames are passed through with their timestamp or dropped so as to prevent 2 frames from having the same timestamp.

drop – As passthrough but destroys all timestamps, making the muxer generate fresh timestamps based on frame-rate.

-1 or auto – Chooses between 1 and 2 depending on muxer capabilities. This is the default method.

(The reason for the multiple values for some of them is that it used to just be by number, and now it’s by name. The numbers are still allowed to be used to avoid breaking backwards compatibility.)

The reason that adding 2 will help here is that it drops more frames and makes thing easier on the muxer. Downsides are, you may lose frames.

发布者

下弦 古月

有时候我们以为爱可以改变一切,但有些东西是无法改变的,就像那些溶入了生命的颜色。

发表回复