RTMP Go Away: Lossless reconnections for dwell streaming

What is it:

Real-time messaging protocol (RTMP) is a popular media streaming protocol that uses Persistent Transmission Control Protocol (TCP) connections. If a connection between a live streaming client and the platform is lost, the live event data will be lost until the client can reconnect to a new server. RTMP Go Away is a new mechanism that enables the live server to send a signal to the client indicating that it must end the existing connection. This allows the client to create a new connection at a logical media boundary without losing any data.

What it does:

RTMP Go Away builds on the RTMP specification to enable live streaming clients and servers to communicate using the Go Away feature and provides a reference client implementation.

  • Specification updates: Adds a new field to the RTMP connection packet to announce the feature support and creates a new protocol message type that represents the exit signal.
  • Reference algorithm: Provides a reference implementation in FFmpeg which enables the client to reconnect at the next keyframe when it receives a go-away signal and does not cause any data loss.
  • Secure rollout: Live servers should only send the new go-away message to clients that have specified to support the new feature, to ensure that only clients that properly process the new signal will receive it.

Why it matters:

When RTMP connections from live servers are terminated, it can take up to 20 seconds for streaming clients to detect the disconnection and reconnect. During this time, valuable live content is lost, sometimes forever. RTMP Go Away provides a framework for live servers to communicate that a known disruption (e.g. host maintenance) is imminent and allows streaming clients to reconnect properly without data loss.

Get it on GitHub:

RTMP goes away

Comments are closed.