[NUT-devel] Re: [theora-dev] Theora in Matroska

Rich Felker dalias at aerifal.cx
Fri Nov 3 22:23:31 CET 2006


On Fri, Nov 03, 2006 at 11:02:09AM -0800, Ralph Giles wrote:
> Forgive the cross posting, this affects several projects.
> 
> On Fri, Nov 03, 2006 at 12:50:27AM -0800, Unga wrote:
> 
> > Currently Theora video in Matroska is not supported by
> > Mplayer. To enable the support Michael Niedermayer has
> > made the following proposal sometime back:
> > http://article.gmane.org/gmane.comp.video.mplayer.nut.devel/214
> 
> The proposal is that we add a recommendation to the ogg vorbis
> spec to just concatenate the headers when embedding in a container
> that needs to store them in a blob, and that readers skip leading 
> and trailing data based on known packet lengths and magic strings.
> 
> As Michael says, this works, and is just the sort of hacky spec 
> wrangling ogg is (in)famous for. :)

Michael's promosal allows many formats including the MKV one.
Obviously choosing the one that might interoperate with broken
software could have advantages. Michael's proposal was just for the
vorbis decoders to 'be liberal in what they accept' both for the sake
of supporting multiple weird formats and for implementation simplicity
(this algorithm is simpler than having N special cases for N broken
formats).

> I guess my only comment is that this isn't particularly general. 
> While vorbis has a fixed set of header packets with "easy" to determine 
> lengths, it's possible to do a codec with external framing in mind where 
> this wouldn't work. The theora spec, for example, allows additional 
> application-defined header packets after the initial required three.

Obviously APPLICATION-specific headers do not belong here at all. More
Xiph idiocy. Anyway such crap should never be stored in nut or any
non-ogg container.

> It also means a cross-encapsulator has to understand a codec's header 
> packet format to put the data in an ogg stream, which is something many 
> implementors have complained loudly about.

Blame Xiph for _intentionally_ designing their formats to break
compatibility between containers.

> Therefore I'd like to 
> counterpropose something with explicit packet lengths, like matroska 
> has, or the "packed header" format the vorbis and theora rtp drafts use.

Reference for these?

> If we're going to add this to the vorbis and theora specs, I'd like to 
> see it used as broadly as possible, but luca dislikes the metadata 
> header and omitted it from his packed header design for rtp. Luca, what 
> do you think about adding the metadata header back as an optionally 
> empty field?

The metadata header should be empty if present, and only present if
required by the spec. This data does NOT belong in the codec headers,
only the container-level metadata.

Rich




More information about the NUT-devel mailing list