News:

Registered a URL and setup a forum as the IPCam stuff really needed its own site vs my irregular blog posts about IPCam hacking at http://www.computersolutions.cn/blog

Author Topic: embed ptz on website  (Read 21276 times)

January 26, 2013, 09:29:30 am
Hi all,
I would like to inbed the video and allow control of the PTZ on my website.
I have get the video to display but want to have the PTZ controls on the page too.

Can this be done ?

My cam is the Apexis J901-WS

The page I have made so far is:
http://www.g0hwc.com/security_camera.html

And advice or pointers please

Paul
England UK

  • ***
January 26, 2013, 11:55:03 am
Hi all,
I would like to inbed the video and allow control of the PTZ on my website.
I have get the video to display but want to have the PTZ controls on the page too.

Can this be done ?

My cam is the Apexis J901-WS

The page I have made so far is:
http://www.g0hwc.com/security_camera.html

And advice or pointers please

Paul
England UK

Please try this with your own camera. It requires no download or install first, to do so.

If it works with your IP Camera(s)? Then you can use it to embed one or more, IP Camera(s) into web pages. It shows a live demo of doing that as well ("Using a demo camera").

Please also be aware of one major issue that few people are aware of or talk about.

Many if not most IP Cameras have a finite limit on how many formally logged in concurrent connections they will support, at any given moment in time. Some IP Cameras have a maximum limit as small as 4 concurrent formally logged in connections, at one time.

It should be noted, that this generally includes any combination of the following, that will count as a formally logged in connection. Copies of the standard IP Camera interface running that comes with the camera, video streams ("Directly from the IP Camera to viewers and/or a streaming service or for recording") and many if not most 3rd party applications for the IP Camera.

So, as you can see. In many cases, it's easy to exceed this limit with only personal use, let alone, public access.

You can verify this limit and what it is for your IP Camera by creating copies any of the above things that qualify as a formally logged in connection, until your IP Camera refuses to grant you another connection until or unless one of the current connections is dropped.

Exceeding this limit can cause you the IP Camera owner to lose access to your IP Camera unless or until one of these connections becomes available. It also will deny website visitors to control and/or view your IP Camera. When this limit is reached.

While there are methods to avoid this maximum concurrent connection limit. Few developers/programmers currently, seem to be using them. This can defeat the purpose of making an IP Camera publicly available.

Here is an example of a free Interface, that avoids this maximum concurrent connections issue and works with any Internet browser capable device, running on any Operating System that is using any browser:

http://foscam.us/forum/free-generic-browser-interface-for-foscam-ip-mjpeg-cameras-t2522.html#p10970

Additionally. Most ISP Services have some formal maximum bytes per month limits. So you may wish to make sure you can control that as much as possible to avoid a possible ISP account suspension.

The above Interface allows you to throttle the FPS ("Frames Per Second") rate. Of course this may only be required, if the ISP service serving the IP Cameras output does have formal monthly maximum bytes per month limits.

Here is a modified example of the above Interface that in real-time calculates how many bytes during a 30 day period would be used if one person was viewing an IP Camera 24/7, during a 30 day period, at a specific FPS rate using a specific video resolution. Just to give you an idea of how many bytes could be used.

Please note, if there was more that 1 person viewing the IP Camera 24/7, at all given moments during that 30 day period at that FPS rate and video resolution, then the total would be Total_Bytes * number of concurrent viewers, during that 30 day period of time.

http://foscam.us/forum/free-generic-browser-interface-for-foscam-mjpeg-ptz-cameras-t2522-10.html#p11577

Don
« Last Edit: January 26, 2013, 12:20:40 pm by TheUberOverLord »

  • ***
January 26, 2013, 12:06:12 pm
Ah. I just noticed that you already have an older version of my free interface embedded in this web page, at the bottom, with controls:

http://www.g0hwc.com/security_camera.html

So does this work for you?

Don
« Last Edit: January 26, 2013, 12:16:57 pm by TheUberOverLord »

January 26, 2013, 12:21:07 pm
Hi Don,

