[FFmpeg-devel] [RFC] stream parsing

Michael Niedermayer michaelni
Sat Sep 25 21:35:59 CEST 2010


On Sat, Sep 25, 2010 at 08:49:52PM +0200, Reimar D?ffinger wrote:
> On Sat, Sep 25, 2010 at 05:01:28PM +0200, Benjamin Larsson wrote:
> > >> Yeah the issue is that some codecs don't know the channel count thus you
> > >> need the info from the container and sometimes the codec has better
> > >> knowledge which could possibly be different from the container (and is
> > >> for the 2 files in issue 2137).
> > >>
> > >>
> > >> So
> > >>
> > >> /**
> > >>  * Codec know the channel configuration better then the container
> > >>  */
> > >>
> > >> #define CODEC_CAP_CHANNEL_CONF    0x0100
> > >>
> > >>
> > >> And something in av_find_stream_info that checks that flag ?
> > > 
> > > I don't think there's a point since it fixes at most half the issue.
> > > For those formats where this can happen, it is also possible
> > > that the channel count changes in the middle.
> > > If that cases is handled correctly, this automatically becomes
> > > a non-issue (and the container value could mean "better upmix
> > > even if it is stereo now, because it will have 5 channels later").
> > 
> > Well the issue is that the container reports something that doesn't
> > correlate with the stream contained in the container. It has nothing to
> > do with midstream channel configuration changes. What you describe is
> > another kind of possible problem.
> 
> I am saying that solving this other problem would/should solve this one
> as well (even if maybe not in the best possible way).

i dont see how, for applications like ffmpeg you mux into a container that
most likely doesnt support channel changes and needs a channel configuration
when writing the header. with av_find_stream_info() that works without
it does not

supporting midstream channel changes require remixing to a constant channel
configuration, and its surely unreasonable to remix a file by default that
didnt need it just because the initial configuration was wrong

also theres the issue with consistency to width/height

[...]
--
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 3
"Rare item" - "Common item with rare defect or maybe just a lie"
"Professional" - "'Toy' made in china, not functional except as doorstop"
"Experts will know" - "The seller hopes you are not an expert"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100925/d135f1cf/attachment.pgp>



More information about the ffmpeg-devel mailing list