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

Seek to a frame number #361

Open
tobiasBora opened this issue Sep 21, 2023 · 1 comment
Open

Seek to a frame number #361

tobiasBora opened this issue Sep 21, 2023 · 1 comment

Comments

@tobiasBora
Copy link

tobiasBora commented Sep 21, 2023

I would like to be able to decode (using webcodecs) all frames between two fixed position (say 100-th frame to 200-th frame). I saw that mp4box provides a seek function, but it accepts time instead of frame number. Is there another way to seek a specific frame? I’m thinking to save all elements given to onSamples and loop over this list to find the data of a specific frame (starting earlier to find a RAP), but I don't know how memory efficient this is since I need to load in memory the whole video file, and I don't know if it is the recommended approach.

@hughfenghen
Copy link

You can refer to this DEMO: https://hughfenghen.github.io/WebAV/demo/1_4-mp4-previewer

but I don't know how memory efficient this is since I need to load in memory the whole video file

Saving the video to OPFS(Origin private file system) should be fine.

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