Open tamirs9876 opened 2 months ago
Hi @radek-k, I hope you’re doing well! I wanted to draw your attention to the issue I raised earlier, as I haven’t received a response yet. Could you please take a look when you have a moment? Thank you!
Maybe @redbaty will be able to review as well.
Problem: Video file encoded using FFMediaToolkit is created with inaccurate frame rate. I'm setting
VideoEncoderSettings.Framerate = 25
but the produced video frame rate is25.1004016064257
.Repro sample: App: Console application, running .NET Framework 4.6.2 FFMediaToolkit package version:
4.5.1
FFmpeg binaries taken from here: https://github.com/BtbN/FFmpeg-Builds/releases/tag/autobuild-2024-09-28-13-00 I tried to create a 10 second video, with 25 FPS.code:
running
ffprobe
shows the following:ffprobe -hide_banner test.mp4
I ran this command:
ffprobe -hide_banner -loglevel warning -select_streams v:0 -show_entries frame=pict_type,pkt_pos,pkt_size,pkt_dts,pkt_dts_time,pkt_duration,best_effort_timestamp,best_effort_timestamp_time -of compact test.mp4
I expected to receive 250 entries (10s*25fps), but I only got 249. The last entry time was
9,92
(instead of9,96
) so looks like it is missing, yet, dividing the expected number of frames by video duration returns the actual FPS (250/9.96=25.10040..
) so it was written, partially.Hope @radek-k will be able to take a quick look.