# How to display CCTV camera in dashboard (RTSP)

**URL:** https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860
**Category:** General
**Created:** [16 December 2018 23:37 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860 "2018-12-16T23:37:49Z")
**Posts on this page:** 20
**Page:** 7

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [16 October 2019 08:51 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/123 "2019-10-16T08:51:34Z")

</div>

🙂 Yes, of course, best is to reduce as much as possible what is sent from the cameras

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [16 October 2019 09:12 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/124 "2019-10-16T09:12:00Z")

</div>

This is what is seen in my dashboard with changed camera resolutions. Still good enough with 640x480

```
                           1024x768

```

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e6f8793be8af68d103a9c1f62d5130c9cfbbe7d3.jpeg)

```
                           640x480

```

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/3/382142413ee1b86d928d46a6beed554c9b55ff35.jpeg)

---

<div class="post-metadata">

### Author: ![fs.santos](https://avatars.discourse-cdn.com/v4/letter/f/3da27b/32.png) [@fs.santos](https://discourse.nodered.org/u/fs.santos)
#### Post date: [16 October 2019 09:50 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/125 "2019-10-16T09:50:56Z")

</div>

Whats your delay to the dash?

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [16 October 2019 10:07 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/126 "2019-10-16T10:07:15Z")

</div>

On my macbook air and iphone when wifi connected to same home network, 1 second  
On my iPhone via 4G and VPN, 5 seconds

---

<div class="post-metadata">

### Author: ![fs.santos](https://avatars.discourse-cdn.com/v4/letter/f/3da27b/32.png) [@fs.santos](https://discourse.nodered.org/u/fs.santos)
#### Post date: [16 October 2019 10:15 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/127 "2019-10-16T10:15:08Z")

</div>

Ok lets have it then:  
**Camera:**  
Height: \_\_\_\_\_  
Width:\_\_\_\_\_\_  
FPS:\_\_\_\_\_\_\_  
**Motion:**  
Height: \_\_\_\_\_  
Width:\_\_\_\_\_\_  
Framerate:\_\_\_\_\_\_\_

Can you provide me the info?  
Starting to get a bit frustated here.... Can it be my network speed?

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [16 October 2019 10:37 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/128 "2019-10-16T10:37:02Z")

</div>

> [@fs.santos](#):
>
> **Camera:**  
> Height: **_480  
> Width:640  
> FPS:(cannot be configured, I think is 10 but I remember testing with an AXIS camera setting it to 5 fps)  
> Motion:  
> Height: 480_  
> Width: 640**\_\_\_\_  
> Framerate: 5 fps

To find where you have delays

1. Check the delay when you view the camera directly with a browser
2. Check the delay when viewing via Motion gui
3. Check delay when viewing via dashboard

If you have most delay in Motion, there is some parameter that needs to be changed there. Check also that you have smart\_mask\_speed set to 0

---

<div class="post-metadata">

### Author: ![fs.santos](https://avatars.discourse-cdn.com/v4/letter/f/3da27b/32.png) [@fs.santos](https://discourse.nodered.org/u/fs.santos)
#### Post date: [16 October 2019 11:08 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/129 "2019-10-16T11:08:48Z")

</div>

After checking your points i have no delay on viewing the camera directly on a browser. The Motion gui presents a 4 min delay!  
Do you wanna check my hole config?

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [16 October 2019 11:29 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/130 "2019-10-16T11:29:13Z")

</div>

I give you a sample of my config for a ip camera and you can check what may be different

Also, when Motion is in detecting mode, I have the same low delay, no difference

Check the cpu load with top on your Pi when Motion is running. In my case it is only around 17% and 26% when detecting, no movements. 2 cameras, RPi3

[sample\_config.txt](https://discourse.nodered.org/uploads/short-url/jt1tGa5dF9b3yCnphdD2QrGWRzR.txt) (3.4 KB)

---

<div class="post-metadata">

### Author: ![fs.santos](https://avatars.discourse-cdn.com/v4/letter/f/3da27b/32.png) [@fs.santos](https://discourse.nodered.org/u/fs.santos)
#### Post date: [16 October 2019 12:00 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/131 "2019-10-16T12:00:13Z")

</div>

Tried your settings, still have a big delay.  
I'm with a VPN. Gonna check if in my network i have the same delay. Either way im not getting convinced with motion... Have to drop the quality way too much when i can use the Reolink app and have a crispy sharp image and the motion detection.... The catch? All the cameras have to be reolink

---

<div class="post-metadata">

### Author: ![fs.santos](https://avatars.discourse-cdn.com/v4/letter/f/3da27b/32.png) [@fs.santos](https://discourse.nodered.org/u/fs.santos)
#### Post date: [16 October 2019 14:08 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/132 "2019-10-16T14:08:18Z")

</div>

Get ready for this Walter, now my Motion stream is faster than the camera IP..... That's very strange.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/5/51f1c45429b89d445a8854164e1020c8e4afd682.jpeg)

CAM:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/f/f4fc1e032dcc63fd660ab6147cde16676681277f.png)  
MOTION:  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/3/3f4609231285a135d8f595dc65e32965b5b7843a.png)

Is that magic?

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [16 October 2019 14:56 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/133 "2019-10-16T14:56:29Z")

</div>

Only explanation I can imagine,,,,such cameras, looks like yours is pretty advanced, have several streams and maybe you have one connected to Motion and when you view it directly, you see another. The time difference is maybe less than a second between and could very well be caused by the camera itself when generating the streams. Date & time is coming from the camera itself it looks?

But with that very high resolution, I believe you will have very long delays in Motion. Have you tried to set it lower to 640x480 in the camera?

