RTSP Camera Stream Diagnostics: DESCRIBE to Playback
Diagnose an RTSP camera stream from TCP connection and DESCRIBE through SETUP, PLAY, RTP, and RTCP. Use a reproducible evidence table to locate the first failed protocol boundary.
RTSP camera stream diagnostics become much faster when you stop treating “the camera has no video” as one problem. An RTSP stream crosses several boundaries: a client reaches an address and port, the RTSP control conversation describes and sets up tracks, media packets arrive through the negotiated transport, and a decoder renders the advertised codec. A black preview can originate at any one of those boundaries. The useful diagnostic result is therefore not “RTSP failed”; it is “the first evidence break is here, and these headers or packets prove it.”
This guide gives a repeatable workflow from TCP connection through DESCRIBE, SETUP, PLAY, RTP, and RTCP. It is designed for camera teams, installers, support engineers, and developers who need a short report another person can reproduce. Work only with streams and packet captures you are authorized to access.
RTSP Inspector is built for this investigation layer: preserving the control exchange and media observations so a report can point to a concrete protocol boundary instead of a vague playback symptom. It does not replace the camera’s configuration, network policy, credentials, or video decoder. Those are separate systems; the value of the workflow is knowing which one to involve next.
Fast answer: find the first failed boundary
Start at the earliest step that has evidence, then move forward only after that step is proven. The table is a compact triage model for an RTSP camera stream.
| Boundary | Evidence that it works | First evidence of failure | Likely owner or next check |
|---|---|---|---|
| Reachability | A TCP connection reaches the configured RTSP endpoint | Refused connection, timeout, wrong route, or blocked port | Network path, address, port, firewall, VPN, or camera service |
Authentication and DESCRIBE |
A response contains SDP describing one or more media tracks | 401, malformed request, unavailable path, or missing SDP |
Credentials, URL, realm/nonce exchange, camera path, proxy |
SETUP transport negotiation |
Request and response agree on the selected track and transport | 461, mismatched interleaved channels, wrong UDP ports |
Client transport policy, NAT/firewall, camera transport support |
PLAY and session lifetime |
A successful PLAY response and an active Session context |
Session error, immediate teardown, or later timeout | Session header, keepalive behavior, camera resource limits |
| RTP media | Packets match the negotiated payload type, SSRC, and sequence flow | No packets, wrong payload type, loss burst, discontinuity | Network media path, SDP mapping, packetization, sender |
| RTCP timing and health | Reports support the observed loss, jitter, and timing state | No expected reports, rising loss/jitter, clock mismatch evidence | Camera sender, network path, receiver clock/decoder logic |
| Decode and presentation | The packet stream is compatible with the decoder’s expectation | Control and media evidence are coherent but picture is still wrong | Codec configuration, decoder, application rendering |
The order matters. If the client never receives an SDP response, inspecting H.264 packetization is premature. If RTP arrives on the negotiated transport with the expected payload type, repeatedly changing the RTSP URL is usually wasted effort. Good RTSP camera stream diagnostics reduce the search space one confirmed boundary at a time.
The three-layer model: connection, control, and media
Layer 1: reach the camera service
The first question is not “does port 554 always work?” Many cameras use a common RTSP port, but an installation can use a different port, a proxy, a VPN route, or a TLS-wrapped service. The relevant question is whether the client can reach the exact host, port, and scheme configured for that camera.
Record the destination address, port, time, client network, and the result of the attempted connection. A refusal and a timeout are different evidence. A refusal usually means something answered and rejected the connection at that endpoint. A timeout may indicate filtering, a wrong route, a sleeping device, or an unreachable address. Neither result proves a codec problem.
For an encrypted RTSP deployment, also separate the transport connection from certificate or TLS negotiation. A TCP connection can succeed while a trust or handshake failure prevents the RTSP request from ever being sent. Do not collapse those observations into one line reading “camera offline.”
Layer 2: prove the RTSP control conversation
Once connected, the RTSP conversation should explain what the client asked for and what the server accepted. The key requests are normally DESCRIBE, SETUP, and PLAY; authentication and session management can add more exchanges around them. Keep the complete request line, response status, CSeq, relevant headers, and response body together. A status code without its request context rarely settles the cause.
DESCRIBE is particularly important because its SDP body declares the media tracks, codec names, payload types, clock rates, control attributes, and sometimes aggregate versus per-track control URLs. Treat SDP as a contract to test, not as decorative text. If the SDP advertises H.264 on a dynamic payload type, the RTP packets must later be interpreted using that mapping. If there are separate audio and video tracks, the client must set up the intended tracks rather than assuming one control URL fits every server.
SETUP negotiates the transport for a chosen track. Depending on the client and camera, that may mean RTP/RTCP over UDP ports or RTP interleaved on the RTSP TCP connection. Capture both sides of the Transport header. A requested UDP flow cannot be diagnosed as an interleaved TCP flow merely because the same camera works in another application. The specific negotiated parameters are the evidence.
PLAY activates the session. A successful response is useful, but it does not prove a decoded picture yet. It proves the control plane reached the playback step. The next question is whether media arrives via the agreed route and behaves like the SDP says it should.
Layer 3: verify media and timing
RTP and RTCP are where a successful control session can still turn into “no video,” corruption, freezes, or audio/video drift. Collect a short, time-bounded sample that includes the control messages and the first media packets after PLAY. This allows a report to compare what was negotiated with what was actually sent.
For RTP, the useful fields include payload type, sequence number, timestamp, marker bit where relevant, and SSRC. You do not need to diagnose every packet manually; you need enough evidence to answer focused questions: are packets present, do they use the SDP-mapped payload type, are sequence numbers advancing with gaps, did the SSRC change, and are timestamps plausible for the declared clock rate?
RTCP offers complementary evidence. Sender Reports can relate a sender’s RTP timeline to a wall-clock reference; receiver-side reports can expose observed loss and jitter. Their presence is not a guarantee that video will decode, and their absence is not automatically a fault for every camera configuration. Use RTCP to support a specific conclusion about the stream that actually emitted it.
A complete RTSP camera stream diagnostics workflow
Run the steps in order and preserve an observation at each point. This makes the result shareable with the person responsible for the next layer.
- Write down the exact target. Record the RTSP URL with secrets removed from the report, the client location, camera model or firmware if relevant, the time zone, and the start time. “Camera 3 does not work” is not enough to compare two failures.
- Test reachability. Confirm whether a TCP connection reaches the configured endpoint. If it does not, record refusal versus timeout and stop claiming that
DESCRIBEor RTP has failed; those stages have not happened. - Capture the authentication exchange. If the camera challenges the client, retain the status and relevant authentication headers without exposing passwords. A
401is evidence that the endpoint responded; it is not the same as unreachable service. The RTSP authentication loop guide covers the difference between a legitimate challenge and a repeating failed exchange. - Preserve the full
DESCRIBEresponse. Confirm the response status, content type, SDP body, and each media section. Identify the track control URLs, codec labels, dynamic payload types, and clock rates. - Match
SETUPto one track. Record the track URL and bothTransportheaders. If the response rejects the chosen transport with461 Unsupported Transport, do not jump to a decoder hypothesis. Compare the requested UDP or interleaved TCP mode with what the camera actually supports. See the RTSP 461 troubleshooting guide. - Confirm the session before and after
PLAY. Retain theSessioncontext and response status. If the stream works briefly and then stops, preserve the last keepalive or teardown-related exchange rather than only the initial success. The session timeout and keepalive guide helps isolate that pattern. - Compare RTP with SDP. Verify that packets arrive on the negotiated transport and their payload type maps to the SDP. Count missing sequence ranges and note SSRC changes rather than using a generic statement such as “packets look bad.”
- Inspect RTCP only in context. Look for Sender or Receiver Reports around the observed symptom. Use their loss, jitter, and time information as supporting evidence, then correlate it with the actual playback failure time.
- Separate decode from transport. If control is valid and the RTP stream matches the SDP, hand a compact capture or report to the decoder/application owner. Do not keep rewriting the URL when the failure is now downstream of RTSP negotiation.
Quick symptom-to-evidence table
| Symptom reported by a user | First artifact to request | What it can prove | What it cannot prove alone |
|---|---|---|---|
| “Connection refused” | Connection attempt with target host and port | The configured endpoint rejected or did not accept the path | Whether credentials, SDP, or codec are valid |
400 Bad Request on DESCRIBE |
Exact request line, URL shape, headers, and response | The server received a request it rejected as malformed | Whether RTP would work with a valid URL |
401 Unauthorized |
Challenge and follow-up request with secrets redacted | The service is reachable and authentication needs attention | That the video stream itself is broken |
461 Unsupported Transport |
SETUP request and response Transport headers |
The requested delivery mode was not accepted | That the camera is unreachable or the codec is unsupported |
PLAY succeeds but preview is black |
SDP, SETUP, first RTP packets, payload type mapping |
Whether media arrived and matches the negotiation | That a specific decoder bug is absent |
| Video starts then freezes | Last control exchange, RTP sequence ranges, RTCP around the freeze | Whether a timeout, loss pattern, or source change coincides | The exact root cause without the surrounding timeline |
| Audio and video drift | SDP clock rates, RTP timestamp progression, RTCP reports | Whether timing evidence disagrees with the advertised setup | A universal clock-rate fix for every codec or camera |
This table is deliberately evidence-first. It avoids the common support failure mode of applying every possible fix to a symptom whose first failed boundary has not been identified.
Read SDP before interpreting RTP
The Session Description Protocol is the bridge between the control and media layers. For each m= section, note the media kind, payload type list, and associated a=rtpmap attributes. Dynamic payload numbers have no useful codec meaning by themselves; their meaning comes from the SDP of that session. A packet using payload type 96, for example, must be interpreted against the mapping advertised by that stream—not against a remembered value from a different camera.
Also inspect a=control attributes. Some cameras accept an aggregate control URL for high-level commands and distinct track URLs for media setup. Others behave differently. The aggregate control URL guide explains why an apparently valid base URL can still lead to setup failures when the wrong control target is used.
Codec configuration belongs in the same evidence bundle. H.264 and H.265 streams can require decoder configuration from SDP parameters or in-band data; packetization choices affect how RTP payloads are reconstructed. Do not label a packet-loss problem as an authentication problem or a packetization problem as a firewall problem. The RTP dynamic payload type guide and H.264 FU-A guide provide focused follow-ups once SDP/RTP mismatch is the actual boundary.
Distinguish UDP blockage from an RTSP failure
An RTSP control connection can be healthy while UDP media is blocked, routed incorrectly, or filtered by a NAT, VPN, or firewall. This is why DESCRIBE and SETUP success are not enough to declare a camera working. Compare the negotiated Transport mode with the actual packet path. If the system negotiated UDP and no RTP arrives, the media path deserves inspection. If it negotiated interleaved TCP, look for the expected interleaved frames on the control connection instead of waiting for separate UDP traffic.
Avoid turning this into a universal rule that TCP is always better. Transport choice depends on the camera, network policy, latency needs, packet loss behavior, and what the receiving client supports. The correct report says what was requested, what was accepted, and what arrived—not what transport should always be used. For a focused investigation, see RTSP UDP/RTP blocked by firewall or NAT and RTSP timeout: UDP versus TCP interleaved.
Make the report reproducible
A useful RTSP camera stream diagnostic report is compact enough for another team to read but complete enough for them to trust. Include:
| Report field | Example of a useful value |
|---|---|
| Scope | “One camera, one client network, 09:42–09:45 local time” |
| Sanitized target | Scheme, host alias, port, and path without credentials |
| First failed boundary | “SETUP rejected after successful SDP” or “RTP absent after accepted UDP transport” |
| Control evidence | Request/response status, CSeq, Session and Transport details as applicable |
| SDP evidence | Track controls, codec mapping, payload types, and clock rates |
| Media evidence | Packet presence, payload type, sequence gaps, timestamp/SSRC observations |
| RTCP evidence | Relevant report timing, loss, or jitter observation when present |
| Reproduction | Client, transport choice, approximate time window, and steps |
| Next owner | Network, camera/firmware, authentication, decoder, or application team |
Redact usernames, passwords, tokens, private addresses when required, and any customer identifiers before sharing. Redaction should remove secrets, not protocol meaning: keep status codes, header names, track relationship, transport mode, and time order intact.
RTSP diagnostic QA checklist
Before closing an incident or escalating it, answer each question from captured evidence.
| QA question | Pass condition |
|---|---|
| Is the target unambiguous? | Host, port, path, client location, and test time are recorded safely |
| Was reachability actually tested? | You know whether TCP connected, refused, or timed out |
Is DESCRIBE preserved? |
Status and full SDP are available with secrets redacted |
| Is the chosen media track explicit? | The SETUP target matches the intended SDP control attribute |
| Is transport proven? | Both request and response transport parameters are recorded |
| Is playback session state known? | PLAY, Session context, and later timeout/teardown behavior are captured |
| Is RTP compared with SDP? | Payload type, sequence behavior, timestamp, and SSRC are observed in context |
| Is decoder work separated? | A coherent control/media stream is handed off instead of re-triaging RTSP |
If an answer is unknown, label it unknown in the report. Guessing fills a document but does not shorten an incident. A narrow, honest conclusion—“UDP transport was accepted but no RTP was observed on the expected path”—is more actionable than a broad claim that “the camera is broken.”
Frequently asked questions
Can an RTSP URL work in one player and fail in another?
Yes. Clients can differ in authentication handling, supported transport modes, control-URL resolution, codec support, and decoder behavior. Compare the actual DESCRIBE, SETUP, and PLAY exchanges rather than assuming the camera or URL is universally valid. A difference in one of those boundaries is a concrete lead.
Does a successful PLAY response mean the video must display?
No. It proves that the control conversation reached playback for that session. Media can still be absent, blocked, mapped to the wrong payload type, malformed for the decoder, lost, or rendered incorrectly by the application. Inspect the first RTP packets and their SDP mapping next.
What does RTSP Inspector need to diagnose a camera stream?
Start with a short authorized observation that includes the control exchange and initial media flow. The most useful artifacts are the DESCRIBE SDP, SETUP transport negotiation, PLAY response, a small RTP sample, and RTCP reports if present. The RTSP troubleshooting help and report guide explain how to organize that evidence.
When should I escalate to the decoder or application team?
Escalate when the control flow is coherent, the selected track and transport match the SDP, RTP arrives with a compatible mapping, and the visible issue remains. Supply the time-bounded evidence bundle so the receiving team can investigate codec initialization, packet reconstruction, or rendering without repeating network guesses.
Why does an RTSP stream stop after a short time?
Look at the last successful control action, session/keepalive timing, RTP sequence continuity, and RTCP around the stop. A session timeout, source resource limit, network loss burst, or SSRC/source change can produce a similar user symptom. The evidence timeline determines which hypothesis deserves the next test.
For a hands-on workflow, start with the RTSP Inspector troubleshooting guide, then use the camera-team diagnostics FAQ when you need a concise checklist for an incident handoff.
<!-- multilingual-related-reading:start -->Related guides
Continue with the same-language pages below. They cover adjacent stages without changing the canonical owner of this topic:
<!-- multilingual-related-reading:end -->