Hi folks,
Based on another discussion (a.o. with @wym and @janvda) I developed the node-red-contrib-ui-media-recorder node, which can record video from the webcam via the Node-RED dashboard.
I'm still stuck on this discourse issue, so would be nice if somebody could help me with it...
And would be nice to get some creative ideas about this one:
Currently I use hardcoded settings for the video (e.g. 640x460), but that should be configurable in the dashboard. Indeed this must be done in client-side, since the server-side doesn't know anything about the hardware capabilities of the connected client devices...
Since the node is not published on NPM yet, you can install it directly from my Github repository:
npm install bartbutenaers/node-red-contrib-ui-media-recorder
And finally a short demo (which requires the node-red-contrib-image-output node):
[{"id":"fc4adf7d.8a73e","type":"ui_button","z":"30fb1577.8f556a","name":"Snapshot image","group":"e5e4ba3f.5290e8","order":2,"width":0,"height":0,"passthru":false,"label":"Snapshot image","tooltip":"","color":"","bgcolor":"","icon":"fa-camera","payload":"take_picture","payloadType":"str","topic":"","x":340,"y":320,"wires":[["63f84e8b.d1da4"]]},{"id":"19263e4c.dd3d92","type":"change","z":"30fb1577.8f556a","name":"","rules":[{"t":"set","p":"interval","pt":"msg","to":"1000","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":200,"wires":[["63f84e8b.d1da4"]]},{"id":"85d109dc.a129a8","type":"ui_button","z":"30fb1577.8f556a","name":"Hide video","group":"e5e4ba3f.5290e8","order":3,"width":0,"height":0,"passthru":false,"label":"Hide video","tooltip":"","color":"","bgcolor":"","icon":"fa-eye-slash","payload":"hide_video","payloadType":"str","topic":"","x":350,"y":160,"wires":[["63f84e8b.d1da4"]]},{"id":"5f1946d0.9b5cb8","type":"ui_button","z":"30fb1577.8f556a","name":"Show video","group":"e5e4ba3f.5290e8","order":4,"width":"0","height":"0","passthru":false,"label":"Display video","tooltip":"","color":"","bgcolor":"","icon":"fa-eye ","payload":"display_video","payloadType":"str","topic":"","x":350,"y":120,"wires":[["63f84e8b.d1da4"]]},{"id":"ab2a14e4.1942e8","type":"ui_button","z":"30fb1577.8f556a","name":"Start timer","group":"e5e4ba3f.5290e8","order":5,"width":0,"height":0,"passthru":false,"label":"Start timer","tooltip":"","color":"","bgcolor":"","icon":"fa-clock-o","payload":"start_timer","payloadType":"str","topic":"","x":150,"y":200,"wires":[["19263e4c.dd3d92"]]},{"id":"9914e0da.b67ca","type":"ui_button","z":"30fb1577.8f556a","name":"Stop recording","group":"e5e4ba3f.5290e8","order":7,"width":0,"height":0,"passthru":false,"label":"Stop streaming/timer","tooltip":"","color":"","bgcolor":"","icon":"fa-hand-paper-o","payload":"stop","payloadType":"str","topic":"","x":340,"y":240,"wires":[["63f84e8b.d1da4"]]},{"id":"8bbecf73.74861","type":"ui_button","z":"30fb1577.8f556a","name":"Start streaming","group":"e5e4ba3f.5290e8","order":6,"width":0,"height":0,"passthru":false,"label":"Start streaming","tooltip":"","color":"","bgcolor":"","icon":"fa-video-camera","payload":"start_streaming","payloadType":"str","topic":"","x":340,"y":280,"wires":[["63f84e8b.d1da4"]]},{"id":"c4f6319c.2ccde","type":"image","z":"30fb1577.8f556a","name":"","width":160,"x":800,"y":120,"wires":[]},{"id":"63f84e8b.d1da4","type":"ui_media_recorder","z":"30fb1577.8f556a","group":"e5e4ba3f.5290e8","name":"","order":1,"width":0,"height":0,"mediaType":"video","allowVideoDisplay":true,"startupVideoDisplay":false,"x":580,"y":120,"wires":[["c4f6319c.2ccde"]]},{"id":"e5e4ba3f.5290e8","type":"ui_group","z":"","name":"Recorder demo","tab":"4c302198.634e8","disp":true,"width":"6","collapse":false},{"id":"4c302198.634e8","type":"ui_tab","z":"","name":"Media test","icon":"fa-video-camera","disabled":false,"hidden":false}]
As always, all 'constructive' feedback is highly appreciated...
Have fun with it!
Bart