zoneminder pictures on the web

Support and queries relating to all previous versions of ZoneMinder
Post Reply
lewis
Posts: 45
Joined: Mon Apr 03, 2006 11:41 pm
Location: Thessaloniki, Greece
Contact:

zoneminder pictures on the web

Post by lewis » Tue Sep 26, 2006 12:56 pm

hello all,

i have my zm box working flawlessly (connected to the internet), with some ip cameras (not connected to the internet).

i want to include in a web page a clickable still image from one ip camera, and when the user clicks a popoup windows shows ths stram (1fps).

i suppose i have to do it through zm urls, but how ???
Ye-Olde's Manor - http://ye-olde.net

User avatar
zoneminder
Site Admin
Posts: 5220
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder » Wed Sep 27, 2006 10:59 am

Assuming you only want to show the stream source and none of the ZM html page then you can just put a zms url like

Code: Select all

<img src="http://<your machine>/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=100&maxfps=1" alt="Camera 1" border="0" width="352" height="288">
in there. This is jpeg format so will only work for FireFox etc. Plus of course if you have authentication on then people will have had to have already logged in.
Phil

lewis
Posts: 45
Joined: Mon Apr 03, 2006 11:41 pm
Location: Thessaloniki, Greece
Contact:

Post by lewis » Wed Sep 27, 2006 1:28 pm

i try this:
http://asterix.ezhellas.com/cgi-bin/nph ... 0&maxfps=1

and i get a zero sized reply.
apache logs say:

194.145.127.66 - - [27/Sep/2006:16:23:25 +0300] "GET /cgi-bin/nph-zms?mode=jpeg&monitor=16&scale=100&maxfps=1 HTTP/1.0" 200 - "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; el; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7"

in /var/log/messages i cans see:
Sep 27 16:24:43 AsteriX zms[11000]: ERR [Unable to authenticate user]

is there any way to authenticate via the url ?
i cannot allow access to my zm box without authentication...
Ye-Olde's Manor - http://ye-olde.net

lewis
Posts: 45
Joined: Mon Apr 03, 2006 11:41 pm
Location: Thessaloniki, Greece
Contact:

Post by lewis » Wed Sep 27, 2006 1:50 pm

this url works, only if i authenticate first.. i get a stream in firefox..
with IE i get a slower stream..

http://asterix.ezhellas.com/zm/zm.php?v ... 0&control=

is there any way to avoid authentication, or to pass authentication to the url ?
Ye-Olde's Manor - http://ye-olde.net

jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK
Contact:

Post by jameswilson » Wed Sep 27, 2006 7:13 pm

add
&user=<username>&pass=<Password>
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk

lewis
Posts: 45
Joined: Mon Apr 03, 2006 11:41 pm
Location: Thessaloniki, Greece
Contact:

Post by lewis » Wed Sep 27, 2006 10:16 pm

jameswilson wrote:add
&user=<username>&pass=<Password>
i created a web page which contains:

Code: Select all

<img src="http://10.122.2.134/cgi-bin/nph-zms?mode=jpeg&monitor=16&scale=100&maxfps=1&user=guest&pass=guest alt="Camera 1 border="0" width="320" height="240">
<img src="http://10.122.2.134/zm/zm.php?view=watchfeed&mode=&mid=16&scale=100&control=&user=guest&pass=guest alt="Camera 1 border="0" width="320" height="240">
neither of them shows anything...
Ye-Olde's Manor - http://ye-olde.net

User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle
Contact:

Post by cordel » Wed Sep 27, 2006 10:30 pm

Are you creating a page viewable only on your internal network?
If not then you need your image source to be from your public domain.
Also consider that unless your using a browser that supports mjpeg, you have to use stills.

Regards,
Corey

Code: Select all

http://asterix.ezhellas.com/cgi-bin/nph-zms?mode=jpeg&monitor=1&scale=100&maxfps=1&user=guest&password=guest

lewis
Posts: 45
Joined: Mon Apr 03, 2006 11:41 pm
Location: Thessaloniki, Greece
Contact:

Post by lewis » Wed Sep 27, 2006 11:13 pm

i finally did it...

you can see the still images in front page at http://twmn.net
when you click the images, you can see the live stream..

camera is in place A.
Zoneminder is in place B.
Internet gateway is in place C.

all these places (A,B,C) are connected via our wireless network.
Place C, does nat to place B.

..and it Works ;)

Zoneminder rulezzzzzz...
:lol: :lol: :lol: :lol:
Ye-Olde's Manor - http://ye-olde.net

jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK
Contact:

Post by jameswilson » Thu Sep 28, 2006 8:03 am

Lewis, i have looked at your page in firefox, ie moans about language or something, but when i check path it states they are static images ie jpg1 etc, can you explain what you did?
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk

lewis
Posts: 45
Joined: Mon Apr 03, 2006 11:41 pm
Location: Thessaloniki, Greece
Contact:

Post by lewis » Thu Sep 28, 2006 11:17 am

jameswilson wrote:Lewis, i have looked at your page in firefox, ie moans about language or something, but when i check path it states they are static images ie jpg1 etc, can you explain what you did?
i run a cron job which gets the still images from the cameras every minute..
then, i use them as thumbnails for the links of the stream..

i live in a city with 1.2 mil people, we have a wireless network of 90 Access points, all connected between them, with multiple links.
so i have the ability to use a camera from an access point client, which is 10 miles away, without bandwidth problems..

a map of our network can be found here:
http://wind.twmn.net/index.php?page=nodes
blue dots are clients, red are the non-connected but interested..
i know, it seems greek to you ;)
Ye-Olde's Manor - http://ye-olde.net

jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK
Contact:

Post by jameswilson » Thu Sep 28, 2006 2:49 pm

impressive
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk

lewis
Posts: 45
Joined: Mon Apr 03, 2006 11:41 pm
Location: Thessaloniki, Greece
Contact:

Post by lewis » Fri Sep 29, 2006 12:22 pm

jameswilson wrote:impressive
one of the landmarks in Thessaloniki, is an old vyzantine tower, which was used as a prison called the White Tower (probably it was white 1000 years ago..)

i added a camera which shows this tower in our web page (http://twmn.net)..

all 3 cameras are intellinet, in monitor mode, and the load is 0.35-0.45
Ye-Olde's Manor - http://ye-olde.net

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests