ffmpeg-hls /

Filename Size Date modified Message
2.8 KB
1.3 KB
312 B
292 B

FFmpeg HLS

This is a demonstration on how to create an Apple HTTP Live Stream (HLS) using FFmpeg.

HLS is supported on:

  • iOS
  • Mac (Safari browser)
  • Windows 10 (Edge browser)
  • Android 3 or later
  • Flash (with a HLS plugin)

To create a HLS video stream you need to install FFmpeg. If you are running Linux, a package will probably be available from the distribution repositories. Otherwise you have to compile from source. You should use a recent version of FFmpeg (version 1.2 or later).

Ubuntu / Debian:

sudo apt-get install ffmpeg

Fedora / CentOS:

yum install ffmpeg

openSUSE (first install the Packman community repository):

sudo zypper install ffmpeg

For Windows download binaries from:

For Mac download binaries from:

Get the sources from the Sintel Open Movie Trailer:
sintel_trailer-720-png.tar.gz (images)
sintel_trailer-audio.flac (sound)

Unpack the images:

tar -xvf sintel_trailer-720-png.tar.gz

To create the HLS stream run:


On Windows you can install Cygwin or cmder to run shell scripts.

If all runs smoothly, you can view the movie in your browser (if it supports HLS) by opening:


To serve HLS from Apache add the correct MIME type to your configuration:

AddType application/x-mpegurl .m3u8
AddType video/mp2t .ts

Using MIME type application/vnd.apple.mpegURL will not work on most Android devices. HLS support is available on Android 3.0 or later, but seems to be quite picky about the HLS formatting and web server configuration.



Walter Ebert