Embedding Streaming Video in External Website

Forum for questions and support relating to the 1.31.x releases only.
Locked
fictionalname
Posts: 3
Joined: Thu Feb 08, 2018 3:18 pm

Embedding Streaming Video in External Website

Post by fictionalname »

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!
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Embedding Streaming Video in External Website

Post by bbunge »

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.
fictionalname
Posts: 3
Joined: Thu Feb 08, 2018 3:18 pm

Re: Embedding Streaming Video in External Website

Post by fictionalname »

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!!
bbunge
Posts: 2930
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Embedding Streaming Video in External Website

Post by bbunge »

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!!
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
Posts: 3
Joined: Thu Feb 08, 2018 3:18 pm

Re: Embedding Streaming Video in External Website

Post by fictionalname »

Nice one, thanks again for your help!
geraldbrandt
Posts: 127
Joined: Tue Dec 09, 2014 10:20 pm

Re: Embedding Streaming Video in External Website

Post by geraldbrandt »

I remember having that set in my old 1.20.x install, but I can't find it in 1.31.x
river100
Posts: 145
Joined: Sun Oct 07, 2007 5:52 pm
Location: Louisiana

Re: Embedding Streaming Video in External Website

Post by river100 »

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
Locked