Or try another stream instead of "Clear" and see what configuration it has or set that to a much lower and use it in Motion. You could have a high resolution stream for viewing directly and a lower resolution sent to Motion

---

<div class="post-metadata">

### Author: ![fs.santos](https://avatars.discourse-cdn.com/v4/letter/f/3da27b/32.png) [@fs.santos](https://discourse.nodered.org/u/fs.santos)
#### Post date: [16 October 2019 15:07 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/134 "2019-10-16T15:07:04Z")

</div>

In the "Clear" stream that is the lowest resolution - 2304\*1296 (its a 5MP cam).  
I was in the "Fluent" stream (another from the dropdown) and could set it to 640x480 but was having that horrible delay.  
I'm gonna leave it as it is for know and try to mess with it a bit. CPU usage dropped as well ~6%

UPDATE: already see the stream on my iPhone - solution: close the 20+ pages open and cleaned the cache! 🙂  
How can i disable the scroll in the template node?

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [16 October 2019 15:31 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/135 "2019-10-16T15:31:56Z")

</div>

OK, so now you have an "acceptable" delay also through Motion? If so, very good? And very low cpu load as well, that is brilliant!

The scroll, I suppose you mean the scroll bar/bars, are all part of the dashboard elements. I believe they are automatically shown when the widget has too little room in the view to fully show it's content. Only way I know how to make them disappear is to make the size of the widget larger and down scale the content. Try to reduce the size of the video frames in the template node and see what's happen, you have to experiment a bit with this until it fits the size/resolution of your monitor (or have a bigger screen with higher resolution)

---

<div class="post-metadata">

### Author: ![fs.santos](https://avatars.discourse-cdn.com/v4/letter/f/3da27b/32.png) [@fs.santos](https://discourse.nodered.org/u/fs.santos)
#### Post date: [16 October 2019 15:36 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/136 "2019-10-16T15:36:19Z")

</div>

Yes! Gonna explore the google drive upload now. Can i count on you if i need to? ahahah

Already messed with the sizes and everything is ok. The bars are gone.

---

<div class="post-metadata">

### Author: ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)
#### Post date: [16 October 2019 15:41 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/137 "2019-10-16T15:41:24Z")

</div>

> [@fs.santos](#):
>
> google drive upload

I have not used that, I use a drive on my network to save pictures when Motion detects  
Are you looking for uploading pictures to Google drive from Motion? If so, a possible solution could eventually be:

Camera -\> Motion detects some strange people in your garden -\> python scripts sends pictures to Node-RED via mqtt -\> to Google drive via some Google drive node

Eventually the python script could do it as well

---

<div class="post-metadata">

### Author: ![Lupin\_III](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lupin_iii/32/67650_2.png) [@Lupin\_III](https://discourse.nodered.org/u/Lupin_III)
#### Post date: [26 February 2020 01:32 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/140 "2020-02-26T01:32:49Z")

</div>

Sorry, I see at the end that you're using motion on raspy to decode the rtsp. Is there another way to make it all inside node-red? Because I'm on a PC and I cannot install motioneye.  
Thanks

---

<div class="post-metadata">

### Author: ![Lupin\_III](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lupin_iii/32/67650_2.png) [@Lupin\_III](https://discourse.nodered.org/u/Lupin_III)
#### Post date: [26 February 2020 02:30 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/141 "2020-02-26T02:30:47Z")

</div>

The topic starts with

> Blockquote  
> `vlc.exe -R rtsp://admin:password@10.4.5.24:554/Streaming/Channels/101/ --sout "#transcode{vcodec=mjpg,vb=2500,scale=1.0,fps=10,acodec=none}:standard{access=http{mime=multipart/x-mixed-replace; boundary=7b3cc56e5f51db803f790dad720ed50a},mux=mpjpeg,dst=:8888/videostream.cgi}`  
> This generates an MJPG which can be displayed with a simple Dashboard template node:

Where should I put it?

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [26 February 2020 11:54 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/142 "2020-02-26T11:54:43Z")

</div>

> [@Lupin\_III](#):
>
> Is there another way to make it all inside node-red?

Hi @Lupin_III,  
Via the link to my post [above](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/49)you can find a solution that only needs **ffmpeg** to be installed.

---

<div class="post-metadata">

### Author: ![Lupin\_III](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lupin_iii/32/67650_2.png) [@Lupin\_III](https://discourse.nodered.org/u/Lupin_III)
#### Post date: [26 February 2020 14:58 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/143 "2020-02-26T14:58:02Z")

</div>

Thanks Bart, I succeed in showing the camera inside the flow. I put a template node connected to the "Decode RTSP stream" one, but this is what is shown.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/1/f10df7a1203c01ba2233852c4f1ef0d8dfabcd75.png)  
this what I wroew inside the template node:

```auto
<div>
<img width="312px" height="312px" src={{msg.payload}} ><br/>
</div>

```

---

<div class="post-metadata">

### Author: ![SuperNinja](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/superninja/32/5761_2.png) [@SuperNinja](https://discourse.nodered.org/u/SuperNinja)
#### Post date: [26 February 2020 16:13 UTC](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860/144 "2020-02-26T16:13:03Z")

</div>

you have to insert a b64 node like this :  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/e/0edb13b18a99d4d367f3bdd9fa2190d4fe673798.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/f/afb4ba97e8002fb226f90249be87d43957a42b11.png)

this is my working template node code :

```auto
<img width="16" height="360" src="data:image/jpg;base64,{{msg.payload}}"/>

```

[Previous page](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860.md?page=6)

[Next page](https://discourse.nodered.org/t/how-to-display-cctv-camera-in-dashboard-rtsp/5860.md?page=8)
