[vorbis] Reading Encoder version from encoded files

Beni Cherniavksy cben at techunix.technion.ac.il
Tue Sep 25 07:47:03 PDT 2001



On Thu, 20 Sep 2001 volsung at asu.edu wrote:

> On Thu, 20 Sep 2001, Magnus von Koeller wrote:
>
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > On Thursday 20 September 2001 11:51, you wrote:
> > > On Thu, Sep 20, 2001 at 10:44:43AM +0200, Magnus von Koeller wrote:
> > > > -----BEGIN PGP SIGNED MESSAGE-----
> > > > Hash: SHA1
> > > >
> > > > Hi,
> > > >
> > > > is there a way to read the encoder version from encoded .oggs? If yes,
> > > > what's the easiest way to do it?
> > >
> > > in unix:
> > > ogginfo file.ogg (see version, but it only reports `0' :/)
> >
> > Is there a way to make this work?
>
> I don't know what the version number means, but if you use the current CVS
> version of ogginfo, it will display the vendor string, from which you can
> deduce the encoder that was used.
>
There are two version 0 numbers that appear in vorbis file that I'm aware
of.  The first at the 5th (starting from 1) byte of each page (just after
the `OggS' capture pattern) is the revision of the Ogg framing format.
See  http://www.xiph.org/ogg/vorbis/doc/framing.html  for details.

The second is a 32-bit integer starting at the 8th byte of each packet
(just after the `\x01vorbis',`\x03vorbis' or `\x05vorbis' packet header),
which means it appears for the first time from the 36th byte of the file.
This is the Vorbis packet format's revision.  See `lib/info.c' in the
vorbis source for details.

Since both Ogg and Vorbis formats are frozen, you won't see anything
but zeros at these fields.  If you do you have encountered an ogg or
vorbis version that has not been invented yet :).  The tools will most
probably refuse to work on such files.

The version info of the encoder (and not the format) is at the vendor
string, as has already been said.


-- 
Beni Cherniavsky <cben at tx.technion.ac.il>
                 (also scben at t2 in Technion)

--- >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-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 mailing list