Yes found your code and it works very well  :D
is there a way of adding zoom control ?

Paul

  • ***
January 26, 2013, 12:28:05 pm
Hi Don,

Yes found your code and it works very well  :D
is there a way of adding zoom control ?

Paul

Hello Paul,

Thanks.

Yes. I am about to release a new version in the next week, that supports optical zoom control, focus and aperture changes for IP Cameras that support any of those features. Like the other controls, you will be able to enable/disable them using the Interfaces configuration options.

As you know, there is already an infinite zoom option that is not using optical zoom. You can set the infinite zoom percentage as a configuration option ("For Others") so that each time you single left click on the video you zoom that percentage and to reset back to normal resolution, you double left click on the video. To disable infinite zoom, you simply use 0 ("Zero") as your ("non-optical") infinite zoom percentage.

Don
« Last Edit: January 26, 2013, 01:24:44 pm by TheUberOverLord »

  • ***
January 26, 2013, 12:41:13 pm
Here is some of the additional code that will be added to the Interfaces new release. You can try it now if you like and simply insert it where you wish and then delete the controls you don't want to show/use while waiting for the new release:

Code: [Select]
<div id ="Opticlens1" align="center">
<button type="button" onTouchStart="decoder_control_2(8)"  onTouchEnd="decoder_control_2(9)"  onMouseDown="decoder_control_2(8)"  onMouseUp="decoder_control_2(9)">Small Aperture</button>&nbsp;
<button type="button" onTouchStart="decoder_control_2(10)" onTouchEnd="decoder_control_2(11)" onMouseDown="decoder_control_2(10)" onMouseUp="decoder_control_2(11)">Large Aperture</button>&nbsp;
<button type="button" onTouchStart="decoder_control_2(12)" onTouchEnd="decoder_control_2(13)" onMouseDown="decoder_control_2(12)" onMouseUp="decoder_control_2(13)">Foscus Close</button>&nbsp;
<button type="button" onTouchStart="decoder_control_2(14)" onTouchEnd="decoder_control_2(15)" onMouseDown="decoder_control_2(14)" onMouseUp="decoder_control_2(15)">Focus Far</button>&nbsp;
<button type="button" onTouchStart="decoder_control_2(16)" onTouchEnd="decoder_control_2(17)" onMouseDown="decoder_control_2(16)" onMouseUp="decoder_control_2(17)">Zoom In</button>&nbsp;
<button type="button" onTouchStart="decoder_control_2(18)" onTouchEnd="decoder_control_2(19)" onMouseDown="decoder_control_2(18)" onMouseUp="decoder_control_2(19)">Zoom Out</button>&nbsp;
</div>

The actual release will have both a Opticlens1 and a Opticlens2 so that you can have these optical controls above and below the video ("As you can and have been able to do with the PTZ controls"), if you choose to enable that. So, if you want that now, please simply copy this "div" and give it a name of Opticlens2.

The logic behind doing this was that one can use both the infinite zoom and optical zoom at the same moments in time. So as the video image expands top or bottom controls may not be in the browsers window view without needing to scroll the browser window. By having the PTZ and optical controls in two places, it can be helpful when the video image becomes very large. Especially when using devices like phones or tablets, that may have a very small screen area as the video image expands.

Of course as you know, this is a configuration option of the Interface. So you can have the controls in one place or the other or in both places.

Don
« Last Edit: January 26, 2013, 01:12:40 pm by TheUberOverLord »

January 26, 2013, 01:24:15 pm
Many thanks Don,

added the zoom in and zoom out "they were back to front" so just changed the wording.
One other thing is the user timeout of 5 mins and send to another page don't seem to
be working on my page, unless I have made a error in my code ?

Paul

  • ***
January 26, 2013, 01:38:15 pm
Many thanks Don,

added the zoom in and zoom out "they were back to front" so just changed the wording.
One other thing is the user timeout of 5 mins and send to another page don't seem to
be working on my page, unless I have made a error in my code ?

Paul

You are very welcome.

