Node-red-contrib-ffmpeg-spawn

EDIT: and of course I have the same error in my settings, +frag_keyframe versus +frag_every_frame
Embarrassing

I believe I have the same setting for ffmpeg-spawn and the exec, this is my simple test flow taking the stream from one of my cameras as mentioned. I connect to them using http. Please do modify the url in the commands to fit any of your own sources

BTW How can we check so that we know we have the same most recent version as you mention?

[{"id":"dd40be61.4e29f","type":"inject","z":"4e2296ba.635af8","name":"Start stream","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":"1","topic":"","payload":"true","payloadType":"bool","x":140,"y":130,"wires":[["96fdc212.96085"]]},{"id":"9665a078.26fe7","type":"inject","z":"4e2296ba.635af8","name":"Stop stream","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":140,"y":176,"wires":[["5d4a09e.dd61cf8"]]},{"id":"5d4a09e.dd61cf8","type":"switch","z":"4e2296ba.635af8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":470,"y":130,"wires":[["bf1296a0.fb6008"],["ea9b78f2.69c808"]]},{"id":"ea9b78f2.69c808","type":"function","z":"4e2296ba.635af8","name":"stop","func":"msg = {\n    kill:'SIGHUP',\n    payload : 'SIGHUP'  \n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":490,"y":179,"wires":[["bf1296a0.fb6008"]]},{"id":"bf1296a0.fb6008","type":"exec","z":"4e2296ba.635af8","command":"ffmpeg -i http://192.168.0.237:8889/?action=stream -c:v h264_omx -c:a aac -f mp4 -movflags +frag_every_frame+empty_moov+default_base_moof -min_frag_duration 500000 pipe:1","addpay":false,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"Camera testing","x":679,"y":150,"wires":[["8c43fe42.67586"],[],["8c43fe42.67586"]]},{"id":"13a8f08d.2ebf6f","type":"ui_mp4frag","z":"4e2296ba.635af8","name":"exec","group":"f850b4c5.fff4d8","order":3,"width":"9","height":"5","readyPoster":"https://raw.githubusercontent.com/kevinGodell/node-red-contrib-ui-mp4frag/master/video_playback_ready.png","errorPoster":"https://raw.githubusercontent.com/kevinGodell/node-red-contrib-ui-mp4frag/master/video_playback_error.png","hlsJsConfig":"{\"liveDurationInfinity\":true,\"liveBackBufferLength\":0,\"maxBufferLength\":5,\"manifestLoadingTimeOut\":1000,\"manifestLoadingMaxRetry\":10,\"manifestLoadingRetryDelay\":500}","retry":true,"play":true,"unload":true,"threshold":0.5,"players":["hls.js","mp4","hls","socket.io"],"x":1080,"y":150,"wires":[[]]},{"id":"8c43fe42.67586","type":"mp4frag","z":"4e2296ba.635af8","name":"exec","migrate":1e-9,"hlsPlaylistSize":"10","hlsPlaylistExtra":"5","basePath":"kalle1","x":901,"y":147,"wires":[["13a8f08d.2ebf6f"],[]]},{"id":"96fdc212.96085","type":"delay","z":"4e2296ba.635af8","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":310,"y":130,"wires":[["5d4a09e.dd61cf8"]]},{"id":"842cfeac.32eaf","type":"ffmpeg-spawn","z":"4e2296ba.635af8","name":"","outputs":5,"migrate":1e-9,"cmdPath":"ffmpeg","cmdArgs":"[\"-i\",\"http://192.168.0.237:8889/?action=stream\",\"-c:v\",\"h264_omx\",\"-c:a\",\"aac\",\"-f\",\"mp4\",\"-movflags\",\"+frag_keyframe+empty_moov+default_base_moof\",\"-min_frag_duration\",\"500000\",\"pipe:1\"]","cmdOutputs":4,"killSignal":"SIGTERM","x":360,"y":350,"wires":[["81d2ebcd.11f048"],["81d2ebcd.11f048"],["d60b30b7.66176"],[],[]]},{"id":"c2c98b01.1707d8","type":"inject","z":"4e2296ba.635af8","name":"start default","props":[{"p":"action","v":"{\"command\":\"start\"}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":"1","topic":"","payloadType":"str","x":140,"y":290,"wires":[["842cfeac.32eaf"]]},{"id":"b033e9c.c1cda18","type":"inject","z":"4e2296ba.635af8","name":"stop default","props":[{"p":"action","v":"{\"command\":\"stop\"}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":140,"y":391,"wires":[["842cfeac.32eaf"]]},{"id":"6958e941.bb1788","type":"comment","z":"4e2296ba.635af8","name":"start ffmpeg","info":"","x":140,"y":254,"wires":[]},{"id":"ec3d0da.21a88f","type":"comment","z":"4e2296ba.635af8","name":"stop ffmpeg","info":"","x":140,"y":355,"wires":[]},{"id":"81d2ebcd.11f048","type":"mp4frag","z":"4e2296ba.635af8","name":"","migrate":1e-9,"hlsPlaylistSize":"20","hlsPlaylistExtra":"10","basePath":"kalle2","x":650,"y":360,"wires":[["17225931.4f28b7"],[]]},{"id":"17225931.4f28b7","type":"ui_mp4frag","z":"4e2296ba.635af8","name":"","group":"f850b4c5.fff4d8","order":1,"width":"10","height":"6","readyPoster":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAMAAACtqHJCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEu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QCAgEBAICAYGAQEAgIBAQCCAQEAgIBAQCAgGBgEBAICAQQCAgEBAICAQEAgIBgYBAQCAgEEAgIBAQCAgEBAICAYGAQEAggEBAICAQEAgIBAQCAgGBgEBAIIBAQCAgEBAICAQEAgIBgYBAQCCAQEAgIBAQCAgEBAICAYGAQACBgEBAICAQEAgIBAQCAgGBgEAAgYBAQCAgEBAICAQEAgIBgQACAYGAQEAgIBAQCAgEBAICAYEAAgGBgEBAICAQEAgIBAQCAgEEAgIBgYBAQCAgEBAICAQEAgIBIv8Djt0c3tPuuskAAAAASUVORK5CYII=","hlsJsConfig":"{\"liveDurationInfinity\":true,\"liveBackBufferLength\":5,\"maxBufferLength\":10,\"manifestLoadingTimeOut\":1000,\"manifestLoadingMaxRetry\":10,\"manifestLoadingRetryDelay\":500}","retry":true,"play":true,"unload":true,"threshold":0.5,"players":["hls.js","mp4","hls","socket.io"],"x":870,"y":360,"wires":[[]]},{"id":"e6b316e0.a12ba8","type":"comment","z":"4e2296ba.635af8","name":"start ffmpeg","info":"","x":140,"y":464,"wires":[]},{"id":"d60b30b7.66176","type":"debug","z":"4e2296ba.635af8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":640,"y":460,"wires":[]},{"id":"f850b4c5.fff4d8","type":"ui_group","name":"Video compare","tab":"5cc557bf.a009c8","order":1,"disp":false,"width":"12","collapse":false},{"id":"5cc557bf.a009c8","type":"ui_tab","name":"Video compare","icon":"dashboard","disabled":false,"hidden":false}]

yes of course :angel: lol

[
    "-loglevel",
    "quiet",
    "-rtsp_transport",
    "tcp",
    "-i",
    "rtsp://192.168.1.9:554/user=****_password=****_channel=0_stream=1.sdp?real_stream",
    "-c:a",
    "aac",
    "-c:v",
    "copy",
    "-f",
    "mp4",
    "-movflags",
    "+frag_keyframe+empty_moov+default_base_moof",
    "pipe:1",
    "-progress",
    "pipe:2"
]

This is the ffmpeg-spawn

ffmpeg -loglevel quiet -rtsp_transport tcp -i rtsp://192.168.1.9:554/user=****_password=****_channel=0_stream=1.sdp?real_stream -c:a aac -c:v copy -f mp4 -movflags +frag_every_frame+empty_moov+default_base_moof -min_frag_duration 500000 pipe:1

This is the EXE
I just saw that -min_frag_duration 500000is missing in the ffmpeg-spawn, Could this be the source of the problem?

[EDIT]

Ooohhhh, yes the error, frag_keyframe instead of frag_every_frame. Like what you always have to check in the smallest details. They looked so alike that I hadn't seen the difference !!!
Obviously it works, I no longer have any delay compared to EXE !! Great :star_struck: ! Thanks all .

2 Likes

Thanks for confirming. And frankly, thanks for making me have to prove it. This helps for the future when another user may have a similar issue. Its definitely good to work out the small details now.

On another note, I merged the node-red-contrib-mp4frag #recorder branch with #master. The internal dependency, mp4frag, has been updated to v0.4.0 and published to npm. Using branches with yarn has caused me a bit of issues.

The new way to get the latest version of node-red-contrib-mp4frag is:
npm install kevinGodell/node-red-contrib-mp4frag
or
yarn add kevinGodell/node-red-contrib-mp4frag

I will be in the process of cleaning it up so in the near future after dashboard is at 3.0 and its dependency of socket io is at 3.0, I will publish to npm to make these nodes easier to install. Maintaining versions to support dashboard 2.0 and 3.0 would have consumed too much of my time that is already in short supply.

As for ffmpeg-spawn, I will probably be able to publish to npm sooner than the mp4frags since it has no dependencies. Just have to get the readme and help text written after finalizing features.

2 Likes

An update to ffmpeg-spawn. Added feature to split or combine the output messages, in the case that you want to combine output and filter by topic. Currently, output topics are fixed and derived from array: ['status', 'stdout', 'stderr', 'stdio3', 'stdio4', 'stdio5']. The index of the topic corresponds to what would be the node output when split.

A simple flow example showing a side by side comparison of split vs combined output:

[{"id":"48e02cfe.7cb014","type":"inject","z":"5967c855.68b978","name":"start","props":[{"p":"action","v":"{\"command\":\"start\"}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":269,"y":783,"wires":[["ffc6a303.54b73"]]},{"id":"ffc6a303.54b73","type":"ffmpeg-spawn","z":"5967c855.68b978","name":"","outputs":2,"migrate":2e-9,"cmdPath":"","cmdArgs":"[\"-version\"]","cmdOutputs":1,"killSignal":"SIGTERM","msgOutput":"split","x":435,"y":783,"wires":[[],["23ddb71.08b0548"]]},{"id":"abb559f9.d13f48","type":"debug","z":"5967c855.68b978","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":762,"y":783,"wires":[]},{"id":"23ddb71.08b0548","type":"function","z":"5967c855.68b978","name":"","func":"const version = msg.payload.toString().split(' ')[2];\n\nconst message = `version: ${version}`;\n\nnode.status({ fill: 'green', shape: 'dot', text: message });\n\nreturn { payload: version };","outputs":1,"noerr":0,"initialize":"","finalize":"","x":618,"y":783,"wires":[["abb559f9.d13f48"]]},{"id":"9f6f436d.b10aa","type":"inject","z":"5967c855.68b978","name":"start","props":[{"p":"action","v":"{\"command\":\"start\"}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":270,"y":860,"wires":[["4ee683b9.ccf13c"]]},{"id":"4ee683b9.ccf13c","type":"ffmpeg-spawn","z":"5967c855.68b978","name":"","outputs":1,"migrate":2e-9,"cmdPath":"","cmdArgs":"[\"-version\"]","cmdOutputs":1,"killSignal":"SIGTERM","msgOutput":"combined","x":436,"y":860,"wires":[["4a38c204.c85b4c"]]},{"id":"6d72faf.b638204","type":"debug","z":"5967c855.68b978","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":763,"y":860,"wires":[]},{"id":"4a38c204.c85b4c","type":"function","z":"5967c855.68b978","name":"","func":"const { topic } = msg;\n\nif (topic === 'stdout') {\n    const version = msg.payload.toString().split(' ')[2];\n\n    const message = `version: ${version}`;\n\n    node.status({ fill: 'green', shape: 'dot', text: message });\n\n    return { payload: version };\n}\n\nreturn;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":619,"y":860,"wires":[["6d72faf.b638204"]]}]

Screen Shot 2021-04-24 at 6.49.03 PM

1 Like

For Docker users (Linux Alpine or Debian), It's mandatory to have FFMPEG installed,
Since I'm getting the following error.

Error: spawn ffmpeg ENOENT

image

I tried installing ffmpeg-for-homebridge which worked before, but no luck.
Any Idea how to overcome this FFMPEG limitation? Is there a way to make it standalone?

BTW, thanks for the node-red-contrib-ffmpeg-spawn node;-)

1 Like
  • i juste update all "package" and see that always v0.1.0
    versions.
cd ~/.node-red
npm install kevinGodell/node-red-contrib-ffmpeg-spawn
npm install kevinGodell/node-red-contrib-mp4frag
npm install kevinGodell/node-red-contrib-ui-mp4frag
npm install node-red-contrib-pipe2jpeg

result after install  : 25 avril 2021
-------------------
+ node-red-contrib-ffmpeg-spawn@0.1.0
updated 1 package in 35.443s
+ node-red-contrib-mp4frag@0.1.0
updated 2 packages in 35.219s
+ node-red-contrib-ui-mp4frag@0.1.0
updated 1 package in 33.968s
+ node-red-contrib-pipe2jpeg@0.1.0
updated 1 package in 29.371s
  • Not see v0.4.0 ? :thinking:

One option is that you can install ffmpeg from npm:

  1. npm install @ffmpeg-installer/ffmpeg
  2. look in your node_modules folder to try and deduce its path to the ffmpeg binary
  3. add the path to ffmpeg-spawn (for me its /home/pi/.node-red/node_modules/@ffmpeg-installer/linux-arm/ffmpeg) but it should be different for you based on your system
  4. run the flow to see the ffmpeg version output (mine is now showing different)

EDIT I just tried installing ffmpeg-for-homebridge and found its ffmpeg binary installed to /home/pi/.node-red/node_modules/ffmpeg-for-homebridge/ffmpeg
I tired that path and it also worked. That claims to be ffmpeg built for pi?

sample flow adding local ffmpeg path:

[{"id":"91d42cf4.68948","type":"ffmpeg-spawn","z":"5967c855.68b978","name":"","outputs":2,"migrate":2e-9,"cmdPath":"/home/pi/.node-red/node_modules/@ffmpeg-installer/linux-arm/ffmpeg","cmdArgs":"[\"-version\"]","cmdOutputs":1,"killSignal":"SIGTERM","msgOutput":"split","x":444,"y":980,"wires":[[],["584da5c6.da389c"]]},{"id":"4cbb3789.6910c8","type":"inject","z":"5967c855.68b978","name":"","props":[{"p":"action","v":"{\"command\":\"start\"}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":271,"y":980,"wires":[["91d42cf4.68948"]]},{"id":"584da5c6.da389c","type":"function","z":"5967c855.68b978","name":"","func":"const version = msg.payload.toString().split(' ')[2];\n\nconst message = `version: ${version}`;\n\nnode.status({ fill: 'green', shape: 'dot', text: message });\n\nreturn { payload: version };","outputs":1,"noerr":0,"initialize":"","finalize":"","x":629,"y":980,"wires":[["bd1a13cf.ea256"]]},{"id":"bd1a13cf.ea256","type":"debug","z":"5967c855.68b978","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":790,"y":980,"wires":[]}]

ffmpeg version when using @ffmpeg-installer/ffmpeg

ffmpeg version when using ffmpeg-for-homebridge

Thanks for checking that. mp4frag@0.4.0 is a dependency used by node-red-contrib-mp4frag. I currently was using an experimental branch to add features. You wouldnt see it in your package.json file, but it would be a dependency in the node_modules folder.

@thejollypop

Added a new feature where you can define the ffmpeg path in settings.js

Firstly, install the dependency that will have the ffmpeg that you desire.

At the top of settings.js, require the selected lib to get the path.

Add the value to ffmpegSpawn.cmdPath.

excerpt from settings.js showing where I am requiring 3 ffmpeg libs ( I tested all 3 for compatibility )

const ffmpegPath1 = require('@ffmpeg-installer/ffmpeg').path;

const ffmpegPath2 = require('ffmpeg-for-homebridge');

const ffmpegPath3 = require('ffmpeg-static');

Inside the modules.exports object i added the path ( trying all 3 separately ):

ffmpegSpawn: {
    //cmdPath: ffmpegPath1
    cmdPath: ffmpegPath2
    //cmdPath: ffmpegPath3
  }

This will now show up as the default value when adding a new ffmpeg-spawn to your editor or if you leave the path value blank in the editor.

2 Likes

Accidentally posted this to wrong thread a minute ago. oops.

When tweaking your ffmpeg command, its always good to know what type of cpu load it is using.

Uses top in batch mode to get the stdout. top -b -p <pid>

[{"id":"fc058328.2af29","type":"exec","z":"ac290215.9a244","command":"top -b -p","addpay":true,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"","x":718,"y":153,"wires":[["b37719e3.1423b8"],[],[]]},{"id":"b37719e3.1423b8","type":"function","z":"ac290215.9a244","name":"%CPU, %MEM","func":"const { payload } = msg;\n\nif (typeof payload === 'string') {\n    \n    const lines = payload.toString().trim().split(/[\\n]+/);\n    \n    if (lines.length > 2) {\n        \n        const labels = lines[lines.length - 2].trim().split(/[\\s]+/);\n\n        const values = lines[lines.length - 1].trim().split(/[\\s]+/);\n\n        const message = `${labels[8]} ${values[8]}, ${labels[9]} ${values[9]}`;\n\n        node.status({ fill: 'green', shape: 'dot', text: message });\n\n        return { payload: message };\n    }\n\n}\n\nnode.status({});\n\nreturn null;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":887,"y":140,"wires":[["8bbdeeb9.3f4d2"]]},{"id":"8bbdeeb9.3f4d2","type":"debug","z":"ac290215.9a244","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1043,"y":140,"wires":[]},{"id":"a1410491.d289a8","type":"function","z":"ac290215.9a244","name":"status pid","func":"const { payload = {} } = msg;\n\nconst { status, pid } = payload;\n\nif (status === 'spawn') {\n    \n    return { payload: pid };\n\n    \n} else if (status === 'close') {\n    \n    return { kill: 'SIGTERM' };\n    \n}\n\nreturn null;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":573,"y":153,"wires":[["fc058328.2af29"]]}]

There were probably a bunch of ways to do this better, but this was the best I could come up with.

2 Likes

A bit of advertisment for my nodes can never be harmful: node-red-contrib-cpu

I was actually looking at your node with intentions to use it, but didnt see an option to get an individual PID's data. Would be a nice feature, but I could not find any node.js way of getting the value and had to resort to the system command.

Thanks @kevinGodell, now it's compatible with docker as well!

I'm running instances also on AWS, and now I get the following node-red-contrib-mp4frag error on t4g.micro Ubuntu and/or Debian servers.
Both node-red-contrib-ffmpeg-spawn and node-red-contrib-ui-mp4frag work fine.

It's particularly strange, because the first run went well, and only then the flows stopped working. Is there anything we can do about it? 10x

It’s hard to say the trouble could be. Those nodes are still experimental and have extra debugging info. Not sure what that image is showing the unhelpful error. Can you post a screenshot of the flow so I can see how things are connected.

I have an opposite problem in that I can’t make mine break. So, I am sure that we can make yours better. Personally, I have 24 live streams working through these nodes without fail.

Totally agree. I was able to fix it in Ubuntu 18.04 Version 43.0, so now it's working perfect

I have an issue with audio from a rtsp camera not working (no sound)

Using these args as configuration in the ffmpeg-spawn node:

["-loglevel","quiet","-rtsp_transport","tcp","-i","rtsp://freja.hiof.no:1935/rtplive/_definst_/hessdalen03.stream","-an","-c:v","copy","-c:a","libfdk_aac","-f","mp4","-movflags","+frag_keyframe+empty_moov+default_base_moof","-min_frag_duration","100","pipe:1"]

So basically trying libfdk_aac as well as aac but no sound can be heard. If I open the url in vlc it works and the stream info is as this:

image

Getting the sound from this particular camera is not so important but the principle, I like to know why it's not working :wink:

Oh so stupid, I caused the problem myself...the param "-an" means .....disable audio

2 Likes

Ha! I looked at the args and didn't even notice, either. Just curious, i played it via vlc and it is just hissing and popping. Probably has water in the mic or is simply too far from sources of sound?

I read on their homepage, the popping is coming from a Geiger counter, which detects radioactive radiation so there might be this kind of hissing generated as well

Here is some more info about the project, where it is etc
http://freja.hiof.no/station/

I'm trying to benchmark bitrate vs H264/H265/AV1 to tweak the performance/latency.

However, the H264/H265/AV1 test video streams (MP4 files) work only when triggered directly to the ui_mp4frag node, no matter how many times I'm changing the ffmpeg parameters of the ffmpeg-spawn node, so I cannot get the metadata.
Any lead to solve this is much appreciated!

Flow:

[{"id":"d4c54306.0b34c","type":"tab","label":"Flow 5","disabled":false,"info":""},{"id":"93d74c4e.4c8fe","type":"ffmpeg-spawn","z":"d4c54306.0b34c","name":"","outputs":5,"migrate":2e-9,"cmdPath":"ffmpeg","cmdArgs":"[]","cmdOutputs":4,"killSignal":"SIGTERM","msgOutput":"split","x":520,"y":360,"wires":[["96b432b8.72f38"],["96b432b8.72f38"],["a03a1b22.1f27a8"],["22984340.c40eac"],["45912098.31d65"]]},{"id":"96b432b8.72f38","type":"mp4frag","z":"d4c54306.0b34c","name":"","migrate":2e-9,"hlsPlaylistSize":"20","hlsPlaylistExtra":"10","basePath":"benchmark","repeated":"false","timeLimit":"10000","preBuffer":"1","x":700,"y":280,"wires":[["379420d.31038e"],[]]},{"id":"379420d.31038e","type":"ui_mp4frag","z":"d4c54306.0b34c","name":"","group":"5e1c22f8.d65d2c","order":1,"width":10,"height":4,"readyPoster":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAMAAACtqHJCAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowMzgwMTE3NDA3MjA2ODExODIyQUIzREQ3RTA0MDAyNCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpGRkU5MkM4RDJCNTkxMU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3tPuuskAAAAASUVORK5CYII=","hlsJsConfig":"{\"liveDurationInfinity\":true,\"liveBackBufferLength\":5,\"maxBufferLength\":10,\"manifestLoadingTimeOut\":1000,\"manifestLoadingMaxRetry\":10,\"manifestLoadingRetryDelay\":500}","play":"true","unload":"true","threshold":0.5,"players":["socket.io","hls.js","hls","mp4"],"x":890,"y":220,"wires":[[]]},{"id":"143a363a.17fc7a","type":"inject","z":"d4c54306.0b34c","name":"stop default","props":[{"p":"action","v":"{\"command\":\"stop\"}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"str","x":250,"y":460,"wires":[["93d74c4e.4c8fe"]]},{"id":"1d5155f9.0f929a","type":"debug","z":"d4c54306.0b34c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1259,"y":252,"wires":[]},{"id":"a03a1b22.1f27a8","type":"function","z":"d4c54306.0b34c","name":"errors","func":"const { payload } = msg;\n\nreturn { payload: payload.toString() };","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1139,"y":252,"wires":[["1d5155f9.0f929a"]]},{"id":"22984340.c40eac","type":"function","z":"d4c54306.0b34c","name":"progress","func":"const props = msg.payload.toString().split('\\n');\n\nconst progress = {};\n\nprops.forEach(item => {\n    \n    const [name, value] = item.split('=');\n    \n    if (name && value) {\n    \n        progress[name] = value;\n\n    }\n    \n});\n\nconst color = progress['progress'] === 'continue' ? 'green' : 'red';\n\nconst message = `fps: ${progress['fps']}, bitrate: ${progress['bitrate']}`;\n\nnode.status({ fill: color, shape: 'dot', text: message });\n\nreturn { payload: progress };","outputs":1,"noerr":0,"initialize":"","finalize":"","x":900,"y":460,"wires":[["f2621888.645328","fef2614e.17d3"]]},{"id":"45912098.31d65","type":"pipe2jpeg","z":"d4c54306.0b34c","name":"","x":580,"y":600,"wires":[["e382fb4.ce83a08"]]},{"id":"e382fb4.ce83a08","type":"image","z":"d4c54306.0b34c","name":"jpeg preview","width":"400","data":"payload","dataType":"msg","thumbnail":false,"active":false,"pass":false,"outputs":0,"x":870,"y":660,"wires":[]},{"id":"8b84ea34.3465f8","type":"comment","z":"d4c54306.0b34c","name":"- - - - - progress logs - - - - -","info":"","x":1189,"y":315,"wires":[]},{"id":"e1ae8181.29ed6","type":"comment","z":"d4c54306.0b34c","name":"- - - - - error logs - - - - -","info":"","x":1197,"y":217,"wires":[]},{"id":"fd12ad4d.89379","type":"comment","z":"d4c54306.0b34c","name":"- view mp4 -","info":"","x":890,"y":180,"wires":[]},{"id":"e79ecc8d.9beb5","type":"change","z":"d4c54306.0b34c","name":"ffmpeg","rules":[{"t":"set","p":"action","pt":"msg","to":"{\t   \"command\":\"start\",\t   \"args\":[\t       \"-loglevel\",\t       \"error\",\t       \"-nostats\",\t       \"-f\",\t       \"hls\",\t       \"-http_multiple\",\t       \"1\",\t       \"-re\",\t       \"-i\",\t       \"https://weather-lh.akamaihd.net/i/twc_1@92006/index_1200_av-p.m3u8?sd=10&rebase=on\",\t       \"-c:v\",\t       \"copy\",\t       \"-c:a\",\t       \"aac\",\t       \"-f\",\t       \"mp4\",\t       \"-movflags\",\t       \"+frag_keyframe+empty_moov+default_base_moof\",\t       \"pipe:1\",\t       \"-progress\",\t       \"pipe:3\",\t       \"-f\",\t       \"image2pipe\",\t       \"-vf\",\t       \"select='eq(pict_type,PICT_TYPE_I)',scale=trunc(iw/4):-2\",\t       \"-vsync\",\t       \"vfr\",\t       \"pipe:4\"\t   ]\t}","tot":"jsonata"},{"t":"set","p":"action.args[9]","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":360,"wires":[["93d74c4e.4c8fe"]]},{"id":"347d50a4.7b51a","type":"change","z":"d4c54306.0b34c","name":"stop","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"command\":\"stop\"}","tot":"json"},{"t":"set","p":"action","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":400,"wires":[["93d74c4e.4c8fe"]]},{"id":"f2621888.645328","type":"change","z":"d4c54306.0b34c","name":"Bitrate","rules":[{"t":"set","p":"payload","pt":"msg","to":"$number($substringBefore($trim(msg.payload.bitrate), \".\"))","tot":"jsonata"},{"t":"set","p":"payload","pt":"msg","to":"msg.payload / 1000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1130,"y":440,"wires":[["dee01fa3.0f35a","a5eceecb.43e02"]]},{"id":"dee01fa3.0f35a","type":"debug","z":"d4c54306.0b34c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1295,"y":420,"wires":[],"l":false},{"id":"fef2614e.17d3","type":"change","z":"d4c54306.0b34c","name":"FPS","rules":[{"t":"set","p":"payload","pt":"msg","to":"$round($number(msg.payload.fps),1)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1170,"y":520,"wires":[["d1a7c823.089578","753930bb.d3ebc"]]},{"id":"d1a7c823.089578","type":"debug","z":"d4c54306.0b34c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1355,"y":520,"wires":[],"l":false},{"id":"e9a646d5.e58d98","type":"ui_button","z":"d4c54306.0b34c","name":"stop","group":"5e1c22f8.d65d2c","order":2,"width":2,"height":1,"passthru":false,"label":"","tooltip":"","color":"","bgcolor":"","icon":"stop","payload":"stop","payloadType":"str","topic":"set_source","topicType":"str","x":140,"y":400,"wires":[["347d50a4.7b51a"]]},{"id":"85dbcbd6.699738","type":"ui_button","z":"d4c54306.0b34c","name":"play","group":"5e1c22f8.d65d2c","order":3,"width":2,"height":1,"passthru":false,"label":"","tooltip":"","color":"","bgcolor":"","icon":"fa-play","payload":"https://cph-p2p-msl.akamaized.net/hls/live/2000341/test/master.m3u8","payloadType":"str","topic":"topic","topicType":"msg","x":100,"y":360,"wires":[["e79ecc8d.9beb5"]]},{"id":"e1967c8.223478","type":"ui_button","z":"d4c54306.0b34c","name":"H.264","group":"5e1c22f8.d65d2c","order":4,"width":2,"height":1,"passthru":false,"label":"H.264","tooltip":"","color":"","bgcolor":"","icon":"","payload":"https://test-videos.co.uk/vids/jellyfish/mp4/h264/1080/Jellyfish_1080_10s_2MB.mp4","payloadType":"str","topic":"set_source","topicType":"str","x":90,"y":320,"wires":[["e79ecc8d.9beb5"]]},{"id":"34bd496a.8d01c6","type":"ui_button","z":"d4c54306.0b34c","name":"H.265","group":"5e1c22f8.d65d2c","order":5,"width":2,"height":1,"passthru":false,"label":"H.265","tooltip":"","color":"","bgcolor":"","icon":"","payload":"https://s3.amazonaws.com/senkorasic.com/test-media/video/caminandes-llamigos/caminandes_llamigos_720p.mp4","payloadType":"str","topic":"set_source","topicType":"str","x":90,"y":280,"wires":[["e79ecc8d.9beb5"]]},{"id":"e80294fe.0d2eb8","type":"ui_button","z":"d4c54306.0b34c","name":"AV1","group":"5e1c22f8.d65d2c","order":6,"width":2,"height":1,"passthru":false,"label":"AV1","tooltip":"","color":"","bgcolor":"","icon":"","payload":"https://test-videos.co.uk/vids/bigbuckbunny/mp4/av1/1080/Big_Buck_Bunny_1080_10s_2MB.mp4","payloadType":"str","topic":"set_source","topicType":"str","x":110,"y":220,"wires":[["e79ecc8d.9beb5"]]},{"id":"a5eceecb.43e02","type":"ui_chart","z":"d4c54306.0b34c","name":"","group":"5e1c22f8.d65d2c","order":7,"width":10,"height":4,"label":"Bitrate (Mbps)","chartType":"line","legend":"false","xformat":"auto","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":1380,"y":460,"wires":[[]]},{"id":"5fb39c3a.d46bd4","type":"inject","z":"d4c54306.0b34c","name":"H264","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"https://test-videos.co.uk/vids/jellyfish/mp4/h264/1080/Jellyfish_1080_10s_2MB.mp4","payloadType":"str","x":210,"y":180,"wires":[["e79ecc8d.9beb5"]]},{"id":"ed94dc9a.71033","type":"inject","z":"d4c54306.0b34c","name":"H264","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"https://test-videos.co.uk/vids/jellyfish/mp4/h264/1080/Jellyfish_1080_10s_2MB.mp4","payloadType":"str","x":670,"y":160,"wires":[["379420d.31038e"]]},{"id":"a61ae8dd.4b12d8","type":"inject","z":"d4c54306.0b34c","name":"stop default","props":[{"p":"action","v":"{\"command\":\"stop\"}","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":670,"y":200,"wires":[["379420d.31038e"]]},{"id":"753930bb.d3ebc","type":"ui_chart","z":"d4c54306.0b34c","name":"","group":"5e1c22f8.d65d2c","order":7,"width":10,"height":4,"label":"FPS","chartType":"line","legend":"false","xformat":"auto","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":1310,"y":600,"wires":[[]]},{"id":"5e1c22f8.d65d2c","type":"ui_group","name":"streams","tab":"b6843d96.72b57","order":2,"disp":false,"width":10,"collapse":false},{"id":"b6843d96.72b57","type":"ui_tab","name":"Video Benchmark","icon":"dashboard","disabled":false,"hidden":false}]

The best way to do a side by side comparison of bitrates would be to use the same input to create the separate outputs encoded with the different codecs. I have tried a little bit for the last couple of nights to get a working example, but the libaom-av1 codec with ffmpeg has not been very helpful. It freezes after making a little output (it is known to be very slow).

I can guarantee than any type of mp4 video encoded with anything other than h264 will not be compatible with node-red-contrib-mp4frag at this point. I can probably make it look for other codecs, but there has been no pressing need since those others will not be playable in the browser as a live video stream using mediasource. Maybe vlc will be able to play the live stream.

I will try to get an example posted later after I get something working.

2 Likes