[vorbis-dev] file magic for Ogg, Vorbis?

rillian rillian at telus.net
Mon Jul 16 19:38:01 PDT 2001



On Monday, July 16, 2001, at 07:02 , Jeremy C. Reed wrote:

> I am trying to figure out file(1) magic(1) for Ogg and Vorbis.
> (I am using file from NetBSD 1.5.1.)
> [...]
> Any ideas on what bytes I should look at for more details? (For example,
> MP3 and the WAV show how many bits, sample rate, stereo and more).
>
> How should it be worded? (Is "Ogg data, Vorbis audio" okay?)

Sounds ok to me. Maybe 'Ogg bitstream'. The only thing floating around 
right now are 'degenerate' ogg streams which only contain a single 
vorbis audio stream. Just be aware there may be other configurations in 
the future.

> Does anyone already have this file magic?

Yes. See http://www.xiph.org/archives/vorbis/200106/0224.html

> In addition, I am going to do magic.mime also. Is "audio/vorbis" okay?

Technically, you shouldn't use that until we're granted the mimetype. 
Consensus seems to be application/x-ogg for streams in general, with 
audio/vorbis in the future for degenerate vorbis streams and/or streams 
that are primarily vorbis audio. In either case, the vorbis at byte 29 
should be reliable.

> Also, I know it is off-topic for this list, but while I am at it, I'd 
> like
> to figure out other Ogg formats. I don't have Squish or Tarkin, but are
> these keywords also at byte 29 (0x1d)?

Technically, it's not at byte 29, it's '\000vorbis' starting at 27 plus 
the value of byte 26. That works out to 'vorbis' at byte 29 for all 
vorbis bitstreams. It's expected that tarkin will similarly have 
'tarkin' at a fixed initial offset. video/tarkin would be appropriate in 
that case.

Hope that helps,
  -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