FFMediaToolkit is a cross-platform video decoder/encoder library for .NET that uses FFmpeg native libraries. It supports video frames extraction, reading stream metadata and creating videos from bitmaps in any format supported by FFmpeg.
Because of that as I understand, I can not read from 60 fps video with a 30 fps framerate from my reader. I'm trying to call GetFrame with a delta time of 33ms, and GetFrame function from MediaStream ignores my timestamp and just returns a next frame.
As I understand, this threshold parameter should be equal to a frame rate of a video? E.g. for 60 fps video it should be 16.66, for 30 fps its 33.33 and etc.
In current implementation of MediaStream, Threshold is being hardcoded and there is no way to override it: https://github.com/radek-k/FFMediaToolkit/blob/master/FFMediaToolkit/Decoding/MediaStream.cs#L23
Threshold = TimeSpan.FromSeconds(0.5).ToTimestamp(Info.TimeBase);
Because of that as I understand, I can not read from 60 fps video with a 30 fps framerate from my reader. I'm trying to call
GetFrame
with a delta time of 33ms, andGetFrame
function from MediaStream ignores my timestamp and just returns a next frame.As I understand, this threshold parameter should be equal to a frame rate of a video? E.g. for 60 fps video it should be 16.66, for 30 fps its 33.33 and etc.
Am I doing something wrong here?