I'm trying to take snapshots of my camera's rtsp stream. Stream is working on PC which is on the same LAN network as RPi400 with home assistant and node red.
There I'm unable to get it working.
I get this error "at least one output file must be specified"
So I tried to edit command to
ffmpeg -i "rtsp://user:pass@192.168.15.121:554/stream1" -frames:v 1 -y -f image2 - frame_%d.png
This is generating file for each frame coming from the camera feed. However, I wanted just 1 frame.
So I edited the command to
ffmpeg -i "rtsp://user:pass@192.168.15.121:554/stream1" -frames:v 1 -y -f image2 - frame.png
Generating 1 file "frame.png" but gets error message - Could not get frame filename number 2 from pattern 'frame.png'. Use '-frames:v 1' for a single image, or '-update' option, or use a pattern such as %03d within the filename.
When I try to use any of the commands above in node red exec node, it says pid:xxx and then gives me error:1
So I reckon there must be 2 problems.
1, My command is not exactly as it should be.
2, Even with bad command, exec node isn't generating file as my windows machine does.
I don't think that is correct. If Append msg.payload is not set then the full command string can be specified in the Exec node. The node does not know the difference between different bits of the command, it just sends the complete string (with payload appended if specified) to the system.
@colin, your right...hmmm, I was under the impression that the command parameters needed to be in the 'options'. I ran into something like this a long time ago. I wonder if it changed at some point Iand I missed it (verry likely that I missed it.)
I believe the purpose of the extra input parameters field is so that the command and parameters can be built up from three parts. First from the Command Field then (if enabled) the payload is concatenated, and then the extra parameters field on the end. If not using the payload then it can all just go in the Command field.
Yeah! A wise man (whoâs user name starts with âdceeâŚâ) once told me, build the entire command in the node before the exec node, leave the command empty and check off the append msg.payload.
Solved. The problem was a bad command structure.
The one I use now is this:
ffmpeg -i "rtsp://user:pass@192.168.15.121:554/stream1" -frames:v 1 -y -f image2 "/config/Test/frame_$(date '+%s').jpg"