Copy link to clipboard
Copied
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!
Copy link to clipboard
Copied
Hi
For record, use rtmp://server_name/livepkgr instead of rtmp://server_name/live
Hope that helps
Karishma
Copy link to clipboard
Copied
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.