[vorbis-dev] two questions re vorbisfile API

Thomas Vander Stichele thomas at urgent.rug.ac.be
Mon Oct 28 09:14:07 PST 2002



Hey guys,

currently wrapping my head around the vorbisfile API.  The stream callback 
interface is really nice ! Great work.

I'm running into two snags using it though.

a) getting ov_bitrate on a seakable stream returns a long.
When I print it as %ld, I get
Bitstream is 2 channel, 44100 Hz, 0 version, -2147483648 bitrate

I get this same number for any vorbis file.
I checked them with ogginfo, and that reports the right ABR.
Am I missing something ?

Calculating it manually by dividing total bits through total time gives 
me a near-accurate value :

abr: 194184 bits/sec

ogginfo reports, for this file:

Nominal bitrate: 192.000000 kb/s
Upper bitrate not set
Lower bitrate not set
User comments section follows...
        ARTIST=Idlewild
        ALBUM=The Remote Part
        TITLE=You Held The World In Your Arms
        TRACKNUMBER=1
        QUANTAUDIO=R:13363-T:1.05:201.48:201.91
Vorbis stream 1:
        Total data length: 4875041 bytes
        Playback length: 3m:21s
        Average bitrate: 193.160180 kbps
Logical stream 1 ended

Why is there a slight difference between the two values ?

b) 
ov_bitrate interprets "link == -1" as "the entire bitstream"
ov_comment interprets "link == -1" as "the current bitstream"

why the different behaviour ? Is there a reason behind this ?

c) am i correct in assuming that each logical bitstream in the phyiscal 
one can contain at most one COMMENT tag ?

Thanks,
Thomas

<p>
-- 

The Dave/Dina Project : future TV today ! - http://davedina.apestaart.org/
<-*- thomas (dot) apestaart (dot) org -*->
Come on baby take a walk with me honey
Tell me who do you love
Who do you love
<-*- thomas  (at) apestaart (dot) org -*->
URGent, the best radio on the Internet - 24/7 ! - http://urgent.rug.ac.be/

<p>--- >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