Live Camera stream

Forum about hardware/software for the Philips Pronto TSU9600 and other remotes.

Moderator: hvxl

User avatar
TANE
Forum Moderator
Forum Moderator
Posts: 4806
Joined: Fri Apr 06, 2007 9:46 pm
Location: Netherlands
Contact:

Live Camera stream

Post 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
Bastiaan
Senior Member
Senior Member
Posts: 1257
Joined: Sat May 24, 2008 11:36 am
Location: Netherlands
Contact:

Live Camera stream

Post by Bastiaan »

Did you try:
username:password@192.xxxxxxx ?
User avatar
DMB
Member
Member
Posts: 136
Joined: Tue Jun 27, 2006 7:11 pm
Location: Netherlands

Live Camera stream

Post 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
User avatar
TANE
Forum Moderator
Forum Moderator
Posts: 4806
Joined: Fri Apr 06, 2007 9:46 pm
Location: Netherlands
Contact:

Live Camera stream

Post 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
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Live Camera stream

Post 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.
User avatar
TANE
Forum Moderator
Forum Moderator
Posts: 4806
Joined: Fri Apr 06, 2007 9:46 pm
Location: Netherlands
Contact:

Live Camera stream

Post by TANE »

Robert,
Thanks for your help.
I will send you the cam.
User avatar
Snelvuur
Forum Moderator
Forum Moderator
Posts: 3156
Joined: Fri Apr 06, 2007 11:01 pm
Location: Netherlands
Contact:

Live Camera stream

Post 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)
User avatar
TANE
Forum Moderator
Forum Moderator
Posts: 4806
Joined: Fri Apr 06, 2007 9:46 pm
Location: Netherlands
Contact:

Live Camera stream

Post by TANE »

URL line works fine.
authentication will pass correct

but not on the pronto
Digit
Global Moderator
Global Moderator
Posts: 3388
Joined: Sat Mar 25, 2006 10:23 am
Location: Netherlands
Contact:

Live Camera stream

Post 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]
User avatar
TANE
Forum Moderator
Forum Moderator
Posts: 4806
Joined: Fri Apr 06, 2007 9:46 pm
Location: Netherlands
Contact:

Live Camera stream

Post by TANE »

Sound good Robert..:)
victor321
Starting Member
Starting Member
Posts: 3
Joined: Sat Oct 18, 2008 9:38 pm
Location: Belgium

Live Camera stream

Post 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
User avatar
TANE
Forum Moderator
Forum Moderator
Posts: 4806
Joined: Fri Apr 06, 2007 9:46 pm
Location: Netherlands
Contact:

Live Camera stream

Post by TANE »

did you enable the option anonymous view on the 207?
Bwired
Administrator
Administrator
Posts: 4704
Joined: Sat Mar 25, 2006 1:07 am
Location: Netherlands
Contact:

Live Camera stream

Post 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
victor321
Starting Member
Starting Member
Posts: 3
Joined: Sat Oct 18, 2008 9:38 pm
Location: Belgium

Live Camera stream

Post 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?
victor321
Starting Member
Starting Member
Posts: 3
Joined: Sat Oct 18, 2008 9:38 pm
Location: Belgium

Live Camera stream

Post 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
Post Reply

Return to “Philips Pronto (TSU9600), IRtrans and other remotes”