[vorbis] file(1) magic for Ogg Vorbis

Beni Cherniavsky scben at techst02.technion.ac.il
Sun Jun 17 02:40:53 PDT 2001


I downloaded `file' for djgpp, and it verbosly identified my mp3 by
bitrate, sample rate, mono/stereo, option bits, etc.  WAVs are also
uidentified well.  Only vorbis was identified simply as "Ogg-Vorbis
compressed sound file" without any info.  So I decided I must fix this to
replace my aliases that use `od' to read the bitrate and number of
channels.

Here is the result (attached).  I need your feedback before sending to the
maintainer <christos at astron.com>:

- Magic:
  + I currently check for Ogg framing of the first page and vorbis headers
on first and second packets (which are also separate pages).  Should I
check less/more?
    * Partial recognition is possible, i.e. Ogg but not vorbis, or first
vorbis header but no comment header.  What should be printed then?  I
should probably fix it to print "Ogg data" not just "Ogg" in case it's not
vorbis.
  + I verify the ogg reverion and the encoder version to be 0.  Should I?
Is the encoder version checked at the right place at all (first thing
after `\x01vorbis', before the number of channels)?

- I report way too much for the average user.  What would you like too
see?  I guess the following should be commented out (but left there for
somebody needing it to turn on):
  + The "revision 0" and "version 0" messages (the normal case).
  + Serial number - does anybody care?
  + The heavy vendor string, probably only the beta number should be
printed (exact cvs date?).
  + The "no comments" message (but leave the "%lu comments" for >0).

- Are the beta dates correct?  What was beta1's date?  Any other releases
you wish to identify?  (I will maintain the entry to track future
releases.)

- Is anything else possible to detect (for the fun of it)?


-- 
Beni Cherniavsky <cben at crosswinds.net>
                 (also scben at t2,cben at tx in Technion)

PS: The magic(4) format has probably been designed for viewing in email
readers that highlight quotations ;-)



<HR NOSHADE>
<UL>
<LI>TEXT/PLAIN attachment: magic.txt
</UL>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: magic.txt
Type: application/octet-stream
Size: 2077 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/vorbis/attachments/20010617/bc1f3539/magic.obj


More information about the Vorbis mailing list