I am working in a transcoder to capture a camera stream and transcode it to send a multibitrate encrypted stream.
So far, so good.
The problem is that sometime the stream crashes and keep sending black frames (or the some frozen frame continuously), so the ffmpeg is running but there is no image (just the black stream or the frozen frame, as I stated).
The imput is working.
I think this can be caused by some momentanous problem with the input stream wich makes ffmpeg loose the sync.
I want to detectt when the output frames doesn't change and restart the bash script wich is using ffmpeg.
At this time I am using a compex filter to detect when there is no change of the frames for the last 20 seconds (600 frames).