Ingress
Ingress takes streams from streaming software and broadcast equipment over RTMP, RTMPS and SRT and publishes each one at a path. The stream key is a Tablebox token; Ingress only converts, and holds no keys, settings or state of its own.
Sending a stream
| Protocol | Address | Key |
|---|---|---|
| RTMP | rtmp://{ingress host}/{app} |
Stream key: the token; the app name is free |
| RTMPS | rtmps://{ingress host}/{app} |
The same |
| SRT | srt://{ingress host}:{port} |
Stream ID #!::r={token},m=publish |
The Ingress host and its SRT port are in Reference. In OBS, set the server to rtmp://{ingress host}/live and the stream key to the token. With ffmpeg, send to rtmp://{ingress host}/live/{token}, or to srt://{ingress host}:{port}?streamid= followed by the stream ID, percent-encoded.
The stream key
The key is a token as Connecting describes, whose publish is exactly one pattern: a literal path, with no wildcard. The stream is published at that path, relative to the token's root. For SRT the token is at most 496 bytes, so that the stream ID fits SRT's 512 bytes: a short root, sub and path keep it there.
// A stream key for Ingress: a token whose publish is one literal path, here studio/main.
import { sign } from './token.ts';
console.log(await sign('studio', { publish: ['studio/main'] }));What is published
While the stream lasts, the token's path holds a hang broadcast: catalog.json and one track per rendition the sender sends, as sent, without re-encoding. Browsers watching through the official player decode H.264 video and AAC audio, which OBS sends by default, and Egress passes such a broadcast on to streaming services unchanged.
The stream runs as a session of the token: its sub, root, rights and usage are the token's. The token's exp is checked when the stream starts, and the stream runs until the sender stops or Relay ends the session (a removal, a closing or a limit), which closes the stream connection. Every Ingress instance accepts every stream.
Failures
- The key is no token, Relay refuses it, or its
publishis not one literal path: the stream connection closes before media flows. RTMP senders see the reason's name (ffmpeg prints it); SRT senders see a rejection without it. - Ingress accepts a stream once its session has stayed open for 1 s without Relay closing it, so every stream starts at least 1 s after its sender asks.
- Relay unreachable or the session ends: the stream connection closes, and the sender's own reconnect tries again with the same key.
- Two streams with the same key at once: both are published, and readers stay on the first until it ends.
- An Ingress instance stops: its streams end, and senders reconnect to an instance behind the same address.