Last updated on June 14, 2017
This article describes how to produce DASH (AVC or HEVC video with AAC audio) streams that are compatible with Radiant Media Player through MP4Box and FFmpeg. More generally you can use the guidelines in this article to produce DASH streams that are compatible with any dash.js or Shaka Player based application.
MP4Box is a multimedia packager which is part of the GPAC Open Source multimedia framework. Visit GPAC site for more information.
Refer to the GPAC documentation page to install MP4Box. We recommend you use GPAC version 0.7.2 and above. Note that depending on your Linux distribution installing the default GPAC package may only provide an older version of GPAC that may or may not work with the following guide.
For this guide we used GPAC version 0.7.2-DEV-rev105-gbdd7fde-master
Refer to our FFmpeg guide on how to achieve proper content transcoding for DASH streaming.
Now we can dash those files with MP4Box:
MP4Box -dash 4000 -rap -bs-switching no -profile live -out manifest.mpd out-low.mp4#audio out-low.mp4#video out-med.mp4#video out-high.mp4#video
-dash 4000enables DASH segmentation of input files with the given segment duration. A 4000 ms segment duration is an often seen values when dashing.
-rapforces segments to begin with random access points.
-bs-switching nosets the bitstream switching mode. Set this to no to create DASH content compatible with a largest range of devices/browsers. Not using this option can cause MP4Box to generate avc3 formatted content which is not well supported in some browsers (IE11 and older version of Android).
-profile liveallows segmentation into .m4s chunks.
-out manifest.mpdspecifies output file name for MPD. May use relative path. All segments will be produced in the same directory as the MPD.
out-low.mp4#audioonly uses the first audio track from the out-low.mp4 source file
out-low.mp4#videoonly uses the first video track from the out-low.mp4 source file (low rendition)
out-med.mp4#videoonly uses the first video track from the out-med.mp4 source file (medium rendition)
out-high.mp4#videoonly uses the first video track from the out-high.mp4 source file (high rendition)
An example of DASH manifest with AVC video and AAC-LC audio generated with the above command line can be found here:
This also works for dashing with HEVC video & HE-AACv2 audio content:
A complete list of options for MP4Box for DASH streams is available here.