I have a problem that I'm hoping some of the great minds here could help me with.
I have a CCTV system that provides 4 RTSP streams (one from each camera) that will be covering a short 60 second event (roughly, so I can't predefine a duration). The issue I have is I need FFMPEG to take clips from the stream triggered from a JSON feed. There are two commands or states, Door Open - Stop Recording and Door Closed - Begin Recording.
Now getting FFMPEG to start recording on the door close is pretty simple in batch as I'm currently experimenting HOWEVER I can't seem to find a way to get FFMPEG to start recording and then stop recording on demand. In batch it's pretty straight forward using Ctrl+C to have FFMPEG commit the recording to file. The question is, how do I get FFMPEG PHP to send a command to an already closed handle to stop the recording and commit to file?
Many Thanks, Josh