Skip to main content
Participating Frequently
August 16, 2013
Question

Audio capture using AMS Standard

  • August 16, 2013
  • 1 reply
  • 614 views

I'm trying to capture audio from a mic and save on an AMS server running AMS Standard.

I can make a connection without problems with "rtmp://server_name/live", but when I try to start recording audio with

  mic = Microphone.getMicrophone();

  mic.rate = 44;

  mic.gain = 100;

  mic.setSilenceLevel(0);

  try {

        nsPublish = new NetStream(nc);

        nsPublish.addEventListener(NetStatusEvent.NET_STATUS, netStatus);

        nsPublish.attachAudio(mic);

        nsPublish.publish("recordTest", "record");

   } catch(error:Error) {

       setStatus(error.toString());

       return;

   }

I get the following error: Application doesn't have permissions for server-side record/append of streams; access denied to stream recordTest.

Can anyone tell me why and how to fix it?

Thank you!

This topic has been closed for replies.

1 reply

Participating Frequently
August 19, 2013

Hi

For record, use rtmp://server_name/livepkgr instead of rtmp://server_name/live

Hope that helps

Karishma

afukadaAuthor
Participating Frequently
August 20, 2013

Ah, yes, that works! Thank you.

A follow-up question: When audio capture is stopped, how can the client program find out when all the audio data has been written to a file on the server. The client needs to know this to perform subsequent operations on the audio file.