Follow the below article. I faced the same problem and SOLVEDit by reading rtsp stream from another thread and processing it with the main thread. https://blog.gopenai.com/yolo-opencv-eliminating-artifacts-in-rtsp-frame-decoding-88a9dbf47754