What this guide sets up
HTTP Live Streaming (HLS) is the streaming format Apple introduced in 2009. It’s now supported by most players, browsers, and phones. HLS cuts a video into short segments (usually 6–10 seconds) and lists them in a playlist file ending in .m3u8. The player downloads the playlist, then fetches the segments one after another. Everything goes over plain HTTP, so any web server can host it, and it passes through firewalls and CDNs without special setup.
The trade-off is latency: live HLS streams typically run 15–30 seconds behind real time. For video on demand that doesn’t matter, which is why HLS is so widely used.
This guide sets up an HLS server on Windows 10/11 with IIS (the web server built into Windows) and FFmpeg, then plays a test video in VLC and on an iPhone. If you need MPEG-DASH instead, see my DASH server guide.
Step 1: Turn on IIS
- Press Windows Key + S and search for Turn Windows features on or off.
- Tick Internet Information Services and wait for it to install, then close the window.
- Open a browser and go to 127.0.0.1.
- You should see the IIS welcome page. If not, restart your computer.

Step 2: Change the web root (optional)
By default IIS serves files from C:\inetpub\wwwroot\. Skip this step if that’s fine.
Open IIS Manager (Windows Key + S, type IIS). Right-click Default Web Site and choose Manage Website > Advanced Settings. This window shows the site’s settings, including its folder (the “document root”), protocols, and bindings. Click Physical Path, then the button on the right, to pick a different folder.

Step 3: Enable CORS
Web players often load the stream from a different site, and browsers block that unless your server allows it. This permission is called cross-origin resource sharing (CORS).
- Open IIS Manager.
- Select Default Web Site and double-click HTTP Response Headers.
- Click Add. Enter Access-Control-Allow-Origin as the name and * as the value.
- Click Add again. Enter Access-Control-Allow-Headers as the name and Range as the value.

Step 4: Add the HLS MIME types
IIS won’t serve file types it doesn’t recognize, and it doesn’t know .m3u8 by default.
In IIS Manager, click your server and double-click MIME Types.
- Type .m3u8 for File name extension; type application/vnd.apple.mpegurl for MIME-type. Press OK.
- Add a second entry: .ts for File name extension; type video/mp2t for MIME-type. Press OK. (Skip this if
.tsis already listed.)
HLS MIME types: playlists (
.m3u8) useapplication/vnd.apple.mpegurl(some servers use the olderapplication/x-mpegURL, which players also accept), and MPEG-TS segments (.ts) usevideo/mp2t. A wrong MIME type is the most common reason an HLS stream won’t play from IIS.
When you’re done, the MIME Types list in IIS should include:
| File name extension | MIME type |
|---|---|
.m3u8 |
application/vnd.apple.mpegurl |
.ts |
video/mp2t |
Step 5: Install FFmpeg
- Download a Windows build of FFmpeg from ffmpeg.org.
- Extract it to C:\ffmpeg.
- Copy the path of the bin folder (C:\ffmpeg\bin).
- Open System Properties > Advanced System Settings > Environment Variables.
- Under System variables, select Path and click Edit.
- Click New, paste the path, and click OK.
To check, open a new Command Prompt and type ffmpeg. If it prints version information, it’s installed.
Step 6: Create the HLS segments
You can use my vid2tc tool to create video segments (and thumbnail containers) from your own videos, or follow these steps:
- Download the Big Buck Bunny sample video.
- Rename it to input.mp4.
- In that folder, run:
ffmpeg -i input.mp4 -force_key_frames "expr:gte(t,n_forced*10)" -strict -2 -c:a aac -c:v libx264 -f segment -segment_list_type m3u8 -segment_list_size 0 -segment_time 10.0 -segment_time_delta 0.1 -segment_list out.m3u8 out%02d.ts
This cuts the video into 10-second .ts segments and writes the out.m3u8 playlist.
- Create a folder named bbb in your web root (for example C:\inetpub\wwwroot\bbb). Copy every generated file into it, but not input.mp4.
To convert several videos at once, use my script:
git clone https://github.com/iamgmujtaba/hls-server.git
Then run:
python .\main.py -i .\input\ -o .\output\
Step 7: Test playback
Find your IP address
Open Command Prompt and run ipconfig. Note the IPv4 Address (something like 192.168.x.x).
Play in VLC
- Install VLC.
- Press Ctrl+N to open a network stream.
- Enter http://192.XXX.XXX.XXX/bbb/out.m3u8, using your own IP address.
- Press Play. If the video plays, your HLS server works.
Play on an iPhone or iPad
Safari plays HLS natively. Connect the device to the same Wi-Fi network and open http://192.XXX.XXX.XXX/bbb/out.m3u8 in Safari.
Play in a browser (Ubuntu, Jetson, or any device)
Most desktop browsers need a JavaScript player for HLS. Use hls.js and follow its getting started instructions.
The code is on GitHub. Open an issue there if you run into problems.