Detect situation where RTSP camera is not displaying image

Hi guys,
I have a few cameras. Some of them are working all the time and some not for many reasons. Like some error in demuxing stream etc. Is there a way to detect that they are not working and not display them in picture-entity card?