[beta testing] nodes for live streaming mp4

did you try the second flow with the EXEC node ? (for me the first flow working too, but the second not)

i just delete it an reboot RPI and same :
image
ui-table dependency disapear but got two socket.io version

=> let's GO !

1 Like

Yes of course, only tested the second with the exec node. Worked first attempt

Here both running at the same time

2 Likes

That's it it's good, I uninstalled and reinstalled again and everything works, phew. :sweat_smile:

2 Likes

This topic was automatically closed after 60 days. New replies are no longer allowed.

continued from the other thread that closed...

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.

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.

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.

4 Likes

Just a placeholder for an alternative install method that is much faster (if you don't have patience to wait for npm!)

Using yarn. Install info here:

change to node red dir:
cd .node-red

yarn add kevinGodell/node-red-contrib-mp4frag
yarn add kevinGodell/node-red-contrib-ui-mp4frag
yarn add kevinGodell/node-red-dashboard

restart node-red:
node-red-restart

3 Likes

That is amazing. Yarn is so much faster for installing than npm. Only took a few seconds whereas npm was taking many many minutes. I have probably lost hours lately when I add up all the time wasted as I was changing between node-red-dashboard versions to test compatibility.

I saw that the "Official" node-red-dashboard node is in version v2.24.2 your kevinGodell / node-red-dashboard version is in, v2.24.2 Beta:
Will we be able to have an Official version including your additions? Or do we have to keep using your version?

... and 2.25.0 will be out as soon as I get my act together...

but...

The good thing is that Kevin's change is "just" a bump to the sockets.io library so is easy to re-do.

The bad thing is that that small version bump drop support for node8 - which the core project still supports. While that is the case we aren't going to intentionally break dashboard either by applying this fix. As and when we do drop node8 (Node-RED v2) we will then also bump dashboard to v3 and can include this.

2 Likes

ok, so it's up to Kevin to update his beta so that we can benefit from the latest official versions of Dashboard UI.
While waiting for THE big update of NR.

It would be so awesome if @dceejay kept the #socket-io-v3 branch to allow users to get it from a trusted source. This would allow beta testers to get a chance to find bugs before it goes live. If not, I can still maintain my fork. It's not a big deal either way. I have added this to my wish list for Santa. :santa:

2 Likes

Ho Ho Ho... my wish list is plenty long enough, and maintaining and publishing two forks of dashboard just for this use case is not on it...

1 Like

Thanks for the quick response. I sure hope it didn’t sound like I wanted you to publish a branch. I wouldn’t want to be the straw on that camel’s back....

No worries - I'm loving the great work you are doing and am keen to get there also - have a new camera on the Xmas list...
but we know there are a lot of devices out there still stuck on node8 (certainly a lot of industrial units) and they still want to use dashboard. Yes we will drop it at the next major jump.

4 Likes

Hello kevinGodell,
Thanks for your sharing flow and node,it's very good like Bart said you are a video magician,I import your flow and when I run it ,it have below error invalid player order,Do you know what's the reason?


how can I deal with that ? What is wrong with my settings? Thanks for your help in advance.
My ui_mp4frag setting see below

Do we need config HLS.js Options?If need how can we config that ,thanks

I believe @kevinGodell lives in the US so we have some time zone differences to consider. Anyway, looks like you have no players available. This is how it looks like in my setup

I think Kevin has updated the Node since that original flow was posted. Delete the player node and re-add it from the sidebar..

I updated the flow examples in the readme for both nodes before I ran out to work this morning. The old flows were very outdated and did not reflect the current configurations.

1 Like

Ok,Thanks your quickly response @kevinGodell @dceejay,i will try it later.Thanks.