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

Discrepancy in MediaTime Reporting for MP4 Files Generated Using FFMPEG #85

Open
daniel-pebble opened this issue May 22, 2023 · 2 comments

Comments

@daniel-pebble
Copy link

daniel-pebble commented May 22, 2023

I noticed an issue with mp4 files generated using ffmpeg when it comes to reporting a mediaTime of 0 for the first frame through requestVideoFrameCallback. However, this issue doesn't occur with webm files or when using another encoder like mainconcept or ffmpeg with AAC_mf encoder.

You can see a demo of the problem here: link to demo. When incrementing the frames with video 1, you won't see video progress until the third button press. On the other hand, with video 2-5, the mediaTime is 0, and a single button press increments the video by one frame.

The browser used is Chrome 113.0.5672.92 on Windows 10. The FFMPEG version is 6.0-essentials_build-www.gyan.dev or N-109421-g9adf02247c-20221216.

I've compared the PTS values of video 1 and 2, and they are both 0. The main difference I've observed is that the mp4 duration of the audio track is shorter for video 2.

My ultimate goal is to use requestVideoFrameCallback to determine the current frame. Currently, for video 1, the first frame is at 0.021333 and the second frame is at 0.041333.

I'm unsure if this issue is a bug in Chrome or if it's an expected behavior from the API.

@sroucheray
Copy link
Contributor

@daniel-pebble
Copy link
Author

I've also reported this under https://bugs.chromium.org/p/chromium/issues/detail?id=1448550

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