DASH Streams at a High Level
Dynamic Adaptive Streaming over HTTP (DASH) is a technique for adaptive bitrate streaming of content over the Internet delivered from conventional web servers. This is a quick overview of DASH for those who are not familiar with it. For a more detailed view of DASH, visit dashif.org.
Every DASH stream is described by a manifest written in XML. Within a manifest file, representation elements describe the DASH stream's audio, video, and text sources. There may be more than one representation of the same content. These typically differ in terms of bitrate and resolution, although there can be some other variations as well.
Representations are grouped into one or more adaptation sets, and a DASH client can switch automatically between representations within a set. Adaptation sets can differ in codec and language. DASH streams usually have audio and video in separate adaptation sets. Although the DASH specification allows for audio and video to be multiplexed, the Shaka Player does not support this type of stream.
Multiple Resolutions and Bitrates
For the Shaka Player to adapt and choose the best representation for the user's available bandwidth, you must encode your content into more than one resolution and bitrate. It is up to you what bitrates and resolutions make sense for your site. Note that you can encode at multiple bitrates for a single resolution.
Example video encoding scheme:
- 1920x1080, 5.0 Mbit/s
- 1920x1080, 3.0 Mbit/s
- 1280x720, 2.0 Mbit/s
- 1280x720, 1.0 Mbit/s
- 854x480, 750 kbit/s
- 640x360, 350 kbit/s
There are many open-source tools to transcode video, including:
A DASH packager is required to get your media ready to stream. There are a few open-source packagers available for MP4 / ISO BMFF streams, including:
- edash-packager https://github.com/google/edash-packager/
- MP4Box http://gpac.wp.mines-telecom.fr/mp4box/
- DASHEncoder https://github.com/slederer/DASHEncoder
- DASH.encrypt https://github.com/castlabs/dashencrypt
Your DASH packager will convert your content to a valid, segmented ISOBMFF file and generate a DASH manifest (MPD file). Most DASH packagers can not transcode your media into multiple resolutions and bitrates. (DASHEncoder does both.)
To package WebM streams for DASH, the WebM project provides tools for this:
- webm-tools http://www.webmproject.org/code/