[FFmpeg-devel] [PATCH] support for ordered chapters/segment linking in Matroska

Anton Khirnov wyskas
Mon Aug 11 05:36:40 CEST 2008


On Mon, Aug 11, 2008 at 1:52 AM, Aurelien Jacobs <aurel at gnuage.org> wrote:
> Michael Niedermayer wrote:
>
>> On Sun, Aug 10, 2008 at 04:55:20PM +0200, John B wrote:
>> > Sorry for thread-breaking. Some opinions in this patch: it seems to
>> > differ a bit from the "de-facto" behavior of Haali Media Splitter (the
>> > only existing implementation). I think it'd be desirable to play along
>> > the same way, specially considering this makes things much simpler
>> > implementation-wise and I think mostly addresses Michael's comments.
>> >
>> > In Haali, to accept a segment, TrackType and CodecID must match
>> > exactly, for all tracks, in the same order. Everything else is fair
>> > game. The values from the "master" segment are used and the ones from
>> > the linked segments discarded. This includes CodecPrivate,
>> > TrackVideo's childern, TrackAudio's children, etc...
>> >
>> > Needless to say, the demuxer doesn't handle the case of changing
>> > stream parameters: it just passes the frames to the decoder, and
>> > doesn't care for anything else. IMHO this is sufficient and even
>> > desirable.
>>
>> yes, agree, thats the simplest sane way to handle it
>
> I agree too. That should be plenty enough for now.
>
> If some samples appears later, that require more than this, then
> it will be a good time to start investigating more complex
> solutions (but I doubt this will ever happen).
>
> Aurel
>

Actually compatibility with Haali's splitter was what I was aiming
for, but the problem is that there are linked files out there with
slightly different parameters, so mkvmerge will refuse to merge them
and you'll get crap if you try to decode them with one decoder. But
Haali's splitter will play them just fine.

Of course we can just ignore these, I'll make the patch reject files
with different CodecPrivate and everyone will be happy. Is that ok
with you?

Anton




More information about the ffmpeg-devel mailing list