Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to download m3u8 and ts video movie streams.

m3u8 Downloading

  1. Open Chrome Developer tools and click the Network tab.
  2. Navigate to the page with the video and get it to start playing.
  3. Filter the list of files to "m3u8".
  4. Find master.m3u8 or index.m3u8 and click on it.
  5. Save the file to disk and look inside it.
  6. If the file contains a single m3u8 master url, copy that one instead.
  7. Run the program m3u8x.
  8. Paste the same m3u8 url in both textboxes (URL and Quality URL) and click "Headers" and set the referral url and user-agent from the request as found in Chrome.
  9. Select the Video format of "MP4".
  10. Checkmark "One .. One".
  11. Click "Download".
  12. A dialog will display with all of the individual .ts files. Click "Download" to download them all and join them together.

Auto-Clicking Continue Dialog

Occasionally, the download of one of the .ts files may fail and a dialog will displaying asking to continue or not. You can automatically click "Yes" and continue downloading everything by using a tool such as Buzof.

@simsnet

This comment has been minimized.

Copy link

simsnet commented Sep 17, 2018

Been needing a tutorial like this for some time, and I'm glad I found this one, which works perfectly. Thanks for writing!

@aljorhythm

This comment has been minimized.

@ashunani

This comment has been minimized.

Copy link

ashunani commented Oct 1, 2018

video tutorial is necessary

@josephrocca

This comment has been minimized.

Copy link

josephrocca commented Oct 16, 2018

No need to download a program for this if you've already got VLC! :)

Just open VLC, then click the "Media" menu and then click "Open Network Stream..." (or similar) and then paste the m3u8 URL in the box: https://i.imgur.com/CjWZjtb.png You can then click play, or click the dropdown menu next to the play button and click "convert" to download it.

@cisko3000

This comment has been minimized.

Copy link

cisko3000 commented Oct 31, 2018

No need to download a program for this if you've already got VLC! :)

Just open VLC, then click the "Media" menu and then click "Open Network Stream..." (or similar) and then paste the m3u8 URL in the box: https://i.imgur.com/CjWZjtb.png You can then click play, or click the dropdown menu next to the play button and click "convert" to download it.

The thing about VLC is that it doesn't show an option for joining them all together or downloading them all at once.

@dosentmatter

This comment has been minimized.

Copy link

dosentmatter commented Nov 27, 2018

I'm on macOS. Another problem I have with VLC is that it doesn't follow HTTP 302 redirects.

ffmpeg is easiest since it downloads and converts. If you use VLC, you can download them and then find some program to merge/convert.

@shahesam84

This comment has been minimized.

Copy link

shahesam84 commented Feb 28, 2019

Great work!
Can you add any feature that can limit the size of recorded .ts file (re-write feature)? In other words, is there a way I can use this to re-stream a source .m3u8?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.