FFMS / ffms2

An FFmpeg based source library and Avisynth/VapourSynth plugin for easy frame accurate access
Other
582 stars 105 forks source link

Include frame file position in FFMS_FrameInfo #213

Closed petersondrew closed 9 years ago

petersondrew commented 9 years ago

Not sure what kind of procedure there is for modifying the public API, but I wanted to throw this out there as I need it for a project I'm working on.

Here's the reasoning behind this addition: Sometimes frames do not contain PTS information (and players like ffplay reset their frame number on seeking), and therefore the only way to truly know "where you are" reliably during playback is based on file position. For instance, the show info filter in ffplay/ffmpeg includes the position of the frame being displayed. Using that information we can easily relate back to our index built with ffms2.

Any thoughts or discussion on this? Is this something suitable for inclusion in the project?

petersondrew commented 9 years ago

I've found it's even more convenient to support extracting frames by position, rather than first searching the retrieved index for frames in that position. Adding FilePos to FFMS_FrameInfo may not be required now. Thoughts?

myrsloik commented 9 years ago

Unclear why it's needed and definitely outside the scope of this project