Add Stream Print

  • stream, add stream, encoder, output, transcode, source
  • 0

Medusa Panel › Stream › Add Stream

Add Stream is the engine’s most detailed form: it defines one channel end to end — where the source comes from, how it is transcoded (video, audio, subtitles), advanced MPEG-TS and colour options, and which outputs it produces. The form is long, so it is split into the sections below. To get a channel on air you only need a name, a source, one video and one audio encoder, and one output — everything else has sensible defaults.

1. Source and scheduling

  • Stream ID — a fixed numeric id for the channel (leave blank to auto-assign). It appears in the output path /stream/<id>/….
  • Stream Name — the channel name, shown in listings, the M3U playlist and the EPG.
  • Category — the on-screen category the channel belongs to.
  • Bouquets — the bouquets this channel is part of, which feed packages — see Bouquets, prices and limits.
  • Source Stream — the input. Sources are tried in order: put the preferred one first and backups below. Type a URL (http/hls/udp/rtp/rtsp/rtmp/srt/file) — see IP sources — or pick a DVB source with the dish button — see DVB tuners. For a device to publish into the engine, set the source to rtmplocal://<token> and publish to rtmp://server:port/stream/<token> (token: 16–128 letters, numbers, dots, underscores or hyphens).
  • HTTP User-Agent / HTTP Referer / HTTP Headers — sent when opening an HTTP(S) source that requires them. Headers are separated by the literal characters \r\n, for example Authorization: Bearer token\r\nX-Source: primary. Do not store long-lived secrets here needlessly.
  • Proxies — pull the source through a configured proxy; leave empty to contact it directly.
  • HTTP Local Address — bind outgoing HTTP(S) requests to a local interface. Auto lets the OS choose and is recommended unless the server has multiple uplinks.
  • Format Flags — advanced FFmpeg input-format flags; leave empty unless diagnosing damaged timestamps, corrupt packets or excessive buffering.
  • Sleep Schedule — disable the stream at set times. Format HH:MM-HH:MM, comma-joined, with optional weekdays. Example: 06:00-09:00, 16:00-20:00 or Sat 00:00-Mon 00:00.
  • Timeshift — delay playback behind the live source by N seconds (more buffering, more latency).
  • Restart Schedule — restart the stream on a weekday/hour/minute schedule, for planned source refreshes (health checks keep working independently).
  • Direct Source — redirect authenticated clients to the original source instead of restreaming it. HTTP/HTTPS sources only, HLS/HTTP outputs only; transcoding, overlays, connection monitoring and limits do not apply once a client is redirected.
  • On Demand — Yes makes the stream sleep while nobody is watching and wake on request (see the On Demand Inactive Time in System Settings).
  • Rate Emulation — Yes reads the source at real time (FFmpeg -re). Use it for a file or VOD source so it plays out like a live channel.

2. Video

  • Stream Profile — apply a reusable profile; Profile-controlled fields become read-only and follow future Profile changes. Clear it to edit the values independently.
  • Server — which server runs the stream (Master or a worker) — see Master and slave nodes.
  • Video Map — which source video track to take (zero-based). v:0 first track, v:best best quality, v:1080p or v:1920x1080 by resolution, v:1080p@25 also by fps, v:h264 by codec, i:256 by MPEG-TS PID, v:720p>v:1080p>v:0 tries each in turn, ? allows no match. Mapping several video tracks requires every Video Encoder to be Copy. Example: v:0.
  • Video Sync Method — how output timing follows the source: Auto, Pass Through (keep source timing), Constant Frame Rate (fixed cadence, duplicates/drops frames), Variable Frame Rate or Drop. Use Auto unless a device needs a mode.
  • Video Encoder #1 — the codec and rate control for this rendition: codec (Copy, mpeg2video, libx264, libx265, or a GPU encoder h264_qsv/h264_nvenc/h264_vaapi …), a size, the rc (CBR/VBR) and a bitrate (kbps). Press + to add more encoders and build a ladder. See Hardware acceleration and Bitrate ladders. Example: H.264 / libx264, 720p, CBR, 3000 kbps.
  • Video Preset — the speed/quality trade-off. Software libx264/libx265: ultrafast … medium … veryslow. NVENC: medium, llhq, and p1 (fastest) … p4 (medium) … p7 (slowest). QSV and AMD have no x264-style preset.
  • Video Profile — codec profile, by encoder: H.264 baseline/main/high/high444p; HEVC main/main10/main12…. Video Level — Auto or a fixed level (for example 4.0).
  • Video Frame Rate — Auto keeps the source rate; a fixed value converts it (duplicating or dropping frames per the Sync Method).
  • Keyframe Interval — maximum frames between keyframes. Smaller improves channel switching and seeking but raises bitrate; 250 is a safe default. Keep it aligned across the ladder — see Packaging and caching.
  • Video Deinterlace — Yes/No plus a method: Auto, a hardware method (adaptive_cuvid/yadif_cuda on NVIDIA, advanced_qsv on Intel), or yadif on the CPU — see Filters and overlays.
  • Video Pixel Format — Auto, YUV420P, YUV422P or YUV444P.
  • Display Aspect Ratio — Auto, 16:9, 4:3, 21:9 … down to 1:1.
  • Overlay Image — a PNG logo burned onto the video (upload it). Video Delogo — blur a rectangle (x, y, width, height) to hide an existing logo. See Filters and overlays.
  • Overlay Text — burn text onto the video, with live tokens: %{localtime\: %T} (server time), %{gmtime\: %T} (UTC), $countdown, $moviename. Position with x/y using the constants W/H (video) and tw/th (text): top-right x=W-tw, y=0; centred x=(W-tw)/2, y=(H-th)/2.

