Skip to content

Dash Playing(CMAF)

Asharam Seervi edited this page Apr 1, 2023 · 4 revisions

Attention: We have migrated our documentation to our new platform, Ant Media Resources. Please follow this link for the latest and up-to-date documentation.

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.

Image

How to use CMAF?

Firstly, you need to enable it on your application’s configuration file. Let’s assume that you’ve already running Ant Media Server v.2.2+ Enterprise on your server then we’re going to use WebRTCAppEE for CMAF streaming.

1. Open the following file with your favorite editor

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

2. Enable DASH by adding 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 on WebRTC publisher page. Let’s assume your stream id is “stream1”

https://YOUR_DOMAIN:5443/WebRTCAppEE

5. Play the stream with CMAF on the following url

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

Here are the other properties for CMAF and their default values. If they are not specified in the properties file, you may 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

User Guide

Reference

Troubleshooting

Draft

Proposals

Clone this wiki locally