When an RTSP camera works 95% of the time and falls apart at the worst possible moment, you usually don't have a network problem — you have a session problem. Here is the checklist I run before I touch the camera config or the VMS.
1. Confirm the session actually opens
The first thing to check is whether DESCRIBE returns a valid SDP. If the server replies with a 401 before SDP, your credential realm is wrong; if it returns SDP with m=video 0, the server is advertising a track it cannot actually serve. Don't proceed until DESCRIBE returns something usable.
2. Read the SDP like a packet, not a string
Two things matter most:
- The
rtpmapandfmtplines tell you exactly what the encoder is sending. If the camera says H.264 High@L4.1 but your decoder caps at Baseline, you will get a green wall, not an error. - The
a=rtcpanda=controlattributes decide whether RTCP feedback and per-track SETUP will actually work. Ifa=controlis missing or duplicated, SETUP will hang forever even though DESCRIBE looked fine.
3. Watch the timing, not just the bytes
RTP streams fail in two flavors: late packets and missing sequence numbers. With tcpdump and Wireshark I look at the inter-packet delta first — a 30 fps stream should sit near 33 ms, not 100 ms — and then at gaps in the sequence number. A consistent 33 ms with periodic sequence gaps usually means the camera is dropping at the encoder, not on the wire.
4. Inspect the interleaved binary
For RTSP-over-TCP (the RTP/AVP/TCP;interleaved= case), the failure mode is different. The interleaved channel can stop interleaving, and then your "RTSP" connection is silently just TCP. Open the TCP stream, count the $ framing bytes, and confirm the server is still emitting interleaved RTP and not just keepalive.
5. Decide what you actually need to repair
Most of the time the diagnosis above points to one of three fixes: tweak the encoder profile, change the transport from UDP to TCP (or vice versa), or move the camera off a congested switch port. Sometimes the answer is that the recording you already have is fine but needs clean re-muxing.
If you want a faster loop on steps 2–4, RTSP Inspector is a local desktop tool I built that walks you through the same checklist with the actual SDP, RTP timing, and interleaved framing laid out next to each other. Disclosure: I am the author.
Top comments (0)