Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR exposes the AVIndexEntry structure and adds a pythonic container for it
The AVIndexEntry structure indexes (some or all) frames in a file, the exact behavior is demuxer dependent.
The primary use case for this is fast multi-seek loops where a video is decoded at a lower framerate than it should be displayed at.
For example if you want to decode every Nth frame, you can use
search_timestampto figure out if there is a keyframe between the frame you are currently at and the frame you want to decode and seek appropriately. If you always seek you risk seeking backwards and if you never seek you will decode a bunch of frames you didn't need.Some relevant docs from ffmpeg:
Questions: