[FFmpeg-user] Recorded Frame Timestamps are Inconsistent! How to Fix it?

Carl Eugen Hoyos ceffmpeg at gmail.com
Mon Mar 22 23:43:55 EET 2021

Am Mo., 22. März 2021 um 20:36 Uhr schrieb Hassan <hassaniqbal931 at gmail.com>:

> Given the discussion above and the question under discussion, can you
> please give a command to achieve the accurate timestamping of the frames?

You should start with something like the following:
$ ffmpeg -f gdigrab -i desktop -vcodec libx264 -pix_fmt yuv420p
-preset ultrafast out.mkv

mkv is not ideal for many framerates, the mov muxer is believed by its original
developer to not work correctly for vfr, so it is not easy to suggest an ideal
file format, consider testing nut.

If your system is fast enough, you can switch to libx264rgb and
increase the framerate,
In a second step, you can then write the timestamp on the frames if
you believe that
this is needed.

If you need more support, please do not forget to post the command line you
tested together with the complete, uncut console output.

Note that many systems are not fast enough to do what you want.

Carl Eugen

More information about the ffmpeg-user mailing list