Results 1 to 4 of 4

Thread: No Audio recorded from Flash in FLV

  1. #1
    Join Date
    Dec 2012
    Posts
    1

    Default 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

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    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

  3. #3
    Join Date
    May 2013
    Posts
    1

    Default

    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

    Quote Originally Posted by derekcuzie View Post
    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

  4. #4
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •