Wowza Community

No Audio recorded from Flash in FLV

Title

Publishing a NetStream w/attached Camera and Microphone to a Wowza server, recorded FLV does not contain any audio.

Description

Problem Description:

When publishing a NetStream with attached Camera and Microphone to a Wowza server, the recorded FLV does not contain any audio.

Steps to Reproduce:

  • Camera Settings

cam = Camera.getCamera(name);

cam.setMode(1920,1080,30);

aspectRatio = 4/3;

cam.setMode(aspectRatio*400,400,30);

cam.setQuality(0,100);

  • NetStream Settings

setProfileLevel(H264Profile.MAIN, H264Level.LEVEL_3);

setQuality(0, 100);

cam.setMode(cam.width, cam.height, cam.fps);

  • Microphone Settings

public var codec:String = SoundCodec.SPEEX;

public var enableVAD:Boolean = true;

public var encodeQuality:int = 10;

public var framesPerPacket:int = 1;

public var silenceLevel:int = 0;

public var silenceTimeout:int = 500;

public var useEchoSuppression:Boolean = true;

public var enhancedOptions:MicrophoneEnhancedOptions = new MicrophoneEnhancedOptions();

Actual Result:

Can play recorded FLV with video only.

Expected Result:

Can play recorded FLV with video only and audio.

Any Workarounds:

Before publishing the stream, call

mic.setLoopBack(true);

mic.setLoopBack(false);

Test Configuration

My Hardware and Environment details:

Mac Air Mountain Lion

App Language(s) English

OS Language(s) English

Platform(s) MAC OS 10.7 (Lion)

Browser(s) Firefox 4.0

Take a look at the startCamera and publish methods in this example

private function startCamera():void
		{	
			// get the default Flash camera and microphone
			camera = Camera.getCamera();
			microphone = Microphone.getMicrophone();
			
			// here are all the quality and performance settings that we suggest
			camera.setMode(320, 240, 30, false);
			camera.setQuality(0, 90);
			camera.setKeyFrameInterval(60);
			
			
			
			
			microphone.rate = 11;
			microphone.setSilenceLevel(0);
			microphone.rate = 11;
			microphone.codec = SoundCodec.SPEEX;
			microphone.encodeQuality = 5;
			microphone.framesPerPacket = 2;
			
			
			subscribeName.text = "testing_ios";
			publishName.text = "testing";
		}
private function publish(event:MouseEvent):void
		{
			if (doPublish.label == 'Publish')
			{
				// create a new NetStream object for video publishing
				nsPublish = new NetStream(nc);
				
				var h264Settings:H264VideoStreamSettings = new H264VideoStreamSettings();
				//H264VideoStreamSettings = new H264VideoStreamSettings();
				h264Settings.setProfileLevel(H264Profile.BASELINE,H264Level.LEVEL_3);
				nsPublish.videoStreamSettings = h264Settings;
				
				nsPublish.addEventListener(NetStatusEvent.NET_STATUS, nsPublishOnStatus);
				
				// set the buffer time to zero since it is chat
				nsPublish.bufferTime = 0;
				
				// publish the stream by name
				nsPublish.publish(publishName.text);
				
				// add custom metadata to the stream
				var metaData:Object = new Object();
				metaData["description"] = "Chat using VideoChat example."
				nsPublish.send("@setDataFrame", "onMetaData", metaData);
				
				// attach the camera and microphone to the server
				nsPublish.attachCamera(camera);
				nsPublish.attachAudio(microphone);
				
				doPublish.label = 'Stop';
			}
			else
			{
				// here we are shutting down the connection to the server
				nsPublish.attachCamera(null);
				nsPublish.attachAudio(null);
				nsPublish.publish("null");
				nsPublish.close();
				
				doPublish.label = 'Publish';
			}
		}

Richard

Hey Richard,

Did you ever find a solution to this issue? I am having the same problem. Any help you could provide would be a life-saver.

-Chris

Title

Publishing a NetStream w/attached Camera and Microphone to a Wowza server, recorded FLV does not contain any audio.

Description

Problem Description:

When publishing a NetStream with attached Camera and Microphone to a Wowza server, the recorded FLV does not contain any audio.

Steps to Reproduce:

  • Camera Settings

cam = Camera.getCamera(name);

cam.setMode(1920,1080,30);

aspectRatio = 4/3;

cam.setMode(aspectRatio*400,400,30);

cam.setQuality(0,100);

  • NetStream Settings

setProfileLevel(H264Profile.MAIN, H264Level.LEVEL_3);

setQuality(0, 100);

cam.setMode(cam.width, cam.height, cam.fps);

  • Microphone Settings

public var codec:String = SoundCodec.SPEEX;

public var enableVAD:Boolean = true;

public var encodeQuality:int = 10;

public var framesPerPacket:int = 1;

public var silenceLevel:int = 0;

public var silenceTimeout:int = 500;

public var useEchoSuppression:Boolean = true;

public var enhancedOptions:MicrophoneEnhancedOptions = new MicrophoneEnhancedOptions();

Actual Result:

Can play recorded FLV with video only.

Expected Result:

Can play recorded FLV with video only and audio.

Any Workarounds:

Before publishing the stream, call

mic.setLoopBack(true);

mic.setLoopBack(false);

Test Configuration

My Hardware and Environment details:

Mac Air Mountain Lion

App Language(s) English

OS Language(s) English

Platform(s) MAC OS 10.7 (Lion)

Browser(s) Firefox 4.0

Try adding “cupertinostreamingpacketizer” to the Application.xml /LiveStreamPacketizers. Then test recording again. Then look at the access log, find where the stream was published (x-event “publish”) and take a look at the packetization messages. There is a ton of info about the video and audio codec. You will see if there was any audio and if so, details about the encoding.

Richard