Including ZoneMinder livestream in external website

Forum for questions and support relating to the 1.30.x releases only.
Locked
FXZone
Posts: 5
Joined: Wed Jun 14, 2017 5:53 am

Including ZoneMinder livestream in external website

Post by FXZone »

Hello,

is it possible to access the "converted" zoneminder livestream of a camera in an external website?
My cam is a h.264 and is is connected using ffmpg to zoneminder.
I like to use the converted stream, live in the monitor view, in an external website.
Is it possible?
I tried the adress of the stream in the monitor view , without success http://xxx.ccc/zm/cgi-bin/nph-zms?mode= ... yyyyyyyyyy

Any Ideas?

Regards,

FX
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Including ZoneMinder livestream in external website

Post by bbunge »

Check the WIKI. This has been covered before!
FXZone
Posts: 5
Joined: Wed Jun 14, 2017 5:53 am

Re: Including ZoneMinder livestream in external website

Post by FXZone »

Thank you for your reply, but i checked the wikihttps://wiki.zoneminder.com/ before and i didn't find anything about this?
Can you give me a tip, which topic contains the solution?
Maybe i am looking at wrong places....
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Including ZoneMinder livestream in external website

Post by bbunge »

https://wiki.zoneminder.com/How_to_stre ... stallation

From a monitor view right click on the "image" and select view image. Use the URL from that. Just make sure you create an unprivileged user to do this as the user and password is in plain text.

sample code to use as a web page:

<html>

<meta http-equiv="refresh" content="300">

<body>

<p>Backyard</p>


<img src="http://192.168.1.2/zm/cgi-bin/nph-zms?m ... 1486517011">


</body>
</html>
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Including ZoneMinder livestream in external website

Post by rockedge »

in a WordPress page or post I use something like this: Remember that with certain authorizations set, the URL would be slightly different.
this URL works when :
Options->System->OPT_USE_AUTH = ON
Options->System->AUTH_TYPE = Builtin
Options->System->AUTH_RELAY = NONE

Code: Select all

<h2><img class="aligncenter" src="http://your_zm_server/cgi-bin/nph-zms?mode=jpeg&scale=100&maxfps=5&buffer=1000&monitor=1&user=admin" alt="stream down" width="420" height="340" /></h2>
http://rockedge.org/troutcam/
FXZone
Posts: 5
Joined: Wed Jun 14, 2017 5:53 am

Re: Including ZoneMinder livestream in external website

Post by FXZone »

Thank you both for your support.
It worked fine for me now.
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Including ZoneMinder livestream in external website

Post by rockedge »

It can allow others to use the stream URL as is. You must create a user that only has permissions to view a stream. Set this in Options->Users
Another way is to set the AUTH_RELAY = Hashed and set the Options->System->AUTH_HASH_SECRET to something. You can use this something to generate the correct hash to authorize.

I use the first method and create a user like "viewer" and set the permissions to view stream only. So far this has worked for several years ok for me.
Locked