PTZ control for visitors

Tralapo

n3wb
Joined
Dec 6, 2014
Messages
12
Reaction score
0
Hello,

I'm streaming several Hikvision camera's to a website, using Wowza and JWPlayer. I think most of you people will know the drill. I found it hard to find the right rtsp adresses the first time, I would say it's strange that it's not mentioned in the User Manual?

But now, for the first time, I'm using a PTZ camera. I'm going to stream that in the same way. It's the Hikvision DS-2DF5284. But I've got a question and I can't seem to find the right answer. Is it possible to provide a few links on the website, below the stream, that makes the camera go to a preset? For example like this: http://hdtv.webcam.nl/dam/

Is there someone around here that knows the answer?
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
I dont know the Hikvision URL's but for Dahua its like this:

Code:
/cgi-bin/ptz.cgi?action=start&channel=0&code=GotoPreset&arg1=0&arg2=1&arg3=0
arg2=1 takes it to preset #1, arg2=10 takes it to preset #10

im sure a lil googlefoo will find what your looking for, this stuff isint in the manual because these are OEM products not really intended for direct to consumer sales.. you as an end user are not intended to know this stuff as its thought your installer is the one who should be handling it... now of course this leaves us DIYers with little recourse but to create a community like this where we can share our experience/knowledge and create a living manual of sorts.
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
and to top it off that camera you linked is using a wrapper, he has a PHP file hosted on the site with the player and visitors give that PHP file a command, and it in turn connects to the camera and makes the request.. allowing you to prevent visitors from having direct access to the camera.. that wrapper might be doing more aswell, like making requests wait for a timeout before the next one... so a bot cant put the camera in perpetual motion.
 

Tralapo

n3wb
Joined
Dec 6, 2014
Messages
12
Reaction score
0
and to top it off that camera you linked is using a wrapper, he has a PHP file hosted on the site with the player and visitors give that PHP file a command, and it in turn connects to the camera and makes the request.. allowing you to prevent visitors from having direct access to the camera.. that wrapper might be doing more aswell, like making requests wait for a timeout before the next one... so a bot cant put the camera in perpetual motion.
Yes, and it isn't an Hikvision camera either. That's why it's an example of what I mean: the links under the image. Offcourse I understand it has to be something with PHP or Javascript, as every site I see something like that (EXAMPLE) does that.

I searched the internet for it, but I can't find how to do this with Hikvision camera's. That's why I tried to ask you guys... There must be some kind of link or something like you mention in your other answer for Hikvision to. And a link like that can be handled with PHP or Javascript.

But the problem is I just can't find any information about how to do that. It will turn out to be a simple trick, but you have to find it first...
 

Tralapo

n3wb
Joined
Dec 6, 2014
Messages
12
Reaction score
0
Hikvision do publish some development materials - though I'm not sure if it can be applied across all models.
Maybe this would provide some ideas:
http://www.hikvisioneurope.com/portal/index.php?dir=Integration and Development Materials/00 CGI/
I feel stupid I didn't find this manual over there. It looks like the one I need, thanks!

[COLOR=#3E3E3E said:
TheUberOverLord[/COLOR]]Live example of Foscam IP Camera doing same. Without exposing anything about the IP Cameras location or User credentials:

http://107.170.59.150/foscam/SecureI...I9826W-2US.htm

If you really want to get fancy? ("Same live IP Camera as above. Different way to present it. As above, also securely.")

Live IP Camera example using multiple Logos/Images, Custom Text, Date/Time and Camera Controls. The "Request More Info" Logo/Image button accepts a click or a touch on that Logo/Image button alone and the other Logos/Images or IP Camera viewing area is not clickable and Logos/Images stay where they are, when the IP Camera viewing area is moved or zoomed:

http://107.170.59.150/foscam/SecureI...6W-2USLogo.htm

The same secure concepts and methods can be used for multiple IP Cameras on the same webpage. Here is a live example of 14 different IP Cameras:

http://107.170.59.150/foscam/FoscamUS.htm
Don, you're amazing. Thank you for your clear answer and examples. Exactly what I need and I will try to work it out for Hikvision now. Time for some DIY!

1. No easy bandwidth control when personally hosting full-motion video. For any monthly maximum ISP limits at IP Camera location(s).

2. Live full-motion video from IP Cameras generally, even when being fed by live video streaming services. Is not compatible with any/all Internet browser capable devices accessing the webpage displaying the IP Camera(s) that your visitors may be using or may require them to first download/install additional software. Before being able to view your IP Cameras.
In The Netherlands we don't have things like ISP limits, so that's no problem at all. I also have a few sites running with non-PTZ Hikvision camera's allready and made them ready for almost all browsers and mobile devices. So that's not a problem.

Thank you very much!
 

Tralapo

n3wb
Joined
Dec 6, 2014
Messages
12
Reaction score
0

Tralapo

n3wb
Joined
Dec 6, 2014
Messages
12
Reaction score
0
I did download your tool just now, but it doesn't seem to work for me. Can't get an image.
 

Tralapo

n3wb
Joined
Dec 6, 2014
Messages
12
Reaction score
0
Please check your server error logs. It's possible that the outbound port for your camera is currently being blocked by your hosting service. For Curl access.

From what I quickly read in the Hikvision CGI documentation the requests require basic authorization. So you may need to use in your URL:

http://User:Passsword@CGICommand vs. http://CGICommand

Don
You're right about the URL. It's actually http://user:password@ip:port/streaming/channels/id/picture. Entered that in the php file.

I'm my own hosting service. Error logs empty.
 

Tralapo

n3wb
Joined
Dec 6, 2014
Messages
12
Reaction score
0
I assume then, you are seeing your IP Cameras images?

If so. You can now try http://YourWebSite/SecureImageDisplay.htm to see those IP Camera images auto-refresh as an example.

Don
No, nothing. Just the "broken image" thing from Chrome.

But it doesn't matter, won't use it anyway. I was just curious if/how it would work. Turns out it doesn't.

About your previous, again edited, post: When accessing SecureImageDisplay.php I just see the "Acces Denied" image.
 

Tralapo

n3wb
Joined
Dec 6, 2014
Messages
12
Reaction score
0
You must have uncommented one of these lines:

Code:
#include("RestrictToSecureImageDisplayLogin.php");
#include("RestrictToSecureImageDisplayHtm.php");
They both need to have a leading # as shown above, otherwise they will check for unauthorized access.

Don
You don't have to tell me every single line of text that is included in your manual. I can read.
 

Tralapo

n3wb
Joined
Dec 6, 2014
Messages
12
Reaction score
0
I would check what's going on with your IP Camera. Because the SecureImageDisplay.htm HTML works just fine. Once a Image loads from your IP Camera. 10 Milliseconds later. It will attempt to load another image. If it fails, it will delay 5 seconds and try again. It will continue to do this, until it is closed.

Don
Well, if I type in the camera's picture URL like i entered in the .php I get an fresh image, so that's not the problem. But in your system, it doesn't work.

But, as said before: never mind. I'm not going to use it anyway, because I'm streaming video, not snapshots.
 

Tralapo

n3wb
Joined
Dec 6, 2014
Messages
12
Reaction score
0
These concepts and methods are being used by thousands of people. Using many different brands and models of IP Cameras and they are very stable:

http://foscam.us/forum/general-discussion-f2.html

So. It's not something wrong with my "system". If you want help I can help you. If not, fine as well.

Don
It's not working for me. But, thanks for your time.

I've got an media-server in place that streams livestreams from my camera's to several websites. So I'm using realtime video, not refreshing snapshots. I was just curious if I could make your system work for Hikvision, but it looks like it doesn't.
 
Top