Lesson 5 of 9 · 24m
Live Ingest: RTMP, SRT, WebRTC, and the First Ten Seconds
Choose contribution protocols deliberately, understand handshake and packet-loss behavior, and design ingest so fragile networks do not become viewer-facing incidents.
Live streaming starts before your transcoder. It starts on somebody's hotel Wi-Fi, bonded cellular encoder, venue network, or OBS workstation. If contribution is bad, no downstream architecture can invent the missing frames. Your job is to make damage visible early and contain it before it reaches the audience.
Contribution and distribution are different problems
RTMP, SRT, and WebRTC are often discussed as if interchangeable. They are not:
RTMP simple encoder support, TCP, aging ecosystem, sensitive to loss
SRT UDP with retransmission/ARQ, encryption, designed for unreliable networks
WebRTC very low latency interactive media, more complex sessions and scaling
HLS/DASH distribution formats, not ideal high-quality contribution protocolsRTMP remains common because encoders support it everywhere. TCP ordering means loss becomes head-of-line blocking, so jitter and retransmission delay can turn into timestamp gaps. SRT gives you controlled latency and selective retransmission behavior, usually a better fit for contribution across the public internet. WebRTC is excellent when sub-second interaction matters, but operating it as broadcast contribution requires more session and bandwidth discipline than teams expect.
The ingest endpoint is a policy boundary
Authentication should bind stream keys to channels and expiry windows. Rotate keys, scope them by ingest region, and never publish permanent stream keys in encoder images shared across events. A simple ingest URL is not a security design:
srt://ingest-use1.example-video.net:9000?streamid=publish/channel-42/episode-17On the server, bind the publisher identity to a provisioning record before accepting media. If anyone who guesses a stream name can publish, you eventually host somebody else's content under your customer's channel.
Transmux, transcode, or both?
If the contribution codec and bitrate are already suitable, you may transmux it into HLS or DASH without re-encoding video. That saves money and latency but makes you inherit encoder keyframe cadence, bitrate spikes, timestamp behavior, and codec profile quirks. Transcoding gives control at compute cost. Many platforms accept a high-quality contribution feed and generate a controlled distribution ladder from it.
Measure ingest as a signal chain
Do not alert only on "stream connected." Monitor bitrate stability, keyframe interval, audio/video timestamp drift, packet retransmission, jitter, frame drops, and silence. The first ten seconds tell you a lot:
bitrate oscillates wildly possible encoder rate-control or network issue
keyframe interval unstable bad switching boundaries downstream
audio leads video increasingly timestamp or clock-source drift
SRT retransmissions high lossy upstream path; latency budget may collapseOperators need those symptoms before viewers report buffering. A dashboard that only shows outbound viewer traffic is downstream telemetry, not ingest observability.
Failover starts before failure
Contribution failover can mean two encoders, two network paths, two ingest regions, or merely a rehearsed restart procedure. At minimum, the control plane should distinguish primary active, backup hot, backup publishing, and failover decision state. Two encoders publishing conflicting media under one identity is not redundancy; it is a race condition.
Field notes
- Do not expose ingest hostnames meant for contribution as public playback endpoints.
- Record what the encoder claimed in its settings and what the probe actually observed; they disagree often.
- Keep bitrate headroom. A saturated uplink makes retransmission impossible precisely when it is needed.
- Test reconnect behavior. The difference between a ten-second blip and a duplicate stream is implementation detail.
Was this lesson helpful?