[FFmpeg-devel] [RFC] Jumping into a GOP with ffplay

Robert Krüger krueger
Mon Mar 22 15:11:49 CET 2010


Hi,

warning: I'm still a beginner in libav concepts and by no means a codec expert, so some of this might be complete nonsense, so please point me to the right resources when this is the case.

I have a patch ready to add a -t option to ffplay that allows then to play just a portion of a file (will post this as soon as the loop patch has been committed), in a way from "in point to out point" as it is called in most editing software. Together with the new loop option this is a valuable tool for me to review footage. However, when the start point is in the middle of a GOP, you get those well-known nasty visual effects.

My assumption (might be wrong) is that this is beyond the seek API, i.e. I don't have the possibility to have the seek API know where it needs to go before the start offset, to decode the wanted frame without these problems because it is not possible without iterating back through the stream or decode from the beginning.

The way one could tackle this (not beautiful but would work for many real-world cases) would be to have the user specify an optional buffer time (which you would usually chose so it very likely is longer than a GOP) and have ffplay seek to the requested time - buffer time and drop those decoded frames that are not in the specified time window. At the expense of a (user-controllable) performance penalty one could happily review the requested portion of the file without strange effects.  

Would such a patch have chances to be accepted if it meets your quality criteria?

Regards,

Robert

 


  



More information about the ffmpeg-devel mailing list