Page 1 of 3

Live Camera stream

Posted: Thu Oct 02, 2008 10:41 pm
by TANE
Hi All,
I have new IP camera Y-cam black
It's a camera with lot of options, qualitiy is almost the same as the Axis 207
This camera has IR leds for night view what makes it more usable for the kids room.

Support for MPEG-4, MJPEG,3GPP for mobile viewing.
I did some testing with 3GPP it's working on my HTC Diamond.

Only one problem...
You can't access the camera anonymous.
I need this option for the Pronto
Did someone find out how the username and password also can be built in the pronto script for camera access?

camera url
192.168.1.113/stream.jpg

Image

Live Camera stream

Posted: Thu Oct 02, 2008 10:52 pm
by Bastiaan
Did you try:
username:password@192.xxxxxxx ?

Live Camera stream

Posted: Thu Oct 02, 2008 10:53 pm
by DMB
Chak,

I don't know how to do it in the pronto but I use the following code in homeseer to preset a camera on the Axis 2400 Videoserver using username and password.
The trick is done by the SetCredentials.

Sub main()
DIM Command
DIM Camera
DIM PresetName

Camera = "2"
PresetName= "voordeur"

Command = "http://11.1.2.123:1234/axis-cgi/com/ptz ... resetname=" & Presetname & "&camera=" & Camera
Set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
Call objHTTP.Open("GET", Command, FALSE)
Call objHTTP.SetCredentials ("username", "password", 0)
objHTTP.Send
end sub

DMB

Live Camera stream

Posted: Thu Oct 02, 2008 11:13 pm
by TANE
@zebrafilm in the pronto script you can only change the IP
I'm using the described option for the Jon00 touch screen..works fine.
also using this for the netcamplugin.


@DMB
Pronto script for camera access is about 1000 lines of code...:(
I did some changes..but no success
IP address and camera name is added via another file.

line 782 is the line for the stream..

uploaded/Chak/2008102231019_prontocam.txt

Live Camera stream

Posted: Fri Oct 03, 2008 12:11 am
by Digit
Chak,

HTTP Authentication is something completely different then just changing IP in the Prontoscript.[:(] The script you have does a minimal GET, and IIRC you'll get back a 401 status code (with some extra information) from the webserver. With that you should construct a second GET with extra lines that provide userid/password to the server.

As long as all that is necessary can be done in Prontoscript, it should be able to make something for this. I think it can be done, but have no Y-cam... if you can have yours for a few days, i think we can tackle this issue.

Just let me know what you think.

Live Camera stream

Posted: Fri Oct 03, 2008 9:29 am
by TANE
Robert,
Thanks for your help.
I will send you the cam.

Live Camera stream

Posted: Fri Oct 03, 2008 1:14 pm
by Snelvuur
dunno the exact line, but did you try the http://username:password@url/strea.jpg? that normally works with popup authentication windows.

// Erik (binkey.nl)

Live Camera stream

Posted: Fri Oct 03, 2008 5:11 pm
by TANE
URL line works fine.
authentication will pass correct

but not on the pronto

Live Camera stream

Posted: Fri Oct 17, 2008 9:27 pm
by Digit
I've been playing with a userid/password protected video server. It's an Aviosys 9100A. First thing i did was looking at the traffic between IE and the Aviosys. Basically it looks like this:
The first GET (stripped down to the most essential stuff):

Code: Select all

GET / HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, blablabla
 */*
Accept-Encoding: gzip, deflate
Host: aviosys
Then the Aviosys comes back with this response:

Code: Select all

HTTP/1.0 401 Unauthorized
WWW-Authenticate: Basic realm="Camera Server"
Content-Type: text/html
I get the popup, fill in userid/password and my browser sends:

Code: Select all

GET / HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg
Authorization: Basic cm9iZXJ0Omhla2tlcnM=
Host: aviosys
Now that's where we can find the key: the string "cm9iZXJ0Omhla2tlcnM=" is Base64 encoding for "robert:hekkers", being my userid and password separated by a ":".
Now Javascript (Prontoscript) doesn't have Base64 encoding onboard, but a small script is very easy to find:

Code: Select all

// This code was written by Tyler Akins and has been placed in the
// public domain.  It would be nice if you left this header intact.
// Base64 code from Tyler Akins -- http://rumkin.com

var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";

function encode64(input) {
   var output = "";
   var chr1, chr2, chr3;
   var enc1, enc2, enc3, enc4;
   var i = 0;

   do {
      chr1 = input.charCodeAt(i++);
      chr2 = input.charCodeAt(i++);
      chr3 = input.charCodeAt(i++);

      enc1 = chr1 >> 2;
      enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
      enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
      enc4 = chr3 & 63;

      if (isNaN(chr2)) {
         enc3 = enc4 = 64;
      } else if (isNaN(chr3)) {
         enc4 = 64;
      }

      output = output + keyStr.charAt(enc1) + keyStr.charAt(enc2) + 
         keyStr.charAt(enc3) + keyStr.charAt(enc4);
   } while (i < input.length);
   
   return output;
}
So i think all ingredients to make it work on the Pronto are available.[8D]

Live Camera stream

Posted: Fri Oct 17, 2008 10:31 pm
by TANE
Sound good Robert..:)

Live Camera stream

Posted: Sat Oct 18, 2008 10:00 pm
by victor321
Hello,

Can someone help me with a .xcf file to view images from a Axis 207 IP camera? I tried for days but don't get any result :-(

Pronto 9600 user

Live Camera stream

Posted: Sat Oct 18, 2008 10:35 pm
by TANE
did you enable the option anonymous view on the 207?

Live Camera stream

Posted: Sat Oct 18, 2008 11:48 pm
by Bwired
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by victor321</i>
<br />Hello,

Can someone help me with a .xcf file to view images from a Axis 207 IP camera? I tried for days but don't get any result :-(

Pronto 9600 user
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">this topic should work for Axis http://www.domoticaforum.eu/topic.asp?TOPIC_ID=713

Live Camera stream

Posted: Sun Oct 19, 2008 7:10 pm
by victor321
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by Chak</i>
<br />did you enable the option anonymous view on the 207?

Live Camera stream

Posted: Sun Oct 19, 2008 7:24 pm
by victor321
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by Bwired</i>
<br /><blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by victor321</i>
<br />Hello,

Can someone help me with a .xcf file to view images from a Axis 207 IP camera? I tried for days but don't get any result :-(

Pronto 9600 user
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">this topic should work for Axis http://www.domoticaforum.eu/topic.asp?TOPIC_ID=713