Publish
Choose how to publish
Which way to send video to a stream, from OBS to your own device, and what each one carries.
A stream takes video from one publisher at a time. Which ways it accepts is
the stream's ingest list, set when you create it (default ["rtmp", "srt"]; the choices are rtmp, rtmps, srt, whip and sdk). Whatever
you send, the video is not re-encoded: H.264 goes through bit for bit, and
the ingest repackages it for the relays.
| You have | Use | Stream ingest | Sound | Page |
|---|---|---|---|---|
| OBS, vMix or a hardware encoder | SRT (recommended) | srt | AAC-LC or Opus | OBS and SRT |
| An encoder that only speaks RTMP | RTMP or RTMPS | rtmp, rtmps | AAC-LC or Opus | RTMP and RTMPS |
| OBS's WHIP output, or a browser | WHIP | whip | not yet | WHIP |
| A script, a file, a test pattern, a camera | ffmpeg over SRT or RTMP | srt, rtmp | AAC-LC or Opus | ffmpeg |
| An H.264 file, or a Rockchip board with a camera | the nearglass publish command | any | none for a file or camera | The Nearglass command |
| Your own device and its encoder | the C library, nearglass.h | sdk | none | Devices |
How to choose:
- Start with SRT when your encoder has it. It recovers lost packets without stalling the picture, and you can tune how long it waits.
- RTMP is the one every encoder has. A lost packet stalls the whole connection until it is resent, and the encoder's own buffering is outside our control.
- WHIP is the choice for a browser or an encoder that speaks WebRTC. It carries video only for now: a stream sent over WHIP plays without sound. Use SRT or RTMP for sound.
- The
nearglasscommand and the C library talk to the relays directly, with a publisher token instead of a stream key. They need no ingest address, and so get no LL-HLS copy: Safari and iPhone viewers cannot play those streams. Which player plays what is on What works with what.
The rules for the picture are the same for every route: H.264, a keyframe every second (2 at most), no B-frames, constant bitrate. They are in the table on OBS and SRT. What sound is carried, and what is not, is on Audio.