Low-Latency HLS
Apple supports Low-Latency HLS (LLHLS), which enables low-latency video streaming while maintaining scalability. LLHLS enables broadcasting with an end-to-end latency of about 2 to 5 seconds. OvenMediaEngine officially supports LLHLS as of v0.14.0.
LLHLS is an extension of HLS, so legacy HLS players can play LLHLS streams. However, the legacy HLS player plays the stream without using the low-latency function.
Title
Descriptions
Delivery
HTTP/1.1 HTTP/2
Security
TLS (HTTPS)
Container
fMP4
Codecs
H.264 AAC

Configuration

To use LLHLS, you need to add the <LLHLS> elements to the <Publishers> in the configuration as shown in the following example.
1
<Server version="8">
2
<Bind>
3
<Publishers>
4
<LLHLS>
5
<!--
6
OME only supports h2, so LLHLS works over HTTP/1.1 on non-TLS ports.
7
LLHLS works with higher performance over HTTP/2,
8
so it is recommended to use a TLS port.
9
-->
10
<Port>80</Port>
11
<TLSPort>443</TLSPort>
12
<WorkerCount>1</WorkerCount>
13
</LLHLS>
14
</Publishers>
15
</Bind>
16
<VirtualHosts>
17
<VirtualHost>
18
<Applications>
19
<Application>
20
<Publishers>
21
<LLHLS>
22
<ChunkDuration>0.2</ChunkDuration>
23
<SegmentDuration>6</SegmentDuration>
24
<SegmentCount>10</SegmentCount>
25
<CrossDomains>
26
<Url>*</Url>
27
</CrossDomains>
28
</LLHLS>
29
</Publishers>
30
</Application>
31
</Applications>
32
</VirtualHost>
33
</VirtualHosts>
34
</Server>
Copied!
Element
Decscription
Bind
Set the HTTP ports to provide LLHLS.
ChunkDuration
Set the partial segment length to fractional seconds. This value affects low-latency HLS player. We recommend 0.2 seconds for this value.
SegmentDuration
Set the length of the segment in seconds. Therefore, a shorter value allows the stream to start faster. However, a value that is too short will make legacy HLS players unstable. Apple recommends 6 seconds for this value.
SegmentCount
The number of segments listed in the playlist. This value has little effect on LLHLS players, so use 10 as recommended by Apple. 5 is recommended for legacy HLS players. Do not set below 3. It can only be used for experimentation.
CrossDomains
Control the domain in which the player works through <CorssDomain>. For more information, please refer to the CrossDomain section.
HTTP/2 outperforms HTTP/1.1, especially with LLHLS. Since all current browsers only support h2, HTTP/2 is supported only on TLS port. Therefore, it is highly recommended to use LLHLS on the TLS port.

Adaptive Bitrates Streaming (ABR)

LLHLS can deliver adaptive bitrate streaming. OME encodes the same source with multiple renditions and delivers it to the players. And LLHLS Player, including OvenPlayer, selects the best quality rendition according to its network environment. Of course, these players also provide option for users to manually select rendition.
See the Adaptive Bitrates Streaming section for how to configure renditions.

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 <CrossDomains> element.
Server.xml
1
<CrossDomains>
2
<Url>*</Url>
3
<Url>*.airensoft.com</Url>
4
<Url>http://*.ovenplayer.com</Url>
5
<Url>https://demo.ovenplayer.com</Url>
6
</CrossDomains>
Copied!
You can set it using the <Url> element as shown above, and you can use the following values:
Url Value
Description
*
Allows requests from all Domains
domain
Allows both HTTP and HTTPS requests from the specified Domain
http://domain
Allows HTTP requests from the specified Domain
https://domain
Allows HTTPS requests from the specified Domain

Streaming

LLHLS is ready when a live source is inputted and a stream is created. Viewers can stream using OvenPlayer or other players.
If your input stream is already h.264/aac, you can use the input stream as is like below. If not, or if you want to change the encoding quality, you can do Transcoding.
1
<OutputProfiles>
2
<OutputProfile>
3
<Name>bypass_stream</Name>
4
<OutputStreamName>${OriginStreamName}</OutputStreamName>
5
<Encodes>
6
<Audio>
7
<Bypass>true</Bypass>
8
</Audio>
9
<Video>
10
<Bypass>true</Bypass>
11
</Video>
12
</Encodes>
13
</OutputProfile>
14
</OutputProfiles>
Copied!
When you create a stream, as shown above, you can play LLHLS with the following URL:
http[s]://domain[:port]/<app name>/<stream name>/llhls.m3u8
If you use the default configuration, you can start streaming with the following URL:
https://domain:3334/app/<stream name>/llhls.m3u8
We have prepared a test player that you can quickly see if OvenMediaEngine is working. Please refer to the Test Player for more information.