Back to All Guides
troubleshootingAugust 12, 20266 min readRTSPLink Engineering

Fixing MediaMTX "source not ready" and "timed out waiting for keyframe"

Troubleshoot publisher disconnects and keyframe generation timeouts in MediaMTX / rtsp-simple-server.

#MediaMTX#Keyframe Timeout#rtsp-simple-server#Troubleshooting
Live Stream Workbench

Need a live RTSP stream link right now to test this setup in VLC or OpenCV?

Test Live Stream

#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:

mediamtx.yml Fix
paths:
  my_camera:
    source: rtsp://admin:pass@192.168.1.64:554/Streaming/Channels/101
    sourceOnDemand: yes
    sourceOnDemandStartTimeout: 15s

Ready to test your live RTSP video stream?

Generate free authenticated RTSP links with unlimited bandwidth and inspect frame timestamps in seconds.

Generate Free RTSP Link

Related Tutorials & Setup Guides

View all 100+ guides