Howto take a snapshot from DVR video streams

hello,
i am a real beginner with node-red. since hours i try to get a flow that can take a snapshot from a chinese H264 DVR. All examples i found are working with IP-Cameras. With python and VLC i could get a snapshot from the DVR channel but i did not succeed in node-red.
Maybe someone solved already my problem and can give me some hints how to do it.

thanks joachim

Does the DVR have an snap shot url?
https://www.ispyconnect.com/man.aspx?n=NVR

No, as far as i know, it is a h264 DVR from KKmoon and i didn't find such information

This is what i'm using, it's a flow made by @BartButenaers. I can't find the original post from Bart anymore so maybe some details are missing about the functionality.
It uses ffmpeg to grab one frame from an rtsp stream and shows it on the dashboard.

[{"id":"e6d7a538.b0e33","type":"exec","z":"44908087.da8e9","command":"ffmpeg -i \"rtsp://192.168.1.95:10554/user=nodered&password=nodered&channel=3&stream=1.sdp\" -frames 1 -qscale 1 -y -f image2","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Grab a frame","x":580,"y":220,"wires":[["e80e611c.69cc"],[],["7a9db4.0b5b624c"]]},{"id":"e80e611c.69cc","type":"ui_template","z":"44908087.da8e9","group":"8a3c9e66.456668","name":"StaticImageCam3voor","order":2,"width":0,"height":0,"format":"<body>\n\n<p>\n<a href=\"/grabcam3.jpg\" target=\"_blank\">\n<img border=\"0\" alt=\"CamVoorGrab\" src=\"/grabcam3.jpg\" width=\"800\"  height=\"800\">\n</a>\n</p>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":1020,"y":200,"wires":[[]]},{"id":"211f7471.71d28c","type":"change","z":"44908087.da8e9","name":"Set filename","rules":[{"t":"set","p":"payload","pt":"msg","to":"/home/pi/node-red-static/grabcam3.jpg","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":220,"wires":[["e6d7a538.b0e33"]]},{"id":"f5b27e.636d658","type":"inject","z":"44908087.da8e9","name":"Test","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":170,"y":220,"wires":[["211f7471.71d28c"]]},{"id":"8a3c9e66.456668","type":"ui_group","name":"Cam Voor","tab":"a9c4216b.d97f1","order":1,"disp":true,"width":"16","collapse":false},{"id":"a9c4216b.d97f1","type":"ui_tab","name":"Cam 1 Grab","icon":"fa-video-camera","order":25,"disabled":false,"hidden":false}]

thanks, it is almost running, i could grab the image but i cannot see it in the dashboard
: Error "Cannot GET /home/pi/node-red-static/grab.jpg" .....

Hi Joachim,
You try to access with your browser an image that is stored somewhere in one of your local folders. If that should work, then everybody on this planet which would try to access /home/... would end up on your computer. So luckily for you that doesn't work.
You should put your image in a public accessible folder (which I think you have already done, when I look at your folder name?). But then you also need to access that folder on your computer via an url. That question has already been asked LOTs of times, e.g. you can look here.
Good luck with it!
Bar

thanks for that advice .......i'm a beginner ....

1 Like

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