Documentation

Encoder settings

How to set up OBS, a hardware encoder, or a production truck to stream to live.sinn.dev. Any encoder that can stream over RTMPS or SRT works.

Streams are received by Cloudflare Stream Live. The settings below follow Cloudflare's requirements and recommendations, plus a few rules specific to live.sinn.dev.

Server and stream key

Every stream needs two values: the server and a stream key.

FieldValue
Serverrtmps://rtmps.sinn.dev:443/live/
Stream keyShown in the dashboard. It is different for each stream.

To find your stream key, sign in to the dashboard and open your event. Each live input under Live Stream Inputs lists its URL and stream key. If your event uses a truck route, the key is on the truck route page instead, and it stays the same for the whole season.

Treat the stream key like a password. Anyone who has it can broadcast to your stream.

SRT

Cloudflare Stream also accepts SRT, in caller mode only. An SRT connection uses its own URL, stream ID, and passphrase instead of the server and stream key above. To stream over SRT, contact us for connection details.

Required settings

From Cloudflare's Stream Live requirements, plus the platform rules marked below. Streams that don't meet these may be rejected, or may fail to produce match videos.

SettingValueWhy
ProtocolRTMPS or SRTThe two protocols Cloudflare Stream accepts. SRT must use caller mode.
Video codecH.264The only video codec the ingest accepts. HEVC (H.265) and AV1 are not supported.
GOPClosedAny B-frames must refer only to frames in the same GOP. This is the default in most encoders, including OBS.
Audio codecAAC (ADTS)The only audio codec the ingest accepts. AAC-LATM is not supported.
Auto-reconnectOnCloudflare requires encoders to reconnect after a drop, and continues the stream when they do.
Stream delayOffPlatform rule. Match videos are cut by match time, so a delay shifts every clip.

From Cloudflare's Stream Live recommendations and live stream troubleshooting guide.

SettingRecommendedNotes
Rate controlCBR (constant bitrate)Cloudflare recommends CBR over VBR for a stable stream without buffering.
Keyframe interval4 seconds, fixedCloudflare's starting point. Lower it to 2 s if latency is too high. Never leave it on "auto" or 0.
Video bitrate8,000 kbps maximumOr 70% of your upload speed, whichever is lower. Streams are delivered at up to 1080p60, so a higher bitrate adds nothing.
Upload speedAt least 20 MbpsMeasured at the venue, on the connection the encoder uses.
Resolution and frame rate1920×1080, 30 fpslive.sinn.dev suggestion; Cloudflare doesn't set one. 1080p60 is the most the stream is delivered at, and fits within the 8,000 kbps cap. Drop to 1280×720 if upload is limited.

Cloudflare accepts keyframe intervals up to 8 seconds, but live.sinn.dev forwards your stream to YouTube, which accepts at most 4 seconds. Stay between 2 and 4.

Match videos are re-encoded at 6,000 kbps, so a higher bitrate improves the live stream but not the match videos. Use a wired connection.

On event day

Match videos are cut from the recording of your stream, using the match start and score reveal times from the official results. That only works while the stream is connected.

  • Start streaming before the first match and stop after the last scores are shown.
  • Don't stop the stream between matches. Keep it running through breaks and lunch.
  • If the stream drops during a match, that match won't get a video from the stream. Later matches are clipped normally once it reconnects.
  • Keep the field and the score screen on program output. The match video is exactly what your stream shows, from just before the match starts to just after the scores appear.

OBS Studio setup

These steps use OBS Studio 30 or later. Menu names can differ slightly between versions.

  1. Settings → Stream
    • Service: Custom...
    • Server: rtmps://rtmps.sinn.dev:443/live/
    • Stream Key: your key from the dashboard
  2. Settings → Output. Set Output Mode to Advanced, then on the Streaming tab:
    • Video Encoder: x264, or a hardware H.264 encoder such as NVIDIA NVENC H.264 or Apple VT H264 Hardware Encoder
    • Rate Control: CBR
    • Bitrate: 8000 Kbps at most, or 70% of your upload speed if that is lower
    • Keyframe Interval: 4 s
    Don't pick an HEVC or AV1 encoder.
  3. Settings → Output → Audio. Leave the audio encoder on AAC, which is OBS's default.
  4. Settings → Video. Set Base and Output Resolution to 1920x1080, and Common FPS Values to 30.
  5. Settings → Advanced
    • Stream Delay: unchecked
    • Automatically Reconnect: checked

Hardware encoders and trucks

Choose the custom RTMPS destination (sometimes listed as RTMP with a TLS option). Enter the server and stream key from above, and apply the required settings.

Some devices take a single URL instead of separate fields. In that case, add the stream key to the end of the server:

rtmps://rtmps.sinn.dev:443/live/<your stream key>

A truck route keeps the same server and key all season, so you only need to set up a truck's encoder once.

If the device asks for an audio format, choose AAC (ADTS), not AAC-LATM.

Troubleshooting

Based on Cloudflare's live stream troubleshooting guide.

  • Encoder won't connect. Check the server and stream key were copied exactly, with no extra spaces.
  • Buffering or freezing. Check the keyframe interval is a fixed number, not "auto". Lower the bitrate to 8,000 kbps or 70% of your upload speed, whichever is lower.
  • No audio. Set the encoder's audio codec to AAC explicitly.
  • Still unstable. Check the upload speed is at least 20 Mbps on the encoder's own connection.

Sources