# HLS

The most widely supported adaptive streaming format for live and on-demand video.

## What is HLS

HTTP Live Streaming (HLS) is an adaptive bitrate streaming protocol developed by Apple that delivers video over standard HTTP connections. HLS breaks video into small segments (typically 6–10 seconds) and serves them via a playlist manifest (.m3u8), allowing the player to switch between quality levels based on the viewer's bandwidth in real time. Originally an Apple-only technology, HLS is now supported by every major browser, mobile OS, smart TV, and streaming device — making it the default choice for most video delivery workflows. HLS also supports Low-Latency HLS (LL-HLS), which reduces glass-to-glass latency to 2–5 seconds for near-real-time delivery.

## When to Choose HLS

Choose HLS when:

- You need to reach iOS devices — Safari requires HLS for adaptive streaming, and there is no DASH support on Apple platforms.
- Your content will be delivered via CDN over HTTP — HLS uses standard HTTP infrastructure, so every CDN supports it without special configuration.
- You need DRM protection with Apple FairPlay — FairPlay only works with HLS manifests and is the only way to protect content on Apple devices.

Consider alternatives when:

- You need sub-2-second latency — Look at [WebRTC](https://cloud.qencode.com/protocols/webrtc) for delivery or [SRT](https://cloud.qencode.com/protocols/srt) for ingest. Even LL-HLS has 2–5 second latency.
- You're targeting only non-Apple platforms and want open standards — [MPEG-DASH](https://cloud.qencode.com/video-formats-codecs/mpeg-dash) is an ISO standard with native Widevine and PlayReady support.
- You want a single set of segments for both HLS and DASH — [CMAF](https://cloud.qencode.com/video-formats-codecs/cmaf) eliminates duplicate segment storage by using one set of fmp4 segments with two manifests.

## Transcoding Demo

### Source video  
**URL**  
**Upload File**  
**Sample Video**  
Enter URL for Source Video  
Select a video you want to transcode  
**Upload File**  
Maximum file size: 5GB  
Choose our Demo File  
4K Sample (Qencode)  
**Source Type**  
**URL**  
Enter URL for Source Video  
Convert to HLS

Transcoding demo creates a small clip with a watermark. To test transcoding full files, [Start your Free Plan for 500 credits](https://portal.qencode.com/signup)

Select a source video and click “Convert” to see HLS output in action.

## Key Characteristics

|     |     |
| --- | --- |
| Type | Streaming protocol + container |
| File extension(s) | .m3u8 (manifest), .ts / .fmp4 (segments) |
| Supported video codecs | [H.264](https://cloud.qencode.com/video-formats-codecs/h264), [H.265 (HEVC)](https://cloud.qencode.com/video-formats-codecs/h265), [AV1](https://cloud.qencode.com/video-formats-codecs/av1) |
| Supported audio codecs | [AAC](https://cloud.qencode.com/audio-formats-codecs/aac) |
| DRM support | FairPlay (native), Widevine (via CMAF), PlayReady (via CMAF) |
| Adaptive bitrate | Yes — quality switching via manifest-level rendition selection |
| Latency | Standard: 15–30s • LL-HLS: 2–5s |
| Live streaming support | Native — sliding window manifest with live edge |
| Typical use case | Broad-reach VOD and live delivery; default for Apple ecosystem |

## Browser & Device Support

| Platform | HLS | MPEG-DASH | MP4 (progressive) | WebM | CMAF |
| --- | --- | --- | --- | --- | --- |
| Chrome (desktop) | via MSE | via MSE |  |  | via MSE |
| Safari (macOS) | native |  |  |  | HLS mode |
| Firefox (desktop) | via MSE | via MSE |  |  | via MSE |
| Edge | via MSE | via MSE |  |  | via MSE |
| iOS Safari | native |  |  |  | HLS mode |
| Android Chrome | via MSE | via MSE |  |  | via MSE |
| Smart TVs (Tizen/webOS) |  |  |  | limited |  |
| Roku / Fire TV |  |  |  |  |  |
| Game consoles (PS5, Xbox) |  |  |  |  |  |

## How Qencode Handles HLS

Qencode generates HLS output with full adaptive bitrate ladder support. Specify `advanced_hls` as the output format and Qencode handles manifest generation, segment packaging, and multi-rendition encoding in a single job. Choose any supported video codec — H.264, H.265, AV1 — and Qencode produces correctly formatted .m3u8 manifests with .ts or .fmp4 segments.

Pair HLS output with [Per-Title Encoding](https://cloud.qencode.com/per-title-encoding) to automatically optimize the bitrate ladder for each title, or add [DRM](https://cloud.qencode.com/security/drm) protection with a single parameter. Qencode also supports HLS playlist refresh for updating live manifests.

```
{
  "query": {
    "source": "https://your-storage.com/video.mp4",
    "format": [
      {
        "output": "advanced_hls",
        "separate_audio": 1,
        "stream": [
          {
            "video_codec": "libx265",
            "resolution": 2160,
            "optimize_bitrate": 1,
            "framerate": "30",
            "keyframe": "90"
          }
        ],
        "segment_duration": "6"
      }
    ]
  }
}
```

Copy this payload and use it with your API key to generate HLS output from any video source.

## HLS vs. MPEG-DASH

|  | HLS | MPEG-DASH |
| --- | --- | --- |
| Apple device support | Native | Requires MSE |
| DRM | FairPlay (native), Widevine/PlayReady (via CMAF) | Widevine, PlayReady (native) |
| Segment format | .ts or .fmp4 | .fmp4 or .webm |
| Low-latency mode | LL-HLS (2–5s) | LL-DASH (2–5s) |
| Open standard | Apple-controlled | ISO/IEC standard |
| Best for | Universal reach, Apple ecosystem | Open-standard deployments, Android-first |

CMAF: The bridge between HLS and DASH — If you need to serve both HLS and DASH audiences, [CMAF](https://cloud.qencode.com/video-formats-codecs/cmaf) lets you use a single set of fmp4 segments with two different manifests, eliminating duplicate storage.

## What It Costs

Source Video Minutes  
SD$0.01  
Total Cost$0.01  
1  
1M  
Format  
HLS  
Codec  
H.264  
Framerate  
25  
Per-Title encoding  
Choose resolution  
- 240  
- 360  
- 480  
- 720  
- 1080  
- 1440  
- 4K  
- 5K  
- 6K  
- 7K  
- 8K  
- 10K  
- 12K  
- 14K  
- 16K

Planning for budgets over $1,000/month? [Schedule a call](https://meet.qencode.com/meetings/murad/qencode-meeting) with us to explore additional volume discounts.

## DRM

Protect HLS content with Apple FairPlay, Google Widevine, and Microsoft PlayReady encryption.
