[ogg-dev] [theora-dev] handling multitrack Ogg
Benjamin M. Schwartz
bmschwar at fas.harvard.edu
Tue Feb 2 06:56:02 PST 2010
Silvia Pfeiffer wrote:
> I found out that the MPEG/QuickTime container format has an explicit
> "track ID" that numbers its tracks.
>
> The track order also determines the display order.
...
> Further, MPEG/QuickTime has an explicit "alternate group ID". This ID
> defines tracks that belong to the same group and can thus only be
> displayed alternately of each other
I think these are two good examples of what we _don't_ want. The player
should be able to decide whether to overlay a sign language track on top
of the video, or to display it in a separate rectangle. Similarly, the
player should be able to decide to display multiple subtitle languages at
once, or play multiple audio tracks at once. This is the nature of HTML:
content is separate from presentation.
> I now wonder whether we need to introduce an explicit "track ID" into
> Ogg, which will define a fixed order independent of the parsing system
> and will allow us in JavaScript to directly address tracks.
The ogg stream serial number is already such an explicit track ID. Your
proposed API should work fine; you just have to treat the tracks attribute
as an associative array instead of an index array. (Javascript
associative arrays only support string keys, so you'll have to convert the
track ID to a string, but that's fine.) If MPEG streams use their index
to specify overlay ordering then they can expose a "readonly attribute
unsigned long altitude" (or whatever you want to call it).
As for specifying the relationship between streams, Skeleton fisbone
packets are the logical way to do this ... but of course you know that
better than anyone.
--Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
Url : http://lists.xiph.org/pipermail/ogg-dev/attachments/20100202/302a5256/attachment-0001.pgp
More information about the ogg-dev
mailing list