What is HLS?
HLS means HTTP Live Streaming. It is an adaptive bitrate streaming protocol for delivering live and on-demand audio and video over HTTP. This guide explains its playlists, media segments, quality switching, and how to generate an HLS stream with Transloadit.

What is streaming?
Streaming lets you play audio or video while more of it arrives, whether the content is live or prerecorded. Progressive download can also start playback before a file finishes downloading. HLS adds playlists and segmented delivery, allowing a player to choose among available quality levels as it fetches the content.
What does HLS mean?
The HLS full form is HTTP Live Streaming. Apple developed HLS, and the protocol is publicly documented in RFC 8216. It uses ordinary HTTP delivery, so streams can be served by web servers and distributed through CDNs. HLS supports both live broadcasts and prerecorded video on demand.
How does HLS work?
Before a video can be streamed using HLS, a packaging workflow usually performs three steps:
- Encode the source into several variants, such as different resolutions and bitrates. Codec and container choices depend on the devices you need to support; Apple's current HLS authoring specification lists its playback requirements.
- Divide each variant into media segments. Segment duration is declared in the playlist rather than fixed by the HLS protocol.
- Create a Media Playlist for each variant and a Multivariant Playlist that describes the available streams.
The player reads the Multivariant Playlist, chooses a variant, and loads its Media Playlist to find the segments. As network conditions change, it can request later segments from a higher- or lower-bitrate variant. Matching content and timestamps across variants, with aligned segment boundaries, help it switch smoothly.
The diagram below illustrates how the image quality may vary as the network connection fluctuates.

Audio and video can share segments or use separate renditions. HLS can also offer alternate audio languages, subtitles, and captions; playlist metadata describes the available choices.
What's the difference between HLS and MPEG-DASH?
Like HLS, MPEG-DASH describes segmented media and lets a player adapt between variants. The most useful differences are in their manifests, specifications, and playback ecosystems—not fixed codec or segment-duration rules.
| HLS | MPEG-DASH | |
|---|---|---|
| Manifest | M3U8 Multivariant and Media Playlists | MPD document |
| Specification | RFC 8216 and the evolving HLS specification | ISO/IEC 23009-1 |
| Media delivery | Segments fetched over HTTP | Segments fetched over HTTP |
| Apple platform support | Native frameworks and Safari support | Usually supplied through a compatible player implementation |
Both formats can provide adaptive bitrate playback, encryption, captions, alternate audio, and live or on-demand delivery. Choose based on your target players, required features, and packaging stack.
Does Transloadit support HLS?
Transloadit's /video/adaptive Robot
supports both HLS and MPEG-DASH. The maintained HLS demo
below shows a Template that encodes a video at three quality
levels, then packages them as media segments and .m3u8 playlists. You can deliver those files over
HTTP using a CDN.
<!-- This pulls Uppy from our CDN -->
<!-- For smaller self-hosted bundles, install Uppy and plugins manually: -->
<!-- npm i --save @uppy/core @uppy/dashboard @uppy/remote-sources @uppy/transloadit ... -->
<link
href="https://releases.transloadit.com/uppy/v6.0.6/uppy.min.css"
rel="stylesheet"
/>
<button id="browse">Select Files</button>
<script type="module">
import {
Uppy,
Dashboard,
ImageEditor,
RemoteSources,
Transloadit,
} from 'https://releases.transloadit.com/uppy/v6.0.6/uppy.min.mjs'
const uppy = new Uppy()
.use(Transloadit, {
waitForEncoding: true,
alwaysRunAssembly: true,
assemblyOptions: {
params: {
// It's often better store encoding instructions in your account
// and use a `template_id` instead of adding these steps inline
steps: {
':original': {
robot: '/upload/handle',
},
low: {
use: ':original',
robot: '/video/encode',
result: true,
ffmpeg_stack: 'v7',
preset: 'hls-270p',
turbo: true,
},
mid: {
use: ':original',
robot: '/video/encode',
result: true,
ffmpeg_stack: 'v7',
preset: 'hls-360p',
turbo: true,
},
high: {
use: ':original',
robot: '/video/encode',
result: true,
ffmpeg_stack: 'v7',
preset: 'hls-540p',
turbo: true,
},
adaptive: {
use: {
steps: ['low', 'mid', 'high'],
bundle_steps: true,
},
robot: '/video/adaptive',
playlist_name: 'my_playlist.m3u8',
technique: 'hls',
},
exported: {
use: ['adaptive', ':original'],
robot: '/s3/store',
credentials: 'demo_s3_credentials',
path: 'hlsdemo/${file.meta.relative_path}/${file.name}',
url_prefix: 'https://demos.transloadit.com/',
},
},
},
},
})
.use(Dashboard, { trigger: '#browse' })
.use(ImageEditor, { target: Dashboard })
.use(RemoteSources, {
companionUrl: 'https://api2.transloadit.com/companion',
})
.on('complete', ({ transloadit }) => {
// Due to `waitForEncoding:true` this is fired after encoding is done.
// Alternatively, set `waitForEncoding` to `false` and provide a `notify_url`
console.log(transloadit) // Array of Assembly Statuses
for (const assembly of transloadit) {
console.log(assembly.results) // Array of all encoding results
}
})
.on('error', (error) => {
console.error(error)
})
</script>
The player and playlist listings below use a local FFmpeg 9.0.2 encoding of the demo's surf.mp4,
with H.264 Main video at 30 fps and AAC-LC audio. When you run the Transloadit
Template above, its output filenames and values may differ
from this illustration.
my_playlist.m3u8 is a Multivariant Playlist, called a Master Playlist in RFC 8216. Each
#EXT-X-STREAM-INF entry describes a variant's bandwidth, resolution, and codecs. The following URI
points to its Media Playlist. Here, mp4a.40.2 identifies AAC-LC audio.
my_playlist.m3u8
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-STREAM-INF:BANDWIDTH=648976,AVERAGE-BANDWIDTH=625791,RESOLUTION=480x270,CODECS="avc1.4d4015,mp4a.40.2"
480x270/480x270_534648_30.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1062876,AVERAGE-BANDWIDTH=1022628,RESOLUTION=640x360,CODECS="avc1.4d401e,mp4a.40.2"
640x360/640x360_981616_30.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1680720,AVERAGE-BANDWIDTH=1618705,RESOLUTION=960x540,CODECS="avc1.4d401f,mp4a.40.2"
960x540/960x540_1567376_30.m3u8
960x540_1567376_30.m3u8
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-INDEPENDENT-SEGMENTS
#EXTINF:10.000000,
seg__0.ts
#EXTINF:10.000000,
seg__1.ts
#EXTINF:1.966667,
seg__2.ts
#EXT-X-ENDLIST
This Media Playlist lists MPEG-TS segments in playback order. Each #EXTINF gives the following
segment's duration in seconds: 10, 10, and 1.966667 here. These are durations, not timestamps or
instructions to switch quality; the player makes that choice.
#EXT-X-TARGETDURATION:10 sets the upper bound for segment durations rounded to the nearest integer
second. The final segment can be shorter. #EXT-X-PLAYLIST-TYPE:VOD marks an unchanging on-demand
playlist, and #EXT-X-ENDLIST says no more segments will be added. These are Media Playlist tags and
do not belong in the Multivariant Playlist.
Wrapping up
Try the HLS demo or create a Transloadit account to build an adaptive streaming Template.
