[FFmpeg-devel] MPEG index entries

Michael Niedermayer michaelni
Wed Nov 14 22:11:12 CET 2007


Hi

On Wed, Nov 14, 2007 at 06:15:47PM +0100, Nico Sabbi wrote:
> 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)

well updating it from within the parser is hard but it is very easy
to let the caller (av_read_frame_internal()) update the index

it actually does something like that already (grep for AVFMT_GENERIC_INDEX)
this code just does something slightly different (build a index from the
parser frame starts and keyframe flags assuming there is no container but
everying is just concatenated (=raw) )

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071114/73116f0a/attachment.pgp>



More information about the ffmpeg-devel mailing list