Skip to content

Fix seek in PyAVReaderTimed - #431

Open
VladyslavUsenko wants to merge 1 commit into
soft-matter:mainfrom
VladyslavUsenko:pyav_fix_seek
Open

Fix seek in PyAVReaderTimed#431
VladyslavUsenko wants to merge 1 commit into
soft-matter:mainfrom
VladyslavUsenko:pyav_fix_seek

Conversation

@VladyslavUsenko

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

2 participants