Low Latency HLS (LL-HLS)

Media Services logo v3


AMS website | Media Services v2 documentation | Code Samples | Troubleshooting guide

Media Services supports Apple's Low Latency HLS (LL-HLS) specification as well as DASH. Watch Roger Pantos explain the Low Latency HLS specification at WWDC19 to understand how the specification gets your media content to your viewers faster.

This article describes Media Services support for LL-HLS and provides you with implementation guidance.

LowLatency and LowLatencyV2 options

Media Services provides two options for delivering streaming content with low latency.

  • LowLatencyV2. Use this option when:
    • You are using Media Services to encode a live event
    • You are using either Low Latency HLS or DASH CMAF
  • LowLatency. Use this option when:
    • You are using a pass-through live event
    • You need Smooth Streaming output
    • An archive length (DVR window) of more than 6 hours
    • Need to use FairPlay on Apple devices

LL-HLS URL

This is an example of an HLS URL. The (format-m3u8-cmaf) part of the URL is required.

https://myamsaccount-usw22.streaming.media.azure.net/06c39667-84d8-43ce-9dba-3aee82e35262/output-20221021-193449-manifest.ism/manifest(format=m3u8-cmaf)

How to use LL-HLS

Use LowLatencyV2 in the Azure portal

  1. Set up your on-premises stream. Try the OBS tutorial if you haven't done this before.
  2. While creating a live event, select either Standard encoding (up to 720p) or Premium encoding (up to 1080p) under the live event type. The Stream latency options will appear.
  3. Select the Low latency radio button. LowLatencyV2 will automatically be selected for the encoding standard you chose.
  4. Optionally select the Start preparing live event for input checkbox to automatically start the live event. Remember that billing starts as soon as a live event is started.
  5. Set any other options you want for the live event then select Review and create. The live event screen will appear with a listing of the streaming URLs.
  6. Copy the HLS URL for use with the player.

LL-HLS SDK Samples

There are detailed instructions in the comments of the sample code provided for LL-HLS.

See dynamic packaging page for more information on streaming URL formats.

Player testing

Use the links below to see the 3rd-party player sample test results.

Additional recommendations

When using HLS output, choose HLS CMAF (format=m3u8-cmaf) whenever possible. If you must use other streaming formats such as TS outputs with HLS v3 (format=aapl-m3u8-v3) or HLS v4 (format=aapl-m3u8-v4), be sure to set the LiveOutput.Hls.fragmentsPerTsSegment setting for your live event to 1 to ensure that Media Services packs only one mp4 fragment into one TS segment.

Note

The end-to-end latency can vary depending on local network conditions or by introducing a CDN caching layer. You should test your exact configurations.