# Storing and Playing Video with Node-RED

**URL:** <https://discourse.nodered.org/t/storing-and-playing-video-with-node-red/10286>\
**Category:** General\
**Created:** [17 April 2019 12:41 UTC](https://discourse.nodered.org/t/storing-and-playing-video-with-node-red/10286 "2019-04-17T12:41:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Georg25](https://avatars.discourse-cdn.com/v4/letter/g/ed8c4c/32.png) [@Georg25](https://discourse.nodered.org/u/Georg25)\
**Post date:** [17 April 2019 12:41 UTC](https://discourse.nodered.org/t/storing-and-playing-video-with-node-red/10286/1 "2019-04-17T12:41:46Z")

</div>

Hi all,

I have an IP network cam which should send me the video material to a Raspberry Pi running Node-RED. I want to use Node-RED to store the video in a ring buffer that only contains the last 5 minutes. If I now press a button, the contents of the ring buffer are to be written to another memory and played back on the dashboard.  
The ring buffer continues to record.

Do you have any idea if the implementation with Node-RED is so possible?  
And do you have any tips for this?

Thank´s

Georg

---

<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:** [17 April 2019 13:57 UTC](https://discourse.nodered.org/t/storing-and-playing-video-with-node-red/10286/2 "2019-04-17T13:57:57Z")

</div>

> [@Georg25](#):
>
> store the video in a ring buffer that only contains the last 5 minutes

Hi Georg, I assume the ring buffer is not in memory (because Pi has very limited ram) but somewhere on disc (and not on your Raspberry's SD card because don't think it would last long that way)?

If you are storing the images somewhere on an external disc, you could perhaps store the **paths** to those images files in a ring buffer. I use in my[node-red-contrib-msg-speed](https://github.com/bartbutenaers/node-red-contrib-msg-speed/blob/master/msg_speed.js#L18) node the **circular-buffer** library which works fine.

Bart
