Fixing Grey Screens, Smearing & Macroblocking in RTSP Streams
Solve UDP packet drops, missing keyframes (I-frames), and decode corruption in live surveillance feeds.
Need a live RTSP stream link right now to test this setup in VLC or OpenCV?
#1The Root Cause: Lost P-Frames without Keyframe Refresh
H.264 video relies on periodic Keyframes (I-Frames) to refresh the entire image. If UDP transport drops packets during high-motion scenes, the decoder cannot render intermediate P-Frames, causing the image to turn grey until the next I-Frame arrives.
#2The Permanent Solution
1. Force TCP transport in your client (-rtsp_transport tcp).
2. In camera video settings, set Keyframe Interval (GOP) equal to or double the frame rate (e.g. 30 FPS = GOP 30 or 60).
Ready to test your live RTSP video stream?
Generate free authenticated RTSP links with unlimited bandwidth and inspect frame timestamps in seconds.
Related Tutorials & Setup Guides
View all 100+ guidesFixing "Connection Refused" and "401 Unauthorized" in RTSP Streams
Diagnose and fix RTSP 401 Unauthorized errors, Digest authentication mismatches, and Connection Refused network issues.
troubleshootingFixing VLC Media Player RTSP Stream Stuttering and 1-Second Lag
Tutorial on eliminating video stuttering and 1000ms delay when streaming high-resolution RTSP camera feeds in VLC.
troubleshootingFixing Python OpenCV RTSP Buffer Lag & Frame Accumulation
Learn the exact 3 ways to fix OpenCV VideoCapture buffer buildup: threading grabbers, CAP_PROP_BUFFERSIZE=1, and FFMPEG environment options.