[FFmpeg-devel] MPEG index entries

Nico Sabbi Nicola.Sabbi
Wed Nov 14 18:15:47 CET 2007


Il Wednesday 14 November 2007 18:00:34 Taylan O. Toygarlar ha scritto:
> Hi Nico,
>
> Nico Sabbi wrote:
> > 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
>
> I am not very familiar with the interaction between the
> packets/parsers/demuxers. Does this mean it's not possible to
> create the index 'after' the parser "kicks in"?

hum, I haven't read the parser code, thus I don't know if the 
index position can be updated with an offset position from
within the parser (at least currently)

>
> I think we can detect existence of slices before the parsing stage,
> if the start code is between 0x01-0xAF. But on the same level, 0xB8
> is the GOP start code, and it should be signaling us the keyframe.
> Or am I totally wrong on this?
>

slices are identified in a codec-specific manner  and -if it
were not enough- they  may extend beyond pes boundaries,
so no: you can't search slices from outside the parser




More information about the ffmpeg-devel mailing list