Problem listening audio Nellymoser 8k in Linux and Mac OS
I have a audio streaming problem, is there anyone that can help me ?
If I publish using an Adobe Flash Media Encoder 2.5 or a normal client a netstream with codec NellyMoser at 8Khz, the audio stream is incomprehensible for a MAC OS or a Linux Adobe Player.
Steps to reproduce:
1. Create a new Actionscript Project in Flex Builder, for example: AdobeBug.
2. Start a Flash Media Server 3.5 in localhost (rtmp://localhost/live).
3. Insert the following code in the Default Application file: AdobeBug.as
package {
import flash.display.Sprite;
import flash.events.NetStatusEvent;
import flash.media.Microphone;
import flash.net.NetConnection;
import flash.net.NetStream;
public class AdobeBug extends Sprite
{
public var nc:NetConnection;
public var ns:NetStream;
public var mic:Microphone;
public function AdobeBug()
{
nc = new NetConnection();
nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
nc.connect("rtmp://localhost/live");
nc.client = new CustomClient();
}
private function netStatusHandler(event:NetStatusEvent):void
{
switch (event.info.code)
{
case "NetConnection.Connect.Success":
trace("Congratulations! you're connected");
publishLiveStream();
break;
case "NetConnection.Connect.Rejected":
trace ("Oops! the connection was rejected");
break;
case "NetStream.Play.Stop":
trace("The stream has finished playing");
break;
case "NetStream.Play.StreamNotFound":
trace("The server could not find the stream you specified");
break;
case "NetStream.Publish.Start":
break;
case "NetStream.Publish.BadName":
trace("The stream name is already used");
break;
}
}
private function publishLiveStream():void {
ns = new NetStream(nc);
ns.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
ns.client = new Object();
mic = Microphone.getMicrophone();
mic.setSilenceLevel(0);
mic.rate = 8;
//mic.codec = SoundCodec.NELLYMOSER;
//trace(mic.codec);
if (mic != null){
ns.attachAudio(mic);
ns.publish("livestream", "live");
}
else {
trace("Please check your camera and microphone");
}
}
}
}
class CustomClient {
public function onBWDone():void {}
}
4. Compile and play the file.
5. Run the Adobe Flash Media Administration Console and play the stream named livestream using a Linux or a Mac OS system, but not a Windows system. This stream should be a Nellymoser audio at 8KHz.
Playback starts, but audio is unintelligible in Linux and Mac OS Adobe Flash player.
TYIA.
Note.
Doesn't happen if I listen the stream using a Adobe Flash Player plugin or a Flash Media Administration Console for Windows systems.
