Dash playing (CMAF)
  • 21 Feb 2022
  • 1 Minute to read
  • Dark
    Light

Dash playing (CMAF)

  • Dark
    Light

What Is CMAF (Common Media Application Format)?

Common Media Application Format (CMAF) is basically a new format to decrease the latency HTTP delivery. It is an emerging standard to help reduce cost, complexity and provide latency around 3-5 secs in streaming. CMAF can be used in DASH or HLS. Ant Media Server supports both LL-DASH (Low Latency Dash) and LL-HLS in the CMAF format.

How to use CMAF

First, you need to enable it on your application’s configuration file. 

1. Open the following file with your favorite editor

/usr/local/antmedia/webapps/WebRTCAppEE/WEB-INF/red5-web.properties

2. Enable DASH by adding the following property to the file above.

settings.dashMuxingEnabled=true

If you want to enable LL-HLS(experimental feature), you also need to set the following properties.

settings.dash.llHlsEnabled=true

3. Restart the Ant Media Server

sudo service antmedia restart

4. Send WebRTC stream to Ant Media Server via WebRTC publisher page. Let’s assume your stream id is “stream1”

https://YOUR_DOMAIN:5443/WebRTCAppEE

5. Play the stream with CMAF using the following URL:

https://YOUR_DOMAIN:5443/WebRTCAppEE/play.html?id=stream1&playOrder=dash

There are a few more options for CMAF and their default values. If they are not specified in the properties file, you can safely assume that the following values are in effect:

#Duration of segments in mpd files.
settings.dashSegDuration=6
#Fragments are a property of fragmented MP4 files. Typically a fragment consists of moof + mdat.
settings.dashFragmentDuration=0.5

#Target latency
settings.dashTargetLatency=3.5

#DASH window size. Number of files in manifest
settings.dashWindowSize=5

#DASH extra window size. Number of segments kept outside of the manifest before removing from disk
settings.dashExtraWindowSize=5

#Enable low latency dash. This settings is effective if dash is enabled
settings.dash.llEnabled=true

Was this article helpful?

What's Next