Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MediaStream threshold is currently hardcoded #92

Open
ggolda opened this issue Jul 13, 2021 · 0 comments
Open

MediaStream threshold is currently hardcoded #92

ggolda opened this issue Jul 13, 2021 · 0 comments

Comments

@ggolda
Copy link

ggolda commented Jul 13, 2021

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, 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.

Am I doing something wrong here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant