[vorbis-dev] Multi-stream vorbis...

Ralph Giles giles at xiph.org
Sun May 30 09:22:04 PDT 2004



On Sun, May 30, 2004 at 07:14:01PM +0800, illiminable wrote:

> Ok... i understand it's not a valid Ogg Vorbis file, but it is (assuming my
> muxer works properly) a valid ogg file.

Yes. I don't actually know of anything that will play both stream 
though. That's sorta on the theora todo list. :)

You can check with oggzdump. Just make sure the pages are sorted by 
their granule times.

> Is there some reason why players can't/don't simultaneously play multiple
> streams of audio ? Surely if they can demux the stream they can see there
> are two streams and play both of them ?

Yes. I mean, they'd need a mixer and a way to maintain sync which are 
significant extra features. Vorbis is a lossy distribution format 
so generally you care more about bitrate than being about to turn 
portions of the audio on an off. We've always viewed that as a 
specialized application that needn't be universally supported.

(This is in contrast to *alternate* audio tracks, which we do support in 
theora.)

> Is there a reason for that limitation on Ogg Vorbis files is what i'm
> getting at ?

No good one. Vorbisfile didn't support muxed streams at all, and one one 
fixed it by the the 1.0 release. Unfortunately, Monty broke the spec to 
match the lib instead. Playing (at least) the first occurring vorbis 
stream is what players *should* do.

> Which kind of gets back to my previous question a few weeks back, with the
> single .ogg extension. Without a partial demux, how can a player tell if it
> is an ogg vorbis file or just a generic ogg file which may contain anything.
> I assume there is a similar restriction to theora ? Which would prevent a
> video being encoded with multiple audio tracks in different langauges for
> example. And how can a player (which may only play audio, or only ogg
> vorbis) know determine if it should let a user load a file. How can it sort
> audio only .ogg files from A/V .ogg file from some other kindo f .ogg files.

The convention is that the first occurring header packet determines the 
'primary' media type of the stream. This lets you do file magic 
identification of vorbis vs speex vs theora, etc. Of course theora files 
can also contain vorbis, but you shouldn't expect players to play the 
video if it doesn't occur in the first page.

Cheers,
 -r
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list