[Speex-dev] frame size for a given quality?

Steve Kann stevek at stevek.com
Mon Nov 1 10:03:27 PDT 2010


 It's in the manual:

http://www.speex.org/docs/manual/speex-manual/node10.html  (table 3 and 4).

However, if you're asking this, you're probably trying to do something
wrong, or the hard way.  You probably shouldn't be taking speex output,
and trying to "count bytes".   If you are using the API, then you will
just get the bits out, and then you'll know how many you have.

If you're trying to stream an existing stream of speex-encoded bits, then
it's pretty trivial to parse the stream.  I wrote something to do that a
long time ago (google speex_get_bits), though it may not do exactly what
you want.


On 11/1/10 10:44 AM, "Jeff Ramin" <jeff.ramin at singlewire.com> wrote:

>Thanks Steve.
>Is there a document anywhere that shows how many bytes/bits of data
>are produced by the speex encoding process for a given amount of time
>sampling rate and quality setting?
>On 11/01/2010 09:41 AM, Steve Kann wrote:
>> Jeff,
>>   RFC-5574 is standards-track:  http://tools.ietf.org/html/rfc5574  so,
>> while it's not an approved standard, it's more standardized than a lot
>> interoperable traffic on the internets these days.
>>   The RFC specifies packetization guidelines, which is basically that
>> put one or more frames in a packet, and then pad the rest with 0 bits
>> until you have a while number of octets.
>> -SteveK
>> On 11/1/10 9:55 AM, "Jeff Ramin"<jeff.ramin at singlewire.com>  wrote:
>>> I need to stream speex-encoded audio over RTP, which doesn't seem
>>> to be standardized yet, so I'm gonna roll my own code. I control both
>>> sending and receiving sides, so I can pretty much do what I want.
>>> I want each packet to contain 20ms worth of audio (sampled at 8KHz),
>>> and I'm encoding using a constant bit rate and quality:6.
>>> Q: how do I determine how many bytes of data go into each packet? I'm
>>> putting one frame (20 ms) into each packet.
>>> Thanks!
>>> -- 
>>> Jeff Ramin
>>> Software Engineer
>>> Singlewire Software
>>> 2601 W Beltline Hwy #510
>>> Madison, WI 53713
>>> Phone Direct - 608.661.1172
>>> www.singlewire.com
>>> _______________________________________________
>>> Speex-dev mailing list
>>> Speex-dev at xiph.org
>>> http://lists.xiph.org/mailman/listinfo/speex-dev
>Jeff Ramin
>Software Engineer
>Singlewire Software
>2601 W Beltline Hwy #510
>Madison, WI 53713
>Phone Direct - 608.661.1172

More information about the Speex-dev mailing list