Step-by-Step Guide: Convert M3U8 to MP4 (With Tool Recommendations)

Honestly, every time I see a video URL ending in .m3u8, it drives me crazy. It’s not like I can’t watch it, but when I want to save it for offline viewing or clip a short segment, I’m faced with a bunch of .ts files and have no clue where to start.

I’ve been through the same struggle—spent a ton of time wrestling with command-line tools and various utilities, and hit plenty of pitfalls along the way. So today, I’m going to share how to turn M3U8 into MP4. This is purely from my own experience; if it helps you, great.

What Is M3U8 Anyway?

Simply put, it’s an index file for segmented video—it lists the addresses of video fragments (usually .ts files). When you download online course videos or live stream replays, especially from overseas sites, nine times out of ten you run into this format. A media player can handle it, but regular download tools are useless.

So what we need to do is piece those .ts files together and package them into an MP4.

Method 1: The Hardcore Route – ffmpeg

If you’re the type who likes full control over every frame, ffmpeg is your most reliable bet. Once it’s installed, a single command gets the job done:

ffmpeg -i "http://example.com/video.m3u8" -c copy -bsf:a aac_adtstoasc output.mp4

The -c copy flag copies the codec directly without re-encoding, making it the fastest option. -bsf:a aac_adtstoasc handles the audio—without it, some M3U8 files with AAC audio may end up silent.

That said, I spent half an hour just downloading and installing ffmpeg the first time, and some encrypted M3U8s require manually hunting down a key, which is a huge pain.

Later, I stumbled across an online M3U8 player called M3U8Player at https://m3u8player.link/. I was just testing if it could play the video, but it turned out it can directly download M3U8 videos as MP4.

The logic is dead simple:

  1. Paste the M3U8 link.
  2. It starts parsing and caching the video segments.
  3. Once buffered, click the download button in the bottom right corner and select “Download as MP4.”

I used it to grab a set of open courses: about 40–50 videos, each just a few minutes of segmented M3U8. Everything was automatically stitched together in one go, no issues. No ads popping up either—nice and clean.

Pros: No software installation needed, works right in the browser, and fast.
Cons: If the M3U8 requires a specific Referer or has a short expiration, parsing might fail. (But most public ones work fine.)

So now my workflow is: try M3U8Player first; if that doesn’t work, then fall back to ffmpeg.

Method 3: Downloader + Local Merging

There are also dedicated M3U8 downloaders out there, like the Chrome extension “M3U8 Downloader” or “Downie” on Mac. They automatically pop up a download option when they detect an M3U8 stream, defaulting to MP4 output.

I tried the extension version. Convenient? Yes. But I often ran into stuttering after merging, or audio out of sync—maybe it was my network, maybe not. I got tired of troubleshooting and switched back to the online tool.

On Encryption & Hotlinking Protection

If your M3U8 won’t play, or the downloaded file looks garbled, it’s probably encrypted (look for a #EXT-X-KEY field). Online tools are basically useless in this case; you’ll need a local tool plus the key file. But these videos are often copyrighted, so I’ll leave it at that—use your own judgment.

A Few Final Tips

  • Stick to a computer for any of these methods—success rates on mobile are lower.
  • Before downloading, test the link in a player to make sure it streams smoothly.
  • Some M3U8 links expire within minutes, so grab and convert them as soon as possible.

Personally, I still use M3U8Player the most: open the page, paste the link, and done. Give that a try first. If it doesn’t work, then consider the command-line approach.

Alright, that’s what I’ve gathered from all my tinkering. Hope it helps! If you have a better tool, feel free to share—I’m still looking for an even easier solution 😂