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

Mismatch between number of frames and video duration. #28

Open
BurgerBob opened this issue Nov 18, 2024 · 4 comments
Open

Mismatch between number of frames and video duration. #28

BurgerBob opened this issue Nov 18, 2024 · 4 comments

Comments

@BurgerBob
Copy link

I get a video length mismatch when reading a video using TheoraFile.
Here are the video properties:
image

And in VLC:
image

But if I open the video, and I count the frames that way:
image

I get 2598 frames, that is 43.3 seconds at 60 fps.
When I play the video in game, it plays too fast.

@flibitijibibo
Copy link
Member

This is probably the decoder skipping duplicate frames where it can - the container format is kind of fussy about synchronization so you have to time it yourself:

https://github.com/FNA-XNA/FNA/blob/d8167d53b76cf7da54f05872480aca8121bf49ba/src/Media/Xiph/VideoPlayer.cs#L536-L548

@BurgerBob
Copy link
Author

Does not seem to be it, if I change the code to that, I do not detect any duplicate frame:
image

@BurgerBob
Copy link
Author

Ok, I tried with some videos and it works with the duplicates frames fix.
I still have the same video with a big mismatch though, maybe I am going to try to re export it.

@BurgerBob
Copy link
Author

Re-converting the video solves the issue, thanks for the answer.

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

2 participants