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

Gracefully handle seekability errors during frame reading #131

Closed
gitttt-1234 opened this issue Oct 4, 2024 · 0 comments · Fixed by #138
Closed

Gracefully handle seekability errors during frame reading #131

gitttt-1234 opened this issue Oct 4, 2024 · 0 comments · Fixed by #138
Labels
enhancement New feature or request

Comments

@gitttt-1234
Copy link

In #129 we added basic valid frame index validation to throw IndexErrors on trying to read frames that are beyond the number of frames reported by the backend.

As we know however, some video container formats don't produce reliably frame-accurate seeking, so seeking to the end of the video may not work.

We should catch these cases for the opencv and imageio-ffmpeg backends and raise an appropriate error. Right now I think the opencv backend just returns a None, which leads to a weird call stack that can be hard to debug (this is why we added the basic index validation in the first place).

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

Successfully merging a pull request may close this issue.

1 participant