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 tortmplocal://<token>and publish tortmp://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 exampleAuthorization: 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.
Autolets 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:00orSat 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 —
Yesmakes the stream sleep while nobody is watching and wake on request (see the On Demand Inactive Time in System Settings). - Rate Emulation —
Yesreads 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 (
Masteror a worker) — see Master and slave nodes. - Video Map — which source video track to take (zero-based).
v:0first track,v:bestbest quality,v:1080porv:1920x1080by resolution,v:1080p@25also by fps,v:h264by codec,i:256by MPEG-TS PID,v:720p>v:1080p>v:0tries each in turn,?allows no match. Mapping several video tracks requires every Video Encoder to beCopy. 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 RateorDrop. 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 encoderh264_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,3000kbps. - Video Preset — the speed/quality trade-off. Software
libx264/libx265:ultrafast…medium…veryslow. NVENC:medium,llhq, andp1(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; HEVCmain/main10/main12…. Video Level —Autoor a fixed level (for example4.0). - Video Frame Rate —
Autokeeps 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;
250is a safe default. Keep it aligned across the ladder — see Packaging and caching. - Video Deinterlace —
Yes/Noplus a method:Auto, a hardware method (adaptive_cuvid/yadif_cudaon NVIDIA,advanced_qsvon Intel), oryadifon the CPU — see Filters and overlays. - Video Pixel Format —
Auto,YUV420P,YUV422PorYUV444P. - Display Aspect Ratio —
Auto,16:9,4:3,21:9… down to1: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 withx/yusing the constantsW/H(video) andtw/th(text): top-rightx=W-tw, y=0; centredx=(W-tw)/2, y=(H-th)/2.
3. Audio
- Audio Map — which source audio track(s).
a:0first,a:bestbest,a:aacby codec,aall. 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:aora:0. - Audio Encoder #1 — codec (
Copy,AACnative orlibfdk_aac,AC3,MP2,MP3) and a bitrate (kbps). Example:AAC,128. - Audio Channels —
1,2or5.1. - Audio Sample Rate —
8000to96000Hz; 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 codecs:dvb_subtitle/s:dvb_teletext/s:webvtt/s:ttml/s:text,s:0?allows none. Add-cc(for examples:0?,-cc) to strip H.264/H.265 closed-caption SEI from the video. Set this before enabling the encoder. - Subtitle Encoder —
Copykeeps the original format (needs a compatible output container), or Overlay burns them in:Overlay (DVB),Overlay (TTML/SMPTE-TT)orOverlay (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:PIDpairs; PID is decimal or0xhex (0–8191). Example:0:0x101,1:0x102. - Metadata — FFmpeg output metadata as
SCOPE:key=value(scopesg/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
0x1000unless a downstream system needs a specific layout. - Color Range —
TVorPC. 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 (
0disables 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.
Copy only when you want to pass the source through untouched — see Codecs and passthrough.Related
- IP sources — the Source Stream URL schemes.
- DVB tuners — a DVB source instead of a URL.
- Hardware acceleration — GPU encoders in Video Encoder.
- Bitrate ladders — multiple encoders / Stream Profile.
- Filters and overlays — deinterlace, overlays, delogo.
- Packaging and caching — the Outputs section in depth.