
Why Does M3U8 Need "Conversion" Instead of Just Save As?
When you watch an M3U8 stream, your browser is continuously requesting one .ts packet after another and decoding them in real time. These segments:
- Are formatted as MPEG-2 Transport Stream (.ts)
- Are typically 2–10 seconds of video each
- Cannot be played directly in most media players (limited format support)
To get a video file that plays on any device, you need to:
- Download all
.tssegments - Merge them in order
- Remux into an
.mp4container (optionally: re-encode to change codec)
The Two-Level M3U8 Structure
Before downloading, you need to understand that M3U8 may have two levels:
Master Playlist
#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=2800000,RESOLUTION=1280x720
720p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1400000,RESOLUTION=854x480
480p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=700000,RESOLUTION=640x360
360p/index.m3u8
This file contains no segments — only paths to Media Playlists for each quality level.
Media Playlist
#EXTM3U
#EXT-X-TARGETDURATION:6
#EXT-X-VERSION:3
#EXTINF:6.006,
segment-001.ts
#EXTINF:6.006,
segment-002.ts
...
#EXT-X-ENDLIST
This is the actual playlist containing the .ts segment paths.
Conversion Methods
Method 1: FFmpeg -c copy (Direct Remux — Fastest)
ffmpeg -i "https://stream.example.com/720p/index.m3u8" \
-c copy \
-movflags +faststart \
output.mp4
Notes:
- -c copy: No re-encoding — directly remuxes H.264 + AAC data from TS into an MP4 container
- -movflags +faststart: Moves the moov atom to the file start, enabling progressive download/playback
- Extremely fast, near-zero CPU usage, output size roughly equal to source
Method 2: FFmpeg with Re-encoding (Reduce File Size)
ffmpeg -i "https://stream.example.com/720p/index.m3u8" \
-c:v libx264 -crf 23 -preset medium \
-c:a aac -b:a 128k \
output.mp4
Notes:
- Use when you need to compress a high-bitrate source
- Lower CRF = better quality, larger file (recommended range: 18–28)
- Much slower than -c copy — requires full CPU re-encoding
Method 3: Browser-Based FFmpeg.wasm (No Installation)
This site's HLS Downloader runs FFmpeg.wasm in the browser to handle merging, equivalent to:
ffmpeg -f concat -safe 0 -i concat.txt -c copy output.mp4
Best for: Quickly merging a small public stream without installing any software.
Tool Comparison
| Tool | Installation | Speed | CORS Limitation | Best For |
|---|---|---|---|---|
| FFmpeg CLI | Required | ★★★★★ | Bypassable | Developers, technical users |
| VLC | Required | ★★★ | Bypassable | General users |
| Browser tool (this site) | None | ★★★ | Restricted | Quick testing |
| Online converters | None | ★★ | Varies | Non-technical users |
Common Issues
No Audio After Conversion?
Usually because the audio track is AC-3 (Dolby), which many MP4 players don't support. Fix:
ffmpeg -i input.m3u8 -c:v copy -c:a aac output.mp4
Force the audio to re-encode as AAC.
Audio/Video Out of Sync?
A/V sync issues usually result from PTS/DTS timestamp discontinuities in the TS segments. Add -async 1 or use -fflags +genpts to regenerate timestamps:
ffmpeg -fflags +genpts -i input.m3u8 -c copy output.mp4
M3U8 Is Encrypted?
If the M3U8 contains #EXT-X-KEY:METHOD=AES-128,URI=..., the segments are encrypted. FFmpeg handles AES-128 automatically. DRM (Widevine, FairPlay) is hardware-level protection that no public tool can handle.
More on encryption: 👉 M3U8 Encryption & DRM Explained
Related Resources
Ready to test your M3U8 stream?
🚀 Try the M3U8 Online Player