I'm trying to stream just the audio from an IP camera. The camera I'm using (Amcrest) publishes the URL for the audio stream as:
http://ip/cgi-bin/audio.cgi?action=getAudio&httptype=singlepart&channel=1
I can put that in a browser and it pops up a basic url auth dialog and after entering creds it works. Unfortunately I tried the format:
http://userassword@ip/cgi-bin/audio.cgi?action=getAudio&httptype=singlepart&channel=1
Which doesn't seem to seemless auth in a browser. VLC (VideoLan app) seems to do a better job at it though - and I assume it's parsing it out and handling the auth behind the scenes.
The MediaPlayerStream type of the Audio library doesn't seem to have a way to pass in or set creds for basic auth on a URL. I took a long shot and maybe thought if I authenticated with an HTTPJob first then that would work - it didn't (thought I'd try anyway).
So is there anyway to authenticate against the streaming server and use MediaPlayerStream?
I guess as a harder workaround would be to get the raw bytes (the IP camera can encode as AAC or G.711A or PCM - my particular camera only supports the first 2 though). The web service returns:
HTTP Code:
20 0 OK
Content Type: Audio/G.711A
Body:
<Audio data>
<Audio data>
Saw I guess I could use that and pipe it to an AudioStreamer? I was hoping for a slightly easier solution. Also I need to see if audiostream supports AAC or G.711A encoding.
Any insight is appreciated.
Thank You!
http://ip/cgi-bin/audio.cgi?action=getAudio&httptype=singlepart&channel=1
I can put that in a browser and it pops up a basic url auth dialog and after entering creds it works. Unfortunately I tried the format:
http://userassword@ip/cgi-bin/audio.cgi?action=getAudio&httptype=singlepart&channel=1
Which doesn't seem to seemless auth in a browser. VLC (VideoLan app) seems to do a better job at it though - and I assume it's parsing it out and handling the auth behind the scenes.
The MediaPlayerStream type of the Audio library doesn't seem to have a way to pass in or set creds for basic auth on a URL. I took a long shot and maybe thought if I authenticated with an HTTPJob first then that would work - it didn't (thought I'd try anyway).
So is there anyway to authenticate against the streaming server and use MediaPlayerStream?
I guess as a harder workaround would be to get the raw bytes (the IP camera can encode as AAC or G.711A or PCM - my particular camera only supports the first 2 though). The web service returns:
HTTP Code:
20 0 OK
Content Type: Audio/G.711A
Body:
<Audio data>
<Audio data>
Saw I guess I could use that and pipe it to an AudioStreamer? I was hoping for a slightly easier solution. Also I need to see if audiostream supports AAC or G.711A encoding.
Any insight is appreciated.
Thank You!