Tutorial · HLS · MP4
How to Convert M3U8 to MP4 (3 Methods That Work in 2026)
M3U8 is a playlist, not a video file. To turn it into a single MP4 you need to download every segment, mux audio and video, and write a clean container. Three methods, ranked by ease of use.
"Convert M3U8 to MP4" is one of the most common search queries around streaming video, and one of the most misleading. M3U8 files are not videos. They are tiny text files that list dozens to thousands of segment URLs, with separate streams for video and audio in most cases. Converting one to MP4 means downloading every segment, decrypting them if needed, and muxing them into a single container. The right method depends on what you have access to and how often you need to do it.
This guide walks through the three methods that work consistently in 2026. We focus on legitimate use cases: archiving your own content, saving courses you have legally purchased, backing up videos you have explicit permission to download. We do not cover DRM-protected streams (Netflix, Disney Plus, Prime Video), and no method here works against them.
1. Quick context: M3U8 is a playlist, not a video
If you opened an M3U8 file in a text editor, you saw something like this:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXTINF:9.96,
segment-001.ts
#EXTINF:9.92,
segment-002.ts
#EXTINF:9.96,
segment-003.ts
...
#EXT-X-ENDLIST
Each .ts line is a small chunk of video, typically 6 to 10 seconds long. A 30-minute video translates to 180 to 300 segments. To get a single MP4, the converter has to:
- Download every segment in order
- If the master playlist points to a separate audio playlist, download those segments too
- If the segments are encrypted with AES-128, fetch the key and decrypt them
- Mux the segments into an MP4 container, ideally without re-encoding
Skip any step and you get a broken file: no audio, choppy video, or static. The detail you cannot see in the playlist is whether the stream is encrypted. We have a deeper dive in the encrypted M3U8 guide, and the format itself is covered in our M3U8 explainer.
2. Method 1: Browser extension (one click)
If you can play the video in a browser, a browser extension can usually save it. The extension runs inside your authenticated session, inherits your cookies, and handles the muxing transparently. No URL extraction, no command line.
Step-by-step with Vidora
- Install Vidora from the Chrome Web Store. Works on Chrome, Edge, Brave, Opera, Vivaldi, and any Chromium browser.
- Open the page that hosts the video. Press play once so the player fetches the M3U8 manifest. Vidora detects it automatically.
- Click the Vidora icon. The available qualities appear in the popup, with file size estimates.
- Pick a quality and click Download. Vidora fetches every segment in parallel (up to six at a time), muxes audio and video, and writes a single MP4 to your Downloads folder.
The output is the original codec and bitrate, no re-encoding. A 30-minute 1080p stream is typically saved in 2 to 4 minutes on a normal connection.
Trade-offs
- Pros: zero technical knowledge required, handles AES-128 transparently, forges Referer header automatically, muxes audio and video correctly.
- Cons: requires installing a browser extension, works only on Chromium-based browsers (Vidora is Chrome Web Store only).
3. Method 2: ffmpeg command line
ffmpeg is the swiss army knife of video processing and the most portable option. It runs on Windows, macOS, Linux, and any system you can compile a binary for. Once you have the M3U8 URL and the relevant headers, the conversion is one command.
The minimal command
ffmpeg -i "https://cdn.example.com/playlist.m3u8" -c copy output.mp4
The -c copy flag is critical: it tells ffmpeg to mux the segments without re-encoding. The output keeps the original bitrate, the conversion finishes in the time needed to download, and there is no quality loss.
The realistic command (for streams that need auth)
If the M3U8 URL needs a Referer or session cookies, capture them from DevTools and pass them to ffmpeg:
ffmpeg \
-headers $'Referer: https://source.example.com/\r\nCookie: session=abc123\r\n' \
-i "https://cdn.example.com/playlist.m3u8" \
-c copy \
output.mp4
To find the M3U8 URL and the headers, our DevTools tutorial walks through the exact steps in the Network tab. The official ffmpeg documentation for protocol options lives on the ffmpeg website.
When ffmpeg is the right choice
- You are working in a terminal, on a server, or in a CI pipeline.
- You need to script batch conversions for dozens of files.
- You want full control over container, codec, or output format (MKV instead of MP4, AAC re-encode for compatibility, etc.).
- You are comfortable extracting headers from DevTools.
4. Method 3: Online converters (and their limits)
A handful of websites offer M3U8 to MP4 conversion in the browser: paste a URL, get an MP4 download. They are tempting because they require no install, but they fail far more often than they succeed, for three structural reasons.
Why online converters usually fail
- No session context. The converter runs on a remote server. It has no access to your cookies, no Referer matching the source page, no JavaScript-derived auth tokens. Any M3U8 behind a paywall, login, or signed URL returns 403 Forbidden.
- No support for AES-128. Most cheap online tools concatenate raw segments without checking the EXT-X-KEY tag. Encrypted streams produce broken outputs that play as static.
- Privacy concerns. The URL you paste, plus any extracted metadata, ends up in the converter's logs. Your video files are processed on a server you do not control. For private content, this is a non-starter.
When an online converter is acceptable
For a public, unencrypted M3U8 (a free conference talk, an open educational resource, a Creative Commons clip), an online converter saves install time. It is the right tool for once-a-year use. For everything else, use a method that runs locally.
5. Which method to pick: the comparison table
| Criterion | Browser extension | ffmpeg | Online converter |
|---|---|---|---|
| Setup time | 2 minutes | 15 minutes (install + DevTools) | 0 |
| Works on private streams | Yes | Yes (with captured headers) | No |
| Handles AES-128 | Yes | Yes | Rarely |
| No re-encoding | Yes | Yes (with -c copy) | Varies |
| Batch use | Manual, one tab at a time | Excellent | Painful |
| Privacy | Local | Local | Remote server |
For 95 percent of users, the browser extension is the right answer. ffmpeg is the right answer if you live in a terminal or batch-process. Online converters are a stopgap for one-off public files.
6. Troubleshooting common issues
Output plays as static or solid color
The tool ignored the EXT-X-KEY tag and saved the encrypted bytes raw. Switch to a tool that handles AES-128 (Vidora, ffmpeg, yt-dlp) and re-download. Encrypted bytes already on disk cannot be recovered without the key applied at fetch time.
No audio in the output
Most adaptive HLS playlists deliver audio and video as separate streams. Some downloaders fetch only the video. ffmpeg with -c copy handles this natively. yt-dlp users should add --merge-output-format mp4. Vidora muxes both transparently.
File is much larger than expected
The tool re-encoded the video. Use -c copy with ffmpeg, the default mode in Vidora, or any tool that explicitly skips re-encoding. Re-encoding wastes time and degrades quality.
Conversion stops mid-file
One or more segments failed (403 Forbidden, expired token, network blip). Replay the source page to refresh tokens, then restart. ffmpeg has a -reconnect 1 -reconnect_streamed 1 pair of flags that helps with intermittent failures.
Playlist not found by the tool
You probably tried to convert before the player fetched the M3U8. Press play in the source tab, wait two seconds, then trigger the conversion. Lazy-loaded players only request the manifest when playback begins.
7. Frequently asked questions
Can I convert M3U8 to MP4 without ffmpeg?
Yes. A browser extension running in your authenticated session is the simplest path: detect the M3U8 automatically, download every segment, mux them, write a single MP4. No command line, no manual URL extraction. Vidora does this in one click.
Why is my converted MP4 much larger than the source?
The tool re-encoded the video instead of muxing it. Use -c copy with ffmpeg or a tool like Vidora that muxes streams as-is. Re-encoding adds overhead and can degrade quality.
Why is there no audio in my converted MP4?
Most adaptive HLS playlists deliver audio and video as separate streams. Some downloaders fetch only the video. ffmpeg with -c copy handles this natively. Vidora handles muxing transparently.
How long does the conversion take?
Without re-encoding, about the time needed to download the segments. A 30-minute 1080p stream takes 2 to 4 minutes on a normal connection. Re-encoding can multiply that by 5 to 10 depending on the codec preset.
Can online converters handle private or paid streams?
Usually no. Online converters run on a remote server with no access to your browser session, your cookies, or the Referer the CDN expects. They work only on public unauthenticated M3U8 URLs.
Can I batch-convert dozens of M3U8 files?
ffmpeg is the right tool for batch work: a simple shell loop processes a folder of URLs without supervision. Browser extensions are not designed for batch use, and online converters become tedious past 5 to 10 files.
About the author
RGC Digital LLC builds Vidora, a Pro video downloader Chrome extension for Vimeo, Bunny.net, HLS streams, and MP4. Based in Albuquerque, NM. We write about video tooling, streaming protocols, and Chrome extension engineering.