Packaging and caching Print

  • packaging, hls, mpeg-dash, segments, manifest, cache, origin shield
  • 0

Medusa Panel › Stream › Add Stream › Add Output

Packaging turns the encoded stream into the delivery shape each consumer needs. One stream can carry several outputs at once, and what you type in an output depends on its protocol. The outputs fall into two worlds: what a subscriber watches (authenticated), and transport outputs the engine pushes to infrastructure you run.

Add an output

On the stream, open Add Output, choose a protocol, press +, fill its fields and save. Add as many as you need — one encode feeds them all.

1. Subscriber playback and authentication

The formats a subscriber (a Line) watches are HLS, DASH and HTTP-TS. The engine hosts them and the viewer connects with their own credentials — there is no unauthenticated playlist.

How a Line is authenticated. On every playback request the engine checks:

  • Identity — username and password in the URL (auth mode Password), or the client’s IP (auth mode IP); the panel player can also use a short-lived play ticket.
  • Not expired — the subscriber’s expiry date (UTC) has not passed.
  • Entitlement — the subscriber’s package (its bouquets and streams) or custom access contains this channel.
  • Under the connection limit — the subscriber is below their Max Connections.

You set all of this per subscriber and per package — see Bouquets, prices and limits.

What you enter on the output:

  • HLS — Time (segment length 2–60 s), List Size (segments in the manifest) and a Filename ending in .m3u8. The standard web and mobile IPTV output.
  • DASH — a Window Size and a Filename ending in .mpd. Also the format that carries Output DRM (CENC).
  • HTTP-TS — a Buffer Size and a Filename ending in .ts (or .asf). A progressive transport-stream pull for set-top boxes.
# HLS output fields
Time       2
List Size  10
Filename   channel1.m3u8

# how a subscriber plays it (their own username / password)
http://your-server/stream/<id>/channel1.m3u8?username=USER&password=PASS

Use these for: your normal live-TV delivery to apps, browsers, IPTV players and set-top boxes.

There is also an engine-hosted RTMP output: you enter only a Name and the engine serves rtmp://your-server:1935/stream/<name> for an RTMP player to pull. Do not confuse it with RTMP-PUSH in section 2, which sends out to a remote URL instead.

2. Transport outputs — the engine pushes to a destination you enter

These are operator links: the engine sends the stream out to an address you type. They carry no subscriber authentication, so you secure them by the destination and the transport (an SRT passphrase, a firewall). Use them to feed another server, a headend or a platform — never to hand a raw feed to the public.

RTMP-PUSH — push to a remote RTMP ingest URL (rtmp:// or rtmps://). The opposite of the engine-hosted RTMP above: there, players pull from you; here, the engine sends out.

# restream to a social / live platform (their ingest URL + stream key)
URL  rtmp://a.rtmp.example.com/live2/XXXX-XXXX-XXXX

Use it for: restreaming a channel to a social platform, a CDN ingest or a partner server.

SRT — reliable contribution and distribution over imperfect networks. Enter the URL (srt://host:port) and pick the connection mode: caller pushes to a remote listener, listener waits for the far side to connect. Add a passphrase and latency where needed, and use a unique port per listener on one address.

# caller: push to a remote SRT listener
srt://receiver.example.com:9000?mode=caller&latency=120000
# listener: wait for the far side to connect
srt://0.0.0.0:9000?mode=listener

Use it for: sending a feed to another site, headend or encoder across the public internet, where plain UDP would lose packets.

RTSP — announce to an RTSP endpoint. Enter Hostname, Port and Path (the engine forms rtsp://host:port/path). Use it for: feeding a system that ingests RTSP.

RTP — send RTP to a Hostname and Port, unicast or multicast.

# RTP to a multicast group
Hostname  239.0.0.1
Port      5004

Use it for: delivering to a headend or receiver that ingests RTP.

UDP — the classic IPTV transport. Enter Hostname and Port, and optionally a Muxrate (to emit a constant-rate mux) and a Local Address (which interface to send from).

# UDP multicast into a set-top-box network, constant 8 Mbit/s
Hostname       239.1.1.1
Port           1234
Muxrate        8000       (kbits/s)
Local Address  eth0

Use it for: multicast into an STB network or a headend on a clean, managed LAN.

TCP — a point-to-point transport-stream link. Enter Hostname and Port. Use it for: a system that accepts a TS over TCP where multicast is not available.

File — record the output to the server. Enter a Path and a Filename (date and time tokens are allowed).

Path      /recordings
Filename  channel1-%Y-%m-%d.ts

Use it for: recording a channel or building a VOD asset — see YouTube and VOD.

HLS and DASH packaging settings

Tune how the segments themselves are produced in Medusa Panel › Settings › Streaming:

  • HLS Muxer — Auto, HLS, DASH or Segment. HLS supports adaptive bitrate and per-resolution/audio access; DASH supports adaptive bitrate and TTML subtitles in fMP4; Segment can restream DVB subtitles directly.
  • HLS Segment Number — how many segments the live manifest lists at a time.
  • Max segments kept — how many segments stay on disk outside the manifest before removal (HLS and DASH only).

Caching across the cluster

With the CDN on, the packaged segments are cached across all servers — optionally in RAM. See Built-in CDN.

Keep the keyframe interval aligned across every rung of the ladder so the packager can cut each rendition at the same points and players can switch cleanly — see Bitrate ladders.
The transport outputs carry no subscriber authentication. Point them only at infrastructure you control and lock them down (an SRT passphrase, a firewall, the exact destination host) — never expose a raw UDP, RTP or TCP output to the public.

Related


Was this answer helpful?

« Back