# Still testing nodes for mp4 video streaming

**URL:** <https://discourse.nodered.org/t/still-testing-nodes-for-mp4-video-streaming/37099>\
**Category:** Share Your Nodes\
**Created:** [7 December 2020 02:49 UTC](https://discourse.nodered.org/t/still-testing-nodes-for-mp4-video-streaming/37099 "2020-12-07T02:49:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinGodell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kevingodell/32/27040_2.png) [@kevinGodell](https://discourse.nodered.org/u/kevinGodell)\
**Post date:** [7 December 2020 02:49 UTC](https://discourse.nodered.org/t/still-testing-nodes-for-mp4-video-streaming/37099/1 "2020-12-07T02:49:18Z")

</div>

continued from the [other thread that closed](https://discourse.nodered.org/t/beta-testing-nodes-for-live-streaming-mp4/33743)...

```auto
npm install kevinGodell/node-red-contrib-mp4frag
npm install kevinGodell/node-red-contrib-ui-mp4frag

```

Some new features are designed with security in mind.

To secure the http routes, you can add a custom middleware function that can be used to limit access to hls.m3u8, video.mp4, etc. It is to be defined in the `settings.js` file.

```auto
mp4frag: {
  middleware: (req, res, next) => {
    console.log('mp4frag middleware');
    next();
  }
},

```

For socket io connections, the server side now generates a random key each time the node is initialized. It is passed in the payload so that it may be given to a client to use for connecting. This is done because I go straight to websockets, skipping the polling step, which gives me less options for verifying the client connection. Skipping the polling option with socket io allows me to get video delivered sooner and it also gives flexibility for playing video via socket io on another server without playing with cors.

Both nodes still can work with socket io v2 or v3. So if you need the performance benefits of v3, you can install my fork of node-red-dashboard that uses socket io v3 as a dependency vs the master that uses v2.

```auto
npm uninstall node-red-dashboard
npm install kevinGodell/node-red-dashboard

```

p.s. installing kevinGodell/node-red-dashboard from git takes a very long time and appears to freeze. give it probably more than 5 minutes.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [11 December 2020 09:31 UTC](https://discourse.nodered.org/t/still-testing-nodes-for-mp4-video-streaming/37099/2 "2020-12-11T09:31:05Z")

</div>

15 posts were merged into an existing topic: [[beta testing] nodes for live streaming mp4](https://discourse.nodered.org/t/beta-testing-nodes-for-live-streaming-mp4/33743)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [11 December 2020 09:31 UTC](https://discourse.nodered.org/t/still-testing-nodes-for-mp4-video-streaming/37099/3 "2020-12-11T09:31:06Z")

</div>



---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [11 December 2020 09:32 UTC](https://discourse.nodered.org/t/still-testing-nodes-for-mp4-video-streaming/37099/4 "2020-12-11T09:32:20Z")

</div>


