0

Hi,

I'm trying to capture an audio stream from Axis IP camera. The audio data encoded as g.711 should be captured from the camera. I'm using the following http request:

Stream roughStream = null;
string URLaudio = "http://5.123.220.228/axis-cgi/audio/receive.cgi?httptype=singlepart";

request = (HttpWebRequest)HttpWebRequest.Create(URLaudio);
request.Credentials = new NetworkCredential("admin", "password");

request.Method = "GET";
audioResponse = (HttpWebResponse)request.GetResponse();

roughStream = audioResponse.GetResponseStream();

However, I am getting that audioResponse has ContentLength equal to -1, (meaning that either I'm not getting the data at all, or it cannot read the stream beacuse of something (stream too long?!?).

I am guessing that camera is sending a continuous stream of packets (at least this is what is said in Axis manual). However, I don't know how to capture and read (I mean decode and play) data stream from the camera.

Is there a way to read stream of g.711 encoded audio with some built in Windows api?

Any suggestions how to do this?


Many thanks!

2
Contributors
2
Replies
5
Views
6 Years
Discussion Span
Last Post by micka10
0

Hi,

I've already looked into this example, but it seems that it explains how to capture images from the camera (which I already do) and not how to capture AUDIO.

It seems that once I send the Http request to the camera, the camera starts to send the data packets (i hope these are the audio packets) but I don't now how to play them.

I guess that I need to have decoder in order to decode data..
What would be the best option for playing g.711 encoded data?

I'm using Windows XP.

Thanks!

Take a look at CodeProject article - http://www.codeproject.com/KB/audio-video/cameraviewer.aspx

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.