Low-Latency DASH and HLS streaming

OvenMediaEngine supports HTTP based streaming protocols such as HLS, MPEG-DASH (Hereafter DASH), and Low-Latency MPEG-DASH with CMAF (Hereafter LLDASH).

OvenMediaEngine will support Low-Latency HLS in the near future. We are always keeping an eye on the decision from Apple inc.

Configuration

To use HLS, Dash and LLDash, you need to add the <HLS> and<DASH> elements to the <Publishers> in the configuration as shown in the following example.

<Server version="7">
    <Bind>
        <Publishers>
            <HLS>
                <Port>80</Port>
            </HLS>
            <DASH>
                <Port>80</Port>
            </DASH>
        </Publishers>
    </Bind>
    <VirtualHosts>
		    <VirtualHost>
            <Applications>
                <Application>
                    <Publishers>
                        <HLS>
                            <SegmentDuration>5</SegmentDuration>
                            <SegmentCount>3</SegmentCount>
                            <CrossDomain>
                                <Url>*<Url>
                            </CrossDomain>
                        </HLS>
                        <DASH>
                            <SegmentDuration>5</SegmentDuration>
                            <SegmentCount>3</SegmentCount>
                            <CrossDomain>
                                <Url>*<Url>
                            </CrossDomain>
                        </DASH>
                        <LLDASH>
                            <SegmentDuration>5</SegmentDuration>
                            <CrossDomain>
                                <Url>*<Url>
                            </CrossDomain>
                        </LLDASH>
                    </Publishers>
                </Application>
            </Applications>
        </VirtualHost>
    </VirtualHosts>
</Server>

CrossDomain

Most browsers and players prohibit accessing other domain resources in the currently running domain. You can control this situation through Cross-Origin Resource Sharing (CORS) or Cross-Domain (CrossDomain). You can set CORS and Cross-Domain as <CrossDomain> element.

Server.xml
<CrossDomain>
    <Url>*</Url>
    <Url>*.airensoft.com</Url>
    <Url>http://*.ovenplayer.com</Url>
    <Url>https://demo.ovenplayer.com</Url>
</CrossDomain>

You can set it using the <Url> element as shown above, and you can use the following values:

Streaming

LLDASH, DASH, and HLS Streaming are ready when a live source is inputted and a stream is created. Viewers can stream using OvenPlayer or other players.

Also, you need to set H.264 and AAC in the Transcoding profile because MPEG-DASH and HLS use these codecs.

<Encodes>
   <Encode>
      <Name>HD_H264_AAC</Name>
      <Audio>
         <Codec>aac</Codec>
         <Bitrate>128000</Bitrate>
         <Samplerate>48000</Samplerate>
         <Channel>2</Channel>
      </Audio>
      <Video>
         <Codec>h264</Codec>
         <Width>1280</Width>
         <Height>720</Height>
         <Bitrate>2000000</Bitrate>
         <Framerate>30.0</Framerate>
      </Video>
   </Encode>
   <Encode>
      <Name>BYPASS</Name>
      <Audio>
         <Bypass>true</Bypass>
      </Audio>
      <Video>
         <Bypass>true</Bypass>
      </Video>
   </Encode>
</Encodes>
<Streams>
   <Stream>
      <Name>${OriginStreamName}_o</Name>
      <Profiles>
         <Profile>HD_H264_AAC</Profile>
      </Profiles>
   </Stream>
   <Stream>
      <Name>${OriginStreamName}_bypass</Name>
      <Profiles>
         <Profile>BYPASS</Profile>
      </Profiles>
   </Stream>
</Streams>

When you create a stream, as shown above, you can play LLDASH, DASH, and HLS through OvenPlayer with the following URL:

If you use the default configuration, you can start streaming with the following URL:

  • https://[OvenMediaEngine IP]:80/app/<stream name>_o/playlist.m3u8

  • http://[OvenMediaEngine IP]:80/app/<stream name>_o/playlist.m3u8

  • https://[OvenMediaEngine IP]:80/app/<stream name>_o/manifest.mpd

  • http://[OvenMediaEngine IP]:80/app/<stream name>_o/manifest.mpd

  • https://[OvenMediaEngine IP]:80/app/<stream name>_o/manifest_ll.mpd

  • http://[OvenMediaEngine IP]:80/app/<stream name>_o/manifest_ll.mpd

We have prepared a test player that you can quickly see if OvenMediaEngine is working. Please refer to the Test Player for more information.

Last updated