Appearance
Use DASH sources and DASH output
Bitstream can pull MPEG-DASH sources (.mpd) and can also send channels to viewers as DASH. Everything is copy only: no transcoding.
Encrypted DASH sources are not supported. If a manifest has ContentProtection (Widevine, PlayReady, ClearKey or any CENC scheme), the test says so and the source is refused. Bitstream never decrypts content and has no field for keys.
Add a DASH source
- Open the channel and paste the
.mpdURL as a source. - Click Test. For a manifest with more than one video quality, the panel lists them (resolution, bitrate, codec) and asks how to use them:
- Use one quality: pick the quality this channel plays. Leave Best quality to always take the highest bitrate.
- One channel per quality: the channel keeps the best quality and the panel creates one channel for each other quality, named like
Sports HDandSports SD. Save the channel first. - DASH with all qualities: DASH players get every quality and switch on their own. TS and HLS viewers get the best one.
- Save.
The node reads the manifest, picks the chosen representation and maps only that one, so the other qualities are not downloaded.
With the API, the quality is the source variant (a representation id from the probe qualities):
bash
curl -s -X PUT $PANEL/streams/101/sources -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '[{"url": "https://example.com/live.mpd", "variant": "1"}]'Sub channels:
bash
curl -s -X POST $PANEL/streams/101/sub-channels -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{"items": [{"name": "Sports HD", "variant": "1"}, {"name": "Sports SD", "variant": "2"}]}'Sub channels copy the main channel (settings, bouquets, servers). When you change the sources of the main channel, the sub channels follow and keep their quality. Deleting the main channel deletes them.
Send a channel as DASH
DASH output is off by default. Two switches must allow it:
- The channel: Delivery, DASH output, set to On or On, with all qualities. API field
dash_output(off,on,all_qualities). - The line or package: add DASH to the allowed outputs (
allowed_outputswithmpd).
Then the line gets links like http://panel:8080/live/U/P/101.mpd. In the access dialog pick DASH to get a playlist with .mpd links (get.php?...&output=mpd). Channels without DASH output keep .ts links in that playlist.
Connection limits, kicks, restrictions, bandwidth and logs work for DASH viewers exactly like HLS. In the live connections page they show as DASH.
How it runs on the node
The node starts a DASH packager (ffmpeg dash muxer, -c copy) on the first DASH request and stops it after one minute with no DASH viewer. The packager reads the same feed as TS and HLS, so it adds no connection to the source. With all qualities it reads the source manifest itself, which is one more pull from the source while DASH viewers watch.
The first manifest takes about 5 seconds on a cold start. Segments are fMP4 (init-*.m4s, chunk-*.m4s) with a timeline template.
Through a proxy
DASH works on nodes that take viewers only through a proxy. The node makes the DASH output with its own FFmpeg. The proxy passes the manifest and the segments as they are, so the proxy still needs no FFmpeg. The viewer counts on the proxy and on the node, and a kick cuts it at once. See Add a proxy.
Test with a legal source
Make a local three quality live DASH stream with ffmpeg and serve it:
bash
mkdir -p www && ffmpeg -re -f lavfi -i testsrc2=size=1920x1080:rate=25 -f lavfi -i sine=frequency=440 \
-filter_complex '[0:v]split=3[a][b][c];[b]scale=1280:720[b2];[c]scale=640:360[c2]' \
-map '[a]' -map '[b2]' -map '[c2]' -map 1:a -c:v libx264 -preset veryfast -g 50 -c:a aac \
-b:v:0 4M -b:v:1 2M -b:v:2 700k -f dash -seg_duration 2 -use_timeline 1 -use_template 1 \
-window_size 10 -adaptation_sets 'id=0,streams=v id=1,streams=a' www/live.mpd
python3 -m http.server 18731 -d wwwUse http://127.0.0.1:18731/live.mpd as the source. Public clear test vectors from DASH-IF also work.