Issue with Reading Frames from CCTV Camera Using OpenCV via RTSP

This has nothing to do with OpenCV.

If you have

Video Encoding : H.265

on your camera then you really need to do as I suggested and decode the stream in a separate thread. If you can’t or don’t want to then try to change the GOP to 1 so that each frame can be decoded independantly. This means that every time the OS buffer overflows (because you are trying to process the frames in the same thread that you decode them in and cannot do this as fast as the source produces them) you “should” only get a single corrupted frame.

If your CCTV camera allows you to use MJPEG instead this will have the same affect.

In both cases you will most likely increase the decoding load on your CPU and definitely increase the bitrate.