Radiant Media Player

Working with MP4Box

Installing MP4Box

This article describes how to produce DASH (AVC or HEVC video with AAC audio) streams that are compatible with Radiant Media Player and other DASH-compliant players through MP4Box and FFmpeg.

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

Multi-bitrate on-demand DASH streams

Creating keyframe-aligned MP4 video files

Refer to our FFmpeg guide to produce keyframe-aligned MP4 files that can be used as input for MP4Box.

DASHing with MP4Box

Now we can DASH those MP4 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 4000 enables DASH segmentation of input files with the given segment duration. A 4000 ms segment duration is an often seen values when dashing.
  • -rap forces segments to begin with random access points.
  • -bs-switching no sets 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 live allows segmentation into .m4s chunks.
  • -out manifest.mpd specifies output file name for MPD. May use relative path. All segments will be produced in the same directory as the MPD.
  • out-low.mp4#audio only uses the first audio track from the out-low.mp4 source file
  • out-low.mp4#video only uses the first video track from the out-low.mp4 source file (low rendition)
  • out-med.mp4#video only uses the first video track from the out-med.mp4 source file (medium rendition)
  • out-high.mp4#video only 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.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License.

©2015-2021 Radiant Media Player. All rights reserved.