Yes. There have been many fixes since version V1.5 was released, which is the version you are using.

The current release is V2.7

I suggest using the latest version, which is under the "Download your Free" copy here:

http://foscam.us/forum/free-generic-browser-interface-for-foscam-ip-mjpeg-cameras-t2522.html#p10970

I know it will be some work to redo this, but the version you are using is so old, it's hard to predict what other issues you will encounter without doing so.

I also suggest this because I can see that you have removed code for controls ("Example: SetPresets") yet some code left is still referencing what you removed vs. using the disable options in the configuration interface to disable controls, which is causing errors. So, upgrading to the current version will also help those issues as well.

Before deleting code for controls, please let me know. Because, there should be no reason to do so. Also, by doing that and creating errors in the interface can cause some browsers to have issues that are not as forgiving as other browsers are and can also lower your SEO scores as well.

Some search engines today, may not rank your website as high as it would have been ranked, if while crawling your website, that search engine notices errors while doing so.

Don
« Last Edit: January 26, 2013, 02:07:23 pm by TheUberOverLord »

January 26, 2013, 01:55:06 pm
Many thanks Don,

this link will not work here ?

Paul

  • ***
January 26, 2013, 01:56:53 pm
Many thanks Don,

this link will not work here ?

Paul

You are very welcome, what link Paul?

If you mean placing a link to the current version here? Since that changes from release to release. I want to keep that link in one place vs. updating the link in many places. Otherwise, I might then forget to update a link here or there when a new version is released.

Don
« Last Edit: January 26, 2013, 02:02:56 pm by TheUberOverLord »


  • ***
January 26, 2013, 02:09:26 pm
This one Don

http://foscam.us/forum/free-generic-browser-interface-for-foscam-ip-mjpeg-cameras-t2522.html#p10970


Paul

Hmmm. Foscam just recently made the topic a "Sticky" maybe that is impacting things. That link still works for me, even after clearing browser cache.

Please try this link:

http://foscam.us/forum/free-generic-browser-interface-for-foscam-ip-mjpeg-cameras-t2522.html

Don

January 26, 2013, 02:16:56 pm
Hi Don,

it seems that http://foscam.us cannot be accessed from the UK !
I just got someone else try to connect to it with no luck see attachment


Paul

Could you email it to me ?
http://www.g0hwc.com/email-me.html

  • ***
January 26, 2013, 02:22:49 pm
Hi Don,

it seems that http://foscam.us cannot be accessed from the UK !
I just got someone else try to connect to it with no luck see attachment


Paul

Could you email it to me ?
http://www.g0hwc.com/email-me.html

Here is the link. I will remove it later. Simply right click on the link below and choose "Save Target As":

Link Removed. Please go to the link above to get the current version of this free Interface.

Don
« Last Edit: January 26, 2013, 03:05:36 pm by TheUberOverLord »

January 26, 2013, 02:44:45 pm
Many thanks Don,

you can remove the file from your server now  :D

I have it all working now and the timeout now works with the re direct.

But in the bit :

var ShowChangePosition1 = "Y"; // *** Change This? *** Above Image Controls         *
var ShowChangePosition2 = "Y"; // *** Change This? *** Below Image Controls         *
var ShowHPatrol =         "N"; // *** Change This? ***                              *
var ShowVPatrol =         "Y"; // *** Change This? ***                              *
var ShowResMode =         "Y"; // *** Change This? ***                              *
var ShowBrightContrast =  "Y"; // *** Change This? ***                              *
var ShowGoToPresets =     "Y"; // *** Change This? ***                              *
var ShowSetPresets =      "N"; // *** Change This? ***                              *
var ShowFlip =            "N"; // *** Change This? ***                              *
var ShowIR =              "N"; // *** Change This? ***                              *
var ShowLeftRight =       "Y"; // *** Change This? ***                              *
var ShowUpDown =          "Y"; // *** Change This? ***   

The ones I have changed to "N" are still showing on the page?

so will it be ok if I just remove the parts of the code I don't want displayed ?

Paul