How to download m3u8 to single video file

Updated: 28th September 2021
Tags: m3u8

If you need to download video file (single) from internet having only m3u8 URL location (with a bunch of files and maybe pointing to quality), it is just hard to find info.

I've researched this half a day and there are 2 solid options:

  1. https://www.videohelp.com/software/N-m3u8DL-CLI (windows only)
  2. https://www.videohelp.com/software/Streamlink (windows / linux / mac)

N-m3u8DL-CLI benefits

  1. Very low space requirements (tool size is less than 1mb)
  2. It doesn't place m3u8 chapters in file. This is a benefit for me as my old TV sometimes lags when moving forward and vide file contains chapters, or a lot of subtitles
  3. I like that it is in native windows .net. Tool size is small, and it does exactly what is needed for me.

Btw it even has GUI. So whatever you do, it will show proper command. Here some basic command to download file from m3u8 and save it:

.\N_m3u8DL-CLI_v2.9.7.exe "https://example.com/index.m3u8" --saveName "example" --enableDelAfterDone

It uses best quality by default
–enableDelAfterDone will delete a bunch of ts files after merging

  1. can be used on windows / linux/ mac
  2. a lot of options
  3. places chapters

cons are:

  1. python based
  2. big tool size (not sure if it is big con)

And chapters that it adds in video file output make my TV cry :(

Here basic usage:

streamlink "https://example.com/index.m3u8" best -o example.ts

About m3u8x

There is also tool m3u8x. Problems with this tool are:

  1. It has a strange interface. Need some digging to find how to use
  2. It does the simplest merging, ignoring timings. This flaw will make your video output lagging, if your ts files are not split exactly. And most of m3u8 nowadays split chunks, giving new chunk few milliseconds from chunk before.