Re(2): [vorbis-dev] Mime Type and Ogg
Ralph Giles
giles at snow.ashlu.bc.ca
Sat Oct 14 10:52:41 PDT 2000
On Sat, 14 Oct 2000, Ali Abdin wrote:
> Okay - this is a problem. You see, stating that "foo.ogg" is an
> application/x-ogg is incorrect because it is not an application.
As patrick mentioned, this is an old flamewar. At least you're complaining
about mime stuff rather than file extensions. :)
We use 'application' because it seems to be the only catch-all for general
multimedia content in a complex format. Same way PDF is application/x-pdf.
> What Nautilus does is check the mime super-type and if it is 'audio' then it
> will do some special music handling functions (i.e. Sound Preview, 'View as
> Music', etc.) This is no problem with mp3 as it is audio/x-mp3 or audio/mpeg
> or whatever.
>
> Now in Nautilus we want to support audio files (i.e. it doesn't make sense to
> try and play a video codec using 'ogg123'). Is this possible at all?
>
> For the mime magic detection stuff we check for the "OggS" at the beginning,
> and for the extension we check for '.ogg'
You could easily extend the magic check to look for a vorbis substream. In
the 1.0 mapping the file should always have 'vorbis' starting at byte
28+(the value of byte 26). In fact, I suspect byte 26 will always be 1.
This assumes the first logical bitstream header is the vorbis one, which
is of course true of audio-only files. I suspect it will also be true in
general, to coddle broken player implementations that don't expect other
streams.
Of course, none of this helps keying your database off 'audio' (which
seems wrong anyway) or using a different ogg player for audio vs. a/v
files. I wouldn't worry about it beyond associating ogg123 with
application/x-ogg with .ogg/OggS. If ogg123 (or whatever) turns out not to
be up to playing both types, it can be replaced by a smart launcher that
does content examination.
The problem with having both audio/ogg and video/ogg (and text/ogg) is
that webservers would have to do the complicated content examination
I described above to set it properly. Arguably they should be allowed the
easier time...and it's much easier to get Ogg support added to a media
player than a web server.
-ralph
--- >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