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

Fix seek in PyAVReaderTimed #431

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

VladyslavUsenko
Copy link

This PR fixes a seek method of the PyAVReaderTimed.

The timestamp, that is computed in the seek method, corresponds to stream and not to the container. This PR updates self._stream.container.seek to seek in the stream. In my experiments, it significantly reduces the time for get_frame calls on large video files.

@VladyslavUsenko
Copy link
Author

Moreover, it looks like here seek is used correctly: https://github.com/soft-matter/pims/blob/main/pims/pyav_reader.py#L397

@danielballan
Copy link
Member

Thanks, @VladyslavUsenko.

I approved the CI to run, and I notice some failures that look unrelated to the change. I will take a closer look tomorrow.

@VladyslavUsenko
Copy link
Author

Hi @danielballan, any progress on this?

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

Successfully merging this pull request may close these issues.

None yet

2 participants