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

How to extract samples from fragmented MP4 file? #360

Open
Avijobo opened this issue Sep 20, 2023 · 1 comment
Open

How to extract samples from fragmented MP4 file? #360

Avijobo opened this issue Sep 20, 2023 · 1 comment

Comments

@Avijobo
Copy link

Avijobo commented Sep 20, 2023

Hi,

I am using MP4Box.js extraction and the WebCodecs api to decode and display individual MP4 frames. All works well with non-fragmented MP4 files.

However when I pass the uri of a fragmented MP4 file, extract samples, create encodedVideoChunks from the samples and decode them, after about 10 frames I get a decoder error from the WebCodecs VideoDecoder.

Any idea why this happens? Is there a different approach needed to extract samples from a fragmented MP4 file?

@Avijobo
Copy link
Author

Avijobo commented Oct 3, 2023

FYI: It turned out this only happens with fragmented MP4 files created by MediaRecorder in (iOS) Safari. They have a duration of 0, which is probably not expected by the parser.

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