
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.
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 a fms connection first
ns = new NetStream(your fms connection here );
//Give name to file and record
ns.publish("testingSpeex", "record");
activeMic = Microphone.getMicrophone();
//set codec to speex
activeMic.codec = "Speex"
//rate from 0 to 10 are supported in Speex. 0 is lowest quality.
activeMic.encodeQuality = 6;
ns.attachAudio(Microphone.getMicrophone());
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 | 71.7 |
| 4 | 12.8 | 93.7 |
| 5 | 16.8 | 123.0 |
| 6 | 20.6 | 150.8 |
| 7 | 23.8 | 174.3 |
| 8 | 27.8 | 203.6 |
| 9 | 34.2 | 250.4 |
| 10 | 42.2 | 309.0 |