[speex-dev] frame size

Tom Grandgent tgrand at canvaslink.com
Tue Dec 9 10:06:06 PST 2003



Joost Witteveen (joost at iliana.nl) wrote:
> 
> So, each UDP package with 20 bytes speex-data, we send:
> 
> 20 bytes speex
> 12 bytes ogg headers (and others?)
> 28 bytes UDP/IP headers (2 IP numerbers, 2 portnumbers, checksum, etc, etc)
> 
> and, if it goes over the phone, each package has a few ppp headers.
> 
> Am I overlooking something, or does this fixed frame size mean that
> the "8kbps" in reality means at least 24kbps?
> 
> Or is there something ohphone/gnomemeeting/etc can/should do to
> put more than one fram inside each UDP package?

Er, why would you be sending ogg headers in a VoIP scenario?  That's 
needless overhead.  Check out the Speex RTP format document at http://www.speex.org/drafts/draft-herlein-speex-rtp-profile-00.txt.  
Figure 1 and sections 3.2 and 5 show how to send multiple frames 
per packet.

In my VoIP program, I use my own protocol (for now) and each 
packet currently works out like this:

~5 bytes - PPP
20 bytes - IP
 8 bytes - UDP
 1 byte  - sequence number (my own)
~40-300 bytes - 4 Speex frames (VBR quality 6, wideband)

I send at a rate of 12.5 packets per second, putting 4 Speex frames 
in each packet.  This gives a total bandwidth usage of approximately 
7.4kbps to 33.4kbps, which I think is pretty good for high quality 
wideband, and it works on a dialup modem.

Anyway, putting just one frame in a packet is definitely going to 
kill you with packet overhead!  You have to compromise on latency.  
The frame size that Speex uses is small enough that you still have a 
fair amount of flexibility in determining how many samples you want 
to put in each packet.

Tom
--- >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 'speex-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 Speex-dev mailing list