ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.

All about Speex for flash
Posted On: 5/28/2009 4:56:34 AM

/ Views: 23822

Codec :Speex
Requirement:Flash Player 10 or above. Recomemded flash player version (10,0,22,87 ) or above.
Type:Open Source

What is speex :Speex is a new audio codec introduced in flash player 10 and above. It overcomes many limitations of old Nellymoser codec. This new codec will provide better audio quality using less bandwidth. Speex can be used for both kind of communication , through Flash Media Server or P2P.Speex is opensource so it can be decoded or converted to any format unlike nellymoser .
Speex Description:
Speex encoder and decoder are present in flash player 10 and above. Speex compression is controlled by setting encodeQuality. Encode quality can be set using 11 quality levels 0(Lowest) - 10(Highest).Default value is 6. Speex encoder for flash works in constant bit-rate (CBR) . Speex is designed for Voice over IP (VoIP) which means it provides high quality speech at low bit rate.

Speex vs NellyMoser comparison

P2P and Speex:
This codec can be used for P2P audio. For implementing P2P in application currently Adobe Labs Stratus beta service can be used which allow developers to begin building applications . The new protocol RTMFP and UDP can be used with Stratus only .Future version next to FMS 3.5 is likely to come with its support.

Code to use Speex in Flex AS3:

//Create netstream with your fms connection
ns = new NetStream(your fms connection here );

//Give file name stream and for recording pass record
ns.publish("testingSpeex", "record");
activeMic = Microphone.getMicrophone();

//set codec to speex to use codec as speex for audio
activeMic.codec = "Speex"

//rate from 0 to 10 are supported in Speex. 0 is lowest quality and 10 is the highest quality.
activeMic.encodeQuality = 6;

Speex Quality , Bandwidth and filesize table
Quality (encodeQuality) Required bandwidth in kbps Per minute file size in KB
0 3.95 28.9
1 5.75 42.1
2 7.75 56.7
3 9.80 (Acceptable) 71.7
4 12.8 93.7
5 16.8 123.0
6 20.6 (Good) 150.8
7 23.8 174.3
8 27.8 203.6
9 34.2 (Excellent) 250.4
10 42.2 309.0

Our Testing and Results: The encodeQuality for speex codec becomes quite usable from 4 (12.8kbps) although 3 can also be used for very low bandwidth requirements.It was also noticed that almost no processor overhead was there.So this codec will not add any load to applications requiring heavy processor.

Bug:It was found that the sound seemed to be very choppy and noisy for users more than 2. This bug is fixed in Flash Player 10,0,22,87 and above.Latest flash player is recomended

Members Login

Forgot Password

This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions