[FFmpeg-devel] gxf incorrectly interleaved

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Dec 28 11:45:50 CET 2011


On Wed, Dec 28, 2011 at 11:37:52AM +0100, Reimar Döffinger wrote:
> On Mon, Dec 26, 2011 at 10:05:55PM +0100, Michael Niedermayer wrote:
> > On Tue, Dec 20, 2011 at 07:05:32PM +0100, Wolfram Gloger wrote:
> > > Hi,
> > > 
> > > In current ffmpeg, after "make fate", I do
> > > 
> > > ./ffprobe -show_packets tests/data/lavf/lavf.gxf |grep dts=
> > > 
> > > and see:
> > > 
> > > ffprobe version 0.9, Copyright (c) 2007-2011 the FFmpeg developers
> > >   built on Dec 20 2011 18:32:37 with gcc 4.3.2
> > > ...
> > > dts=28
> > > dts=30
> > > dts=32
> > > dts=35
> > > dts=34
> > > dts=36
> > > dts=38
> > > ...
> > > 
> > > Note the non-monotony at dts=35 -> 34.
> > > It appears that this file is created by ffmpeg non-interleaved somehow.
> > > I don't particularly care for gxf, I just stumbled over test failures
> > > in the seek regression test.  Maybe someone cares to investigate further?
> > 
> > reimar, baptiste ?
> 
> Honestly I have no clue. Does gxf have to be 100% correctly interleaved?
> That it only has a single index makes things complicated if not, but it
> doesn't necessarily imply that.

I see there is gxf_interleave_packet which calls
ff_audio_rechunk_interleave.
That might be a good place to start investigating if someone has time.
In this specific has however I suspect it has to do with the fact that
you are muxing a progressive video stream.
I think the output in that case is simply non-compliant since 35 is not
a valid time-stamp for progressive GXF files.
Actually this line is the relevant one:
            field_nb[i] &= ~1; // compare against even field number because audio must be before video
I see two possibilities:
1) This output is actually correct (the dts=34 video packet contains
data for dts=34 and dts=35, thus audio for dts=35 must come before).
2) Odd dts values should never be generated for audio when encoding
progressive video (no idea how to do that best).

If someone can answer these clearly I can probably look at bit further.


More information about the ffmpeg-devel mailing list