[vlc-devel] commit: Added hotkey code for input "frame-next". (Laurent Aimar )
Laurent Aimar
fenrir at via.ecp.fr
Sat Aug 29 02:08:19 CEST 2009
Hi,
On Fri, Aug 28, 2009, Pierre d'Herbemont wrote:
> I was wondering if there could be some kind of emulation at the input
> code level. ie - seek back to the right(!?) frame, and then frame next
> to find the frame we want. Easy to say... No idea if this is realistic/
> easy.
Possible, yes. Easy, no.
The idea is simple: ignoring al the optimizations, you simply have to start
decoding soon enough and simply throw away all unwanted frames.
The difficulty is more in all the code that is needed:
1. Frame accurate seeking demuxer.
You must be able to accuratly seek to any frame in the file. It is not easy
nor fast to do with non indexed file like TS, PS, ogg...
For that part, doing it for AVI and MP4 is easy.
2. Finding the right frame to start decoding with.
That is pretty difficult especially with open gop (mpeg2-4) and even more
with complex reordering used by h264. Basically you need to simulate the way
the decoder outputs frames, and at the demuxer level. It is also complicated
by the fast that it's the demuxer that need to do the seeking but the
informations needed are inside the video elementary stream.
3. The whole decoding pipeline must not loose the frame number. That includes
packetizers, decoders and the vout.
Frame decoding errors and reordering has to be taken care of. Video filters
that create new frames or deletes some can be a problem.
--
fenrir
More information about the vlc-devel
mailing list