[FFmpeg-devel] MPEG index entries

Nico Sabbi Nicola.Sabbi
Wed Nov 14 09:52:01 CET 2007


Il Wednesday 14 November 2007 03:17:18 Vinod G ha scritto:
> Hi,
>
> I have been working on a similar problem, so let me share my
> findings.
>
> You are right that the indexes generated inside
> mpegps_read_pes_header are not keyframe indexes. But I still use
> those indexes for the seek.

of course, seeking can only happen at pes boundaries, but the position
should be accepted only if the frame inside it is an
I frame, something that you can't know until the parser kicks in

> After the seek, when I read a frame, I 
> check the 'picture coding type' to check for I-frame. If it is not
> I-frame, I skip frames until I find one. This works reasonably, but
> not perfect.

mpeg2 is not the only possible video codec of  the stream

>
> Ideally, the initial indexing (or indexing while playing), should
> check for I-frames in each frame's 'picture coding type' and then
> add it into the index table.
>
> Thanks,
>

and please, please, please don't top post.
Let's kill this top-posting pestilence!




More information about the ffmpeg-devel mailing list