[vorbis-dev] Header

Michael Smith msmith at labyrinth.net.au
Fri May 12 07:22:22 PDT 2000



At 07:40 PM 5/12/00 +0930, you wrote:
>Hi,
>
>> Docs are incomplete; rather, the docs for the Ogg bitstream structure are
>> there, but not yet the Vorbis stream type.  It's not complicated, just not
>> written.
>
>If you could provide me with brief details on the location/encoding of
>the info within the files, I can get started writing the PHP script I need
for
>this to add OGG support to AudioPhilez.

Vorbisfile is pretty easy to use, and gives you all this info (and more) -
using this is going to be an order of magnitude easier than extracting the
data directly, even if there WERE proper stream-level documentation. 

>
>> However, the Vorbisfile lib gives you all the functionality you mentioned 
>> right now.  I'll give more details tomorrow (I'm just about to head off to 
>> sleep).
>> 
>
>Is the source for this easy enough to understand? I'm hardly
>an accomplished C/C++ programmer but if it is straightforward enough
>and commented, I should be able to get something happening in PHP.
>

Is there a way to interface PHP to a (binary) library, like python, perl,
and most other interpreted languages provide? If so, using this with
vorbisfile is definately the way to go. Vorbisfile itself is pretty easy to
understand, and it's straightforward, but it isn't standalone - it uses the
core libvorbis, which is... difficult - certainly NOT something you'd want
to do with PHP (I know from bitter experience that PHP makes some stuff
relatively difficult). 

Most of the code is commented to some extent - there's enough info there to
pull out what you need, but it'd be a pretty major task at this point.
Basically, the problem is that you can't just search to some fixed point to
read the data, you would need to do full ogg bitstream parsing (which is
itself reasonably complex if you're dealing with it properly, including
chained bitstream support) to find the appropriate framing data, THEN
partial vorbis stream decoding to find the specific data.

If you do have to do it this way, the places to start looking are
vorbisfile.c (this is a higher-level interface, it's pretty easy to
understand), then framing.c and the ogg bitstream docs (in are in the docs/
directory), and then on to where the specific bits that you want are
(mostly these will be in the header packets or at the ogg bitstream level).
All of this is fairly clear and understandable - but there is a LOT of it
to get through.

Michael

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/



More information about the Vorbis-dev mailing list