Skip to content

Transcoding and MBR

The transcoder solves two customer problems. The first is multi-bitrate: viewers on a weak link get 360p, viewers on a good one get 1080p, and the player switches between them on the fly. The second is compatibility: an input players cannot read (raw frames, audio that is not AAC) becomes something everything reads.

All of it is configured on the Process tab of the channel page. While the transcoder is off, the input passes through untouched — and for an already-compressed h264/aac source that may be exactly right: transcoding costs CPU, and there is no reason to burn it without cause.

Start from a preset

The empty tab offers three presets — each closes a typical task in one click:

  • Fix audio (video as is + AAC) — video is not re-encoded, audio is brought to AAC. The cheapest way to make a stream compatible when the source delivers non-standard audio.
  • Standard ladder 1080/720/360 + AAC — a ready ABR set for typical broadcasting.
  • RAW for SDI (v210) — uncompressed output for a studio SDI/2110 chain.

The empty Process tab with the presets

A preset is a starting point: it fills in the ladder and the rules, which you then edit. Do not forget Save.

The quality ladder

The Video (ladder) block — one rung per output quality:

  • Height — 2160, 1080, 720, 576, 360 or custom. The width follows the input's proportions.
  • Codec — H.264, HEVC, AV1; "As is" is a passthrough without re-encoding; the RAW codecs are for SDI output.
  • Bitrate (kbps) and Rate control — CBR for predictable bandwidth, VBR for better quality at the same average.

The Original (no transcoding) rung passes the input into the ladder untouched. Next to encoded rungs it degrades the ladder — its GOP and IDR frames are not aligned with the rest, and seamless quality switching breaks; the UI warns about it with a banner.

The 1080/720/360 ladder, the audio rule and the preview

GOP is a property of the whole ladder, not of a single rung: for the player to switch qualities without a jolt, the keyframes of every rung must line up. The ladder header carries GOP length (in frames) and GOP structure (from ip with no B-frames to ibbbbp). A shorter GOP means faster channel start and lower switching delay; a longer one compresses better. If the rungs' GOP drifts apart — after manual edits, say — the UI shows "GOP: differs between rungs" and a Unify GOP button.

Audio

The Audio block holds the track selection and encoding rules. In each rule:

  • Which tracks — All tracks, Best quality, Language…, Language + codec…, Exact ID…
  • Codec — As is, AAC or Opus, and the bitrate.

The typical multilingual case: a single rule "All tracks → AAC" — every language goes on air re-encoded.

Advanced rung settings

The More button on a rung reveals:

  • Resize strategy — what to do when the input's proportions do not match the output: Fit keeps the proportions and adds bars (the bar color is configurable), Scale stretches, Crop cuts.
  • Source — overriding which input track the rung takes.
  • If no tracks matched — the behavior when a track disappears: drop, silence / black frame, an SMPTE placeholder, or stop the stream with an error. The placeholder suits a channel that must always show a picture; the stop suits a chain where silently ruined air is worse than fallen air.

If the rules end up selecting nothing, the tab warns: "The manifest is empty" — such a channel serves the viewer nothing.

The preview

At the bottom of the tab — Preview: input → output. For every rule you can see what will land in the output manifest before you Save: which rung builds from what and whether the audio got lost. When input statistics are unavailable, the left side says so — input unknown — and the output is still computed from the rules.

MBR: a ladder without transcoding

If the quality ladder is already made elsewhere — the on-site encoder itself delivers 1080/720/360 — there is no point re-encoding it. That is what the MBR source is for: on the Sources tab pick the MBR protocol and add one input per ready-made quality into the container. The channel assembles them into a single ladder and serves the viewer an ordinary multi-bitrate stream — without spending a single core on encoding.

The transcoder and the MBR input are two roads to the same result: the first burns the streamer's CPU, the second burns bandwidth from the encoder. The choice is usually dictated by which is cheaper in your setup.

If the transcoder did not work

  • The ladder is configured, the channel is green, but there are no output tracks. Check that the encoding plugins are installed on the streamer — dpkg -l | grep sapsan-transcoder. Without them the server runs but has nothing to encode with; see the Quick start.
  • The player stutters on quality switches. Look at the ladder banners: a passthrough rung next to encoded ones, or a drifted GOP — both causes are visible right in the UI.