# Display camera ip in dashboard and store video in raspberry

**URL:** https://discourse.nodered.org/t/display-camera-ip-in-dashboard-and-store-video-in-raspberry/6349
**Category:** General
**Created:** [3 January 2019 14:37 UTC](https://discourse.nodered.org/t/display-camera-ip-in-dashboard-and-store-video-in-raspberry/6349 "2019-01-03T14:37:07Z")
**Posts on this page:** 1
**Showing post:** 53

<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: [24 August 2020 15:18 UTC](https://discourse.nodered.org/t/display-camera-ip-in-dashboard-and-store-video-in-raspberry/6349/53 "2020-08-24T15:18:22Z")

</div>

> [@kevinGodell](#):
>
> I am not sure about those npm warnings, as my node does not use them as a dependency

we will leave aside then since it works like that.

> [@kevinGodell](#):
>
> For the ffmpeg command line, I have much to say, but it depends on your situation.

> [@kevinGodell](#):
>
> for video playback, motion detection, etc, to make a fairly complete cctv system running on node-red.

that's exactly what I would like (and probably many more). Here is an example of my dashboard:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/1/81bac3e69733ca94b8076770088add11c0dd088e.jpeg)  
_it is a global view of all the sensors in the house (water heater, swimming pool, etc.)_

On the left we see that a person has been detected at the portal.[object detection project here](https://discourse.nodered.org/t/object-detection-using-node-red-contrib-tfjs-coco-ssd/22931/52)  
And on the right the streaming of the portal camera. (the cameras are under tabs that you can unfold and automatically launch the rtsp stream).

Fortunately, I chose the camera `stream = 1` to reduce the processor load. For example if I run 4 cameras at the same time I have 25% cpu load (RPI 3b)

If I click on the camera, I switch to `stream = 0` (1080p) on a full page (all other streams are stopped), the cpu is at 40%

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/a/fae824684d732e37718507b63783d6359ca2810c.jpeg)

> [@kevinGodell](#):
>
> ,scale=iw/2:-1

Not bad : Makes me go from 40% to 25% cpu while losing a bit in quality (960x540px).

> [@kevinGodell](#):
>
> If your system supports hwaccel ( `ffmpeg -hwaccels` ), I would take advantage of that for GPU decoding of mp4 (rtsp) so that the CPU can encode the jpeg

I failed to get it to work by adding it in my current command line:

- the pipe2jpeg node announces : "pipe2jpeg: input must be a buffer"
- if I remove pipe2jpeg : "unrecognized image format"

> [@kevinGodell](#):
>
> A better solution would be to stream copy the h264 video from rtsp to mp4 and play it in a mediasource extension video player (without writing files to the disk).

Are you thinking of doing it? It would be a terrible step forward.

---

_[View the full topic](https://discourse.nodered.org/t/display-camera-ip-in-dashboard-and-store-video-in-raspberry/6349)._