3. Audio

  • Audio Map — which source audio track(s). a:0 first, a:best best, a:aac by codec, a all. A single Audio Encoder re-encodes every mapped track with that one codec, each kept as a separate selectable track; add one Audio Encoder per track to give each its own codec and bitrate. Example: a or a:0.
  • Audio Encoder #1 — codec (Copy, AAC native or libfdk_aac, AC3, MP2, MP3) and a bitrate (kbps). Example: AAC, 128.
  • Audio Channels — 1, 2 or 5.1.
  • Audio Sample Rate — 8000 to 96000 Hz; keep the source rate where possible. Example: 48000.
  • Audio Volume — a gain slider to raise or lower the level.

4. Subtitles

  • Subtitle Map — which subtitle track(s). s:0, s:best, by codec s:dvb_subtitle/s:dvb_teletext/s:webvtt/s:ttml/s:text, s:0? allows none. Add -cc (for example s:0?,-cc) to strip H.264/H.265 closed-caption SEI from the video. Set this before enabling the encoder.
  • Subtitle Encoder — Copy keeps the original format (needs a compatible output container), or Overlay burns them in: Overlay (DVB), Overlay (TTML/SMPTE-TT) or Overlay (TTML/WebVTT).

5. Advanced options

Click Advanced Options to reveal the MPEG-TS, colour and limit fields. Most channels never need these.

  • PID Map — assign MPEG-TS output PIDs as OUTPUT_INDEX:PID pairs; PID is decimal or 0x hex (0–8191). Example: 0:0x101,1:0x102.
  • Metadata — FFmpeg output metadata as SCOPE:key=value (scopes g/s/p/c). Examples: g:title=Channel, s:a:0:language=eng, p:0:service_name=News.
  • Service ID / Service Type / Service Name / Service Provider — the MPEG-TS service descriptor. Service Type: Digital TV (the usual default), Digital Radio, HEVC Digital HDTV ….
  • PMT Start PID — the first Program Map Table PID; keep 0x1000 unless a downstream system needs a specific layout.
  • Color Range — TV or PC. Color Space — colourspace (BT.709, BT.2020 …), primaries and transfer (trc), including HDR — see Codecs and passthrough.
  • Memory Limit — cap the max system and graphics memory the stream may use. Speed Limit — min/max processing speed.
  • FPS Limit — restart the stream if measured fps falls below Min or rises above Max (leave a bound empty to not enforce; use tolerances so normal variation does not cause a restart loop).
  • Error Max — restart after this many accumulated processing errors (0 disables error-based restart).
  • EPG Channel ID — map the channel to its EPG id when the name does not match the EPG source.
  • Stream Logo — a logo embedded in the M3U playlist and EPG. Offline Video — a clip/image shown when every source is down. Overview — a free-text description of the channel.

6. Outputs

Each output is a delivery endpoint for the stream. Press Add Output, choose a protocol, press +, and fill the fields it shows. What you enter depends on the protocol — this is explained per protocol, with worked examples, in Packaging and caching. In short:

  • Pull outputs (the engine hosts them, viewers connect with their Line credentials) — HLS, DASH, HTTP-TS. For HLS you set Time (segment length), List Size and a Filename (.m3u8). The engine then serves, for example, http://your-server/stream/1/index.m3u8.
  • Push outputs (the engine sends to a destination you type) — RTMP-PUSH, SRT, RTSP, RTP, UDP, TCP. You enter the destination URL or host and port.
  • File — record the output to disk.

Each output also chooses which Video Encoders and Audio Encoders from your ladder it carries, so one stream can send a full ladder to HLS while pushing a single rung over SRT.

Minimum to go live: a Stream Name, one Source Stream URL, one Video Encoder, one Audio Encoder and one HLS output. Add the rest to refine quality, delivery and metadata.
A re-encode is needed for a bitrate ladder, filters or overlays; set the Video Encoder to Copy only when you want to pass the source through untouched — see Codecs and passthrough.

Related


Was this answer helpful?

« Back