Nearglass
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 haveUseStream ingestSoundPage
OBS, vMix or a hardware encoderSRT (recommended)srtAAC-LC or OpusOBS and SRT
An encoder that only speaks RTMPRTMP or RTMPSrtmp, rtmpsAAC-LC or OpusRTMP and RTMPS
OBS's WHIP output, or a browserWHIPwhipnot yetWHIP
A script, a file, a test pattern, a cameraffmpeg over SRT or RTMPsrt, rtmpAAC-LC or Opusffmpeg
An H.264 file, or a Rockchip board with a camerathe nearglass publish commandanynone for a file or cameraThe Nearglass command
Your own device and its encoderthe C library, nearglass.hsdknoneDevices

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 nearglass command 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.