Hi Walter,
[{"id":"8c6b37c4.a5aef8","type":"inject","z":"fe2c7bc6.bd49c8","name":"Start stream","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"str","x":100,"y":4850,"wires":[["dc8a0ca9.117e9"]]},{"id":"2de27e17.be3c12","type":"inject","z":"fe2c7bc6.bd49c8","name":"Stop all streams","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"str","x":110,"y":4890,"wires":[["dc8a0ca9.117e9"]]},{"id":"40f893c3.a21d1c","type":"image-info","z":"fe2c7bc6.bd49c8","name":"","x":480,"y":4940,"wires":[["21cccabd.e70df6"]]},{"id":"15f19ef2.c099d1","type":"base64","z":"fe2c7bc6.bd49c8","name":"b64","action":"str","property":"payload","x":690,"y":4720,"wires":[["8b9cf7bd.a00318"]]},{"id":"8b9cf7bd.a00318","type":"ui_template","z":"fe2c7bc6.bd49c8","group":"51c96dc0.e62d64","name":"dash oeuf","order":1,"width":6,"height":4,"format":"<img width=\"16\" height=\"360\" src=\"data:image/jpg;base64,{{msg.payload}}\"/>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":830,"y":4720,"wires":[[]]},{"id":"361bb3b.15d904c","type":"ui_switch","z":"fe2c7bc6.bd49c8","name":"on/off stream","label":"","tooltip":"","group":"51c96dc0.e62d64","order":4,"width":1,"height":1,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"true","onvalueType":"str","onicon":"","oncolor":"","offvalue":"false","offvalueType":"str","officon":"","offcolor":"","x":100,"y":4870,"wires":[["dc8a0ca9.117e9"]]},{"id":"dc8a0ca9.117e9","type":"switch","z":"fe2c7bc6.bd49c8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"str"},{"t":"eq","v":"false","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":260,"y":4830,"wires":[["2ca9755e.222aaa"],["a3c294f8.aed6b8"]]},{"id":"a3c294f8.aed6b8","type":"function","z":"fe2c7bc6.bd49c8","name":"stop","func":"msg= [\n {\n kill:'SIGTERM',\n payload : 'SIGTERM'\n }\n \n \n ]; // set a new payload & the counter\nreturn msg;","outputs":1,"noerr":0,"x":260,"y":4870,"wires":[["2ca9755e.222aaa"]]},{"id":"21cccabd.e70df6","type":"msg-speed","z":"fe2c7bc6.bd49c8","name":"","frequency":"sec","estimation":true,"ignore":false,"x":580,"y":4890,"wires":[["794946e8.e0b618","2cbb32f3.899c1e"],[]]},{"id":"2ca9755e.222aaa","type":"exec","z":"fe2c7bc6.bd49c8","command":"ffmpeg -rtsp_transport tcp -i \"rtsp://192.168.1.7:554/user=xxxxx_password=xxxx_channel=0_stream=0.sdp?real_stream\" -filter:v fps=fps=5 -f image2pipe pipe:1","addpay":false,"append":"","useSpawn":"true","timer":"","oldrc":false,"name":"Decode RTSP stream","x":450,"y":4820,"wires":[["6ec96030.22aa"],["67ffbec1.566cf"],[]],"info":"oeuf: MARCHE PAS \nffmpeg -rtsp_transport tcp -i \"rtsp://admin:271273@192.168.1.6:554/onvif1\" -f image2pipe pipe:1\n\nmisecu : MARCHE OK\nffmpeg -rtsp_transport tcp -i \"rtsp://192.168.1.7:554/user=admin_password=271273_channel=0_stream=1.sdp?real_stream\" -filter:v fps=fps=5 -f image2pipe pipe:1\n\nMARCHE OK avec le noeud pipe2jpeg :\n-----------------------------------\nameliorations : \n- fps=fps=5,scale=iw/2:-1 passe du 1080p à 960p = bon compromis qualité / charge cpu (45% => 25%)\nffmpeg -rtsp_transport tcp -i \"rtsp://192.168.1.7:554/user=admin_password=271273_channel=0_stream=0.sdp?real_stream\" -filter:v fps=fps=5,scale=iw/2:-1 -f image2pipe pipe:1\n\n- MARCHE PAS !!! ffmpeg -hwaccels c'est pour connaitre les capacité de la machine !!\n\n\n\n\nORIGINAL -> MP4:\n------------------\nffmpeg -loglevel quiet -progress pipe:1 -hwaccel auto -probesize 32 -analyzeduration 0 -reorder_queue_size 0 -rtsp_transport tcp -i rtsp://192.168.1.5:554/user=admin_password=pass_channel=1_stream=0.sdp -an -c:v copy -f mp4 -movflags +dash+negative_cts_offsets -metadata title=\"ip 192.168.1.4\" pipe:3 -c mjpeg -q 10 -r 7 -vf scale=trunc(iw*0.75/2)*2:-2 -f image2pipe pipe:4\n ou\nffmpeg -loglevel info -progress pipe:3 -hwaccel auto -analyzeduration 10000000 -probesize 1048576 -re -f hls -i http://commondatastorage.googleapis.com/gtv-videos-bucket/CastVideos/hls/TearsOfSteel.m3u8 -c:a aac -c:v copy -f mp4 -movflags +dash+negative_cts_offsets pipe:1 -c mjpeg -q 10 -r 7 -vf scale=trunc(iw*0.75/2)*2:-2 -f image2pipe pipe:4\n\n\nmisecu -> MP4 : MARCHE PAS \nffmpeg -loglevel quiet -progress pipe:1 -hwaccel auto -probesize 32 -analyzeduration 0 -reorder_queue_size 0 -rtsp_transport tcp -i \"rtsp://192.168.1.7:554/user=admin_password=vEsQc8t4_channel=0_stream=1.sdp?real_stream\" -an -c:v copy -f mp4 -movflags +dash+negative_cts_offsets -metadata title=\"ip 192.168.1.4\" pipe:3 -c mjpeg -q 10 -r 7 -vf scale=trunc(iw*0.75/2)*2:-2 -f image2pipe pipe:4\n\n\nffmpeg -loglevel quiet -progress pipe:1 -hwaccel auto -probesize 32 -analyzeduration 0 -reorder_queue_size 0 -rtsp_transport tcp -i rtsp://192.168.1.7:554/user=admin_password=vEsQc8t4_channel=0_stream=1.sdp?real_stream -an -c:v copy -f mp4 -movflags +dash+negative_cts_offsets -metadata title=\"ip 192.168.1.4\" pipe:3 -c mjpeg -q 10 -r 7 -vf scale=trunc(iw*0.75/2)*2:-2 -f image2pipe pipe:4\n\nffmpeg -loglevel quiet -progress pipe:1 -hwaccel auto -probesize 32 -analyzeduration 0 -reorder_queue_size 0 -rtsp_transport tcp -i \"rtsp://192.168.1.7:554/user=admin_password=vEsQc8t4_channel=0_stream=1.sdp?real_stream\" -an -c:v copy -f mp4 -movflags +dash+negative_cts_offsets -metadata title=\"ip 192.168.1.54\" pipe:3 -c mjpeg -q 10 -r 7 -vf scale=trunc(iw*0.75/2)*2:-2 -f image2pipe pipe:4\n\n\nRTSP : j'ai enlevé -vf scale=trunc... + remplace +dash+negative... par +frag_keyframe\n------------------------------------------------------------------------------------------- MARCHE PAS !\nffmpeg -loglevel quiet -progress pipe:1 -hwaccel auto -probesize 32 -analyzeduration 0 -reorder_queue_size 0 -rtsp_transport tcp -i \"rtsp://192.168.1.7:554/user=admin_password=271273_channel=0_stream=1.sdp?real_stream\" -an -c:v copy -f mp4 -movflags +frag_keyframe -metadata title=\"ip 192.168.1.54\" pipe:3 -c mjpeg -q 10 -r 7 -f image2pipe pipe:4\n\n\n\n"},{"id":"794946e8.e0b618","type":"ui_valuetrail","z":"fe2c7bc6.bd49c8","group":"51c96dc0.e62d64","order":3,"width":3,"height":1,"name":"","label":"","blur":false,"minmax":false,"showvalue":false,"decimals":"0","colorLine":"#ff9900","colorFromTheme":true,"stroke":2,"property":"payload","pointcount":"24","x":800,"y":4880,"wires":[]},{"id":"2cbb32f3.899c1e","type":"ui_text","z":"fe2c7bc6.bd49c8","group":"51c96dc0.e62d64","order":5,"width":1,"height":1,"name":"fps","label":"{{msg.payload}}fps","format":"","layout":"row-center","x":790,"y":4920,"wires":[]},{"id":"67ffbec1.566cf","type":"debug","z":"fe2c7bc6.bd49c8","name":"complet","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":680,"y":4830,"wires":[]},{"id":"66df6954.82e7b8","type":"image","z":"fe2c7bc6.bd49c8","name":"","width":"600","data":"payload","dataType":"msg","thumbnail":false,"active":false,"pass":false,"outputs":0,"x":540,"y":4650,"wires":[]},{"id":"6ec96030.22aa","type":"pipe2jpeg","z":"fe2c7bc6.bd49c8","name":"","x":510,"y":4720,"wires":[["40f893c3.a21d1c","15f19ef2.c099d1","66df6954.82e7b8"]]},{"id":"51c96dc0.e62d64","type":"ui_group","z":"","name":"camOeuf","tab":"250de740.57ee78","order":9,"disp":true,"width":"6","collapse":true},{"id":"250de740.57ee78","type":"ui_tab","z":"","name":"Dashboard","icon":"dashboard","order":1,"disabled":false,"hidden":false}]
- here is a flow of what I was able to make work with my IP cams in rtsp. Don't forget to install the
npm install node-red-contrib-pipe2jpeg
- In the EXEC node there is the rtsp address "rstp: // ...". Try with your public cam address.
Enjoy Chris
PS : I would look at your link to update FFMPEG as soon as I find 5 minutes free