I have a total noob questions, so please be patient with me.
I want to set up ZoneMinder on a Pi3 to manage an on-board camera and a directly connected USB camera. Once they are being monitored, I am wanting to live stream the two video streams and embed them in an external web site. I have done this previously with MontionEyeOS and it was a case of just putting the port if the specific camera on the end of the URL for the Pi. I could port forward this and then embed this into the web site and it worked OK. I am considering an upgrade to ZoneMinder and want to check this functionality before I make the jump.
Also, if this is possible, what format is the stream? When using MotionEyeOS, the stream is MJPEG which uses a lot of bandwidth and has limited compatibility for embedding.
Any detail on this would be much appreciated. Thanks for your help!
Embedding Streaming Video in External Website
-
- Posts: 3
- Joined: Thu Feb 08, 2018 3:18 pm
Re: Embedding Streaming Video in External Website
Setup a view only user. Log into Zoneminder as that user.
Open the monitor you want to stream. Right click in the video and choose view image. Copy the contents of the address bar. Something like:
http://192.168.x.x/zm/cgi-bin/nph-zms?m ... 1518124944
Copy that into the web page code:
<html>
<body>
<p>Backyard</p>
<img src="http://192.168.x.x/zm/cgi-bin/nph-zms?m ... 1518124944>"
</body>
</html>
If you have the other web server outside your LAN and port forwarded use the URL to your router vs. the internal IP. I run this on the same server Zoneminder resides on.
Open the monitor you want to stream. Right click in the video and choose view image. Copy the contents of the address bar. Something like:
http://192.168.x.x/zm/cgi-bin/nph-zms?m ... 1518124944
Copy that into the web page code:
<html>
<body>
<p>Backyard</p>
<img src="http://192.168.x.x/zm/cgi-bin/nph-zms?m ... 1518124944>"
</body>
</html>
If you have the other web server outside your LAN and port forwarded use the URL to your router vs. the internal IP. I run this on the same server Zoneminder resides on.
-
- Posts: 3
- Joined: Thu Feb 08, 2018 3:18 pm
Re: Embedding Streaming Video in External Website
Hi,
Thanks for the fast reply!
That's great, it does exactly what I'm looking for.
Do you have any idea what kind of stream it is? Is it MJPEG like MotionEyeOS, or is it something more compressed?
Cheers!!
Thanks for the fast reply!
That's great, it does exactly what I'm looking for.
Do you have any idea what kind of stream it is? Is it MJPEG like MotionEyeOS, or is it something more compressed?
Cheers!!
Re: Embedding Streaming Video in External Website
Never checked the type of stream. Likely a jpeg stream. Also set your PATH_SWAP to /dev/shm Viewing a stream will write a lot of .jpg's to the tmp directory and tmpfs is faster than a drive. You can also reduce the Stream Replay Image Buffer to something lower than 1000 to save a bit of space.fictionalname wrote: ↑Thu Feb 08, 2018 9:40 pm Hi,
Thanks for the fast reply!
That's great, it does exactly what I'm looking for.
Do you have any idea what kind of stream it is? Is it MJPEG like MotionEyeOS, or is it something more compressed?
Cheers!!
-
- Posts: 3
- Joined: Thu Feb 08, 2018 3:18 pm
Re: Embedding Streaming Video in External Website
Nice one, thanks again for your help!
-
- Posts: 136
- Joined: Tue Dec 09, 2014 10:20 pm
Re: Embedding Streaming Video in External Website
I remember having that set in my old 1.20.x install, but I can't find it in 1.31.x
Re: Embedding Streaming Video in External Website
About the stream type.
I've used this for years and noticed that the link you
get from the copy sets the stream type.
So, if your ZM is set to stream mpeg asf, the stream
link will have that in it and send an ASF stream.
/cgi-bin/nph-zms?mode=mpeg&monitor=2&scale=100&bitrate=484000&maxfps=10&format=asf&user
I've used this for years and noticed that the link you
get from the copy sets the stream type.
So, if your ZM is set to stream mpeg asf, the stream
link will have that in it and send an ASF stream.
/cgi-bin/nph-zms?mode=mpeg&monitor=2&scale=100&bitrate=484000&maxfps=10&format=asf&user