[vorbis] retrieving "instant" bitrate without vo_open?

Ignacio Vazquez-Abrams ignacio at openservices.net
Sat Sep 22 22:01:20 PDT 2001



On Sun, 23 Sep 2001, safemode wrote:

> Ok, i'm getting values for packet->bytes   that looks something like this.
>
> 361
> 348
> 349
> 54
> 58
> 60
> 60
> 424
> 376
> 365
>
> Is that supposed to be the kilobit rate of the particular packet?  I question
> it because it's very very different from that of mp3 bitstreams.   If it's
> not and it's simply single bytes, then how would that equate to a bitrate,
> since it wouldn't be more than 4000 - 5000 bits per frame.  That sounds more
> wrong than my first guess.

Now that you have bytes per packet (which translates directly into bits per
packet - I'll let you guess how ;) ), you need to get samples per second and
samples per packet. Then you take samples per second and divide by samples per
packet to get packets per second (or more correctly, how long the packet is in
seconds). You then multiply this by the bits in the packet to get the bits per
second of the packet.


-- 
Ignacio Vazquez-Abrams  <ignacio at openservices.net>

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