Hello again, I did not have time to continue with this, so I will leave what I have done for the moment.
FFmpeg is surely what I'm looking for
it helps me to stream on node.js and node-Red, but when recording on node-network, it gives me errors if I don't assign the parameter "-t" (a timer)
To stream i gonna use rtsp-stream like this :
then on a html i did:
To record directly from the stream:
When i have time , i gonna continue with this proyect
Any comments to help me are well received
links: FFmpeg page
meanwhile, in node red:
[{"id":"4ff3a126.4214d","type":"exec","z":"85a6a280.b9cef","command":"fmepg -f rtsp -i \"rtsp://user:password@your rtsp dir here\" -f image2pipe pipe:1","addpay":false,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"Decode RTSP stream","x":1500,"y":1360,"wires":[["4ba72b96.2470c4"],[],[]]},{"id":"ceecc1f7.952bd","type":"inject","z":"85a6a280.b9cef","name":"Start stream","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":1030,"y":1360,"wires":[["4ff3a126.4214d"]]},{"id":"4ba72b96.2470c4","type":"image","z":"85a6a280.b9cef","name":"","width":"500","x":1740,"y":1360,"wires":[]},{"id":"2b94ff5e.931a1","type":"change","z":"85a6a280.b9cef","name":"","rules":[{"t":"set","p":"kill","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1270,"y":1400,"wires":[["4ff3a126.4214d"]]},{"id":"baa491b5.74464","type":"inject","z":"85a6a280.b9cef","name":"Stop all streams","topic":"","payload":"SIGTERM","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":1040,"y":1400,"wires":[["2b94ff5e.931a1"]]},{"id":"130e0105.6940af","type":"exec","z":"85a6a280.b9cef","command":"fmepg -i \"rtsp://user:password@your rtsp dir here\" -t 10 -acodec copy -vcodec copy \"Your file direc. here\" -y","addpay":false,"append":"","useSpawn":"false","timer":"0","oldrc":false,"name":"Record RTSP stream","x":1500,"y":1660,"wires":[["1aa2ccc2.66ce13"],["1aa2ccc2.66ce13"],["1aa2ccc2.66ce13"]]},{"id":"8da68e48.8aedc","type":"inject","z":"85a6a280.b9cef","name":"Start stream","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":1050,"y":1640,"wires":[["130e0105.6940af"]]},{"id":"1aa2ccc2.66ce13","type":"debug","z":"85a6a280.b9cef","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1790,"y":1660,"wires":[]},{"id":"c0861826.960798","type":"comment","z":"85a6a280.b9cef","name":" here y copy the codec, i set a time and i force the overwrite to a file","info":"fmepg -i \"rtsp://user:password@your rtsp dir here\" -t 10 -acodec copy -vcodec copy \"Your file direc. here\" -y","x":1440,"y":1580,"wires":[]}]