Fixing MediaMTX "source not ready" and "timed out waiting for keyframe"
Troubleshoot publisher disconnects and keyframe generation timeouts in MediaMTX / rtsp-simple-server.
Need a live RTSP stream link right now to test this setup in VLC or OpenCV?
#1Increasing Start Timeout in mediamtx.yml
Some cameras take 3-5 seconds to generate the first I-frame. Increase sourceOnDemandStartTimeout to 15s in your configuration:
paths:
my_camera:
source: rtsp://admin:pass@192.168.1.64:554/Streaming/Channels/101
sourceOnDemand: yes
sourceOnDemandStartTimeout: 15sReady 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+ guidesMediaMTX (rtsp-simple-server) Complete Streaming Server Guide
Master MediaMTX configuration. Learn how to proxy IP camera feeds, set up on-demand publishing, and authenticate clients with authHTTP.
troubleshootingFixing "Connection Refused" and "401 Unauthorized" in RTSP Streams
Diagnose and fix RTSP 401 Unauthorized errors, Digest authentication mismatches, and Connection Refused network issues.
codeScalable Kubernetes (K8s) MediaMTX & RTSP Gateway Deployment
Comprehensive guide to deploying MediaMTX and RTSP proxy gateways in Kubernetes with UDP port routing and session affinity.