[vorbis-dev] Mime Type and Ogg (More)
giles at snow.ashlu.bc.ca
Thu Oct 19 12:29:41 PDT 2000
On Thu, 19 Oct 2000, Ali Abdin wrote:
> You are right. I apologize for not reading/browsing the archive.
> I have read/browsed the threads related to 'Mime-type' and 'Header'.
> Monty - in one of the threads
> (http://www.xiph.org/archives/vorbis-dev/0416.html) you said:
> 'Magic to detect Ogg (and detect Ogg/Vorbis) is easy'
> The magic to detect Ogg is 'obvious'. But what about the 'Magic to detect
> You also said 'Whipping out docs for this now.' - Where can I find this?
> (I couldn't find any details about mime magic in the docs that I looked
These are both very fair points. I suspect Monty meant the procedures
we've alreay touched on. And yes, the lack of (promised) documentation is
> Is there, (or shouldn't there be) an area in the Ogg header to identify
> its contents?
There's been some discussion of this as well, and we do intend some sort
of 'stream description' substream. My favorite idea is to include along
with the other general metadata in RDF/XML, but some have suggested a
simpler binary header. Mostly to avoid the overhead of the parser,
though I would imagine that's less of an issue than speed for Nautilus.
Still, there's no room for this data in Ogg except in a substream, so the
static bytesequence at a firm offset isn't going to happen. Doesn't
Nautilus provide its own extended attribute system to cache the results if
filetype determination is slow? Might that be enough? Wouldn't that also
be a way to implement (in general) file-specific app association like
Chris has described in MacOS?
> I read some other threads, but only the above two seems to be the most
> relevant ones. None of the threads really discussed mime-type/mime-magic
> in depth and NONE of them really reached a consensus or a decision about
> any particular issue.
> Note: this thread has _NOTHING_ to do with the filename extension
It does from our point of view. In both cases people have written to
complain that Ogg doesn't make a handy distinction between vorbis-only and
otherwise within their favored scheme. Both file extensions and mime-magic
are inadequite for the way Monty designed the format. Why are you
contemptuous of one but not the other?
Of course, I'm unconvinced of the need to make the distinction at this
level, so my argument is more that yours is moot than that your suggestion
have no merit. If that makes sense?
To summarize, for Nautilus (and mime-types in general) I'd suggest:
0. Just associate .ogg and 'OggS' with application/x-ogg. Hook that up
to ogg123 or any other supporting player. This has been our
1. If in the future it becomes desireable to make audio/audio+visual
distictions, run the file through a laucher or an 'ogginfo' utility
or embed algorithmic detection yourself. There will be a metadata
substream that will let you distinguish, but not cheaply.
2. Associate audio/x-ogg (or better audio/x-oggvorbis) with vorbis at byte
29. The bytes immediately before say the data begins at byte 29, so you
can use them to reject text. This would be forking the mimetype; I
don't know how we feel about that.
giles at ashlu.bc.ca
I can't believe I wiped my sigfile!
--- >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