A Dashboard setup for video cameras

You are using a <img .../> is it an image ?
Did you try right mouse button > inspect element, check the console, the sources. Can it load it ?

I'm not sure what I'm looking for here?

Perhaps take some initiative ?
On which page are you doing this ? The http://192.168.1.195:7777/ or on the dashboard ?

Start with the source, you need to determine what kind of data is shown.
Open the network tab and refresh the page, you will see the file it is streaming.

click on it.
click sources
Look for a filename, somewhere.

Next, do the same inspection but now with the dashboard page that is not working

Thank you all so much for your assistance.

I think it's a remote access port forwarding issue!

When I go on the dashboard locally the video works. When remotely the image is lost.

I take it your video is only served locally?

You should have mentioned this earlier...

"I take it your video is only served locally?"

Of course it is as standard. To have access to your dashboard "from outside" you need to implement a secure way to reach it from/via internet

I personally use a VPN solution but that is another topic

I would be interested to know your VPN solution. I use Serveo which has its downfall at times

It is not related to Node-RED, it is a typical Raspberry Linux setup. I used this guide, many steps but simple to do

And here is @Colin 's excellent guide

http://blog.clanlaw.org.uk/2016/07/30/A-complete-vpn-server-for-under-20-ukp.html

Hi there,
@krambriw thank yuo for sharing your camera dashboard.

I did the same thing as you and everythings works well, but I have delay in the video.
In fact my camera add the timestamp on the video end I noticed that if I open the RTSP straming with videolan I see the real time streaming, but I see the video into the dashboard (the video streaming provided by motion) there is a delay of 2 minutes.
I see the same delay if I open the motion streaming in my web browser.

Is there some special setting for motion that I should use?

I use a Raspberry Pi3B+.

Thanks again to share your project!

Federico

Yes, there is some latency when the video is passed thru Motion, since Motion is doing some processing of images. I think some settings have greater impact than other, I have to come back with some settings of mine.

Otherwise, I f you do not need Motion, I think you can insert urls for direct access to your cameras in the dashboard

When you say you look with vlc or browser, are you doing this from the same machine as the one when looking via the dashboard?

Motion takes the video from cameras, process this with various filters and algoritms and provides http outputs. This is causing latency, of course. Some params will add more than others

I do not know all details, I'm not using all features of Motion but the following params have an impact on the latency what I have noticed

framerate: higher rates, higher latency. I have 5 fps
noise tune: I have off
despeckle filter: having this means each frame will be processed by Motion. I have eE
smart_mask_speed: I have 0
pre capture/post capture: I have 0

Run top on the pi and see if the process is working full time, if so then that is the problem, you are asking the pi to do too much.
Are you running the browser on the pi? If so then the browser itself may be a significant factor. Try with the browser running in a PC accessing the dashboard from the pi.

Another thing you can elaborate with is to adjust the following params

framerate: set to 50 or so
stream motion: off (pls note that when set to on, the framrate is just 1 fps)

With this, the latency/delay is much lower. I could not see any increase of the load on the RPi

Hi @krambriw,
thanks for your setting.
I tried your settings (and frame_rare = 5) and now I have 7 seconds of delay (very good compared to 2 minutes).
With the top command I saw that motion uses 100% of the CPU. The load is the same whit new and hold settings.
If I set frame_rate = 2, I had a delay of 2 seconds.

My setup is composed by a WiFi Camera IP67 that streams video with RTSP protocol.
On my raspberry are running: node-red, mosquitto mqtt broker and motion.
I open the dashbord always from my PC or from a tablet.

Best regards,
Federico

I think that is too high. I think also it is related to ip cameras with rtsp streams. If you lower the frame rate, is it still that high?

I have 4 RPi3's. 3 of them show that Motion is consuming just around 15% of one cpu core
But I have 2 usb cameras connected to each RPi instead of ip cameras.

In the 4th RPi I have one usb and one network camera connected (with 50 fps), then cpu show usage 43 % in top. If I change frame rate for the network camera to 5 fps, the cpu load drops to 25%. I think conclusion is to lower the frame rate for network cameras to get lower cpu load

image

Hi krambriw,
following your suggestion I found and intersting thing!
My camera can stream two different video flow: one in high resolution 19201080 and another one in low resolution.
I changed the rtsp flow to the one with low resolution (640
352, 512 kbps and 10 fps) and now motion load is 24-27%. This is a very good thing!

Thank you very much for the hint!
With more tweak I think I can get a good image quality for surveillance