Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download a video from an M3U8 file [closed]

Tags:

m3u8

It's easy-peasy with VLC. Most steps are obvious, and you only need to do one trick.

  1. Testing: Copy the URL of the M3U8 file.
  2. Open VLC and hit Ctrl/Cmd + N, paste it there. If VLC plays it then you're almost there.
  3. Now download the M3U8 file.
  4. Here's the trick: It lacks the original URL of the TS segments so you have to paste it before the segments' names. E.g. seg-1-v1-a1.tshttp://videosource.site/seg-1-v1-a1.ts, it's in the URL where you downloaded the M3U8 file. Use even Notepad/TextEdit and their Replace function, or paste the URL manually to every filenames. (In this case, the string seg is a common sample so you can use it in the Replace function.)
  5. Now you have a "net-compliant" M3U8 file, you can add it to VLC. If VLC plays it then you're almost there.
  6. In VLC, click File menuConvert/Stream…
  7. Drag and Drop the M3U8 file as the media source.
  8. Customize profile: Encapsulation: MP4/MOV, Video and Audio: "Keep original …". Apply…
  9. Specify the output filename.
  10. Click to Save as File.

VLC will remux the file into an M4V file. It should be playable locally. (M4V files can be renamed to MP4, they're actually MP4 files.)

Convert & Stream Keep original video/audio track


The movie can be easily downloaded using the FFmpeg command line tool:

ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i my_movie.m3u8 -c copy my_movie.ts

Note that if the .m3u8 file was downloaded from the Internet and contains relative URLs, those URLs will need to be converted to absolute URLs. For example, seg-1-v1-a1.tshttp://videosource.site/seg-1-v1-a1.ts. Since the .m3u8 file is a textual format, one option would be to use the find/replace option of a text editor to accomplish this.


The best I could finalize is to use Chrome extension CoCoCut.

Simple, easy and smart way to download streaming files or m3u8 type files.


You can also use Jdownloader2 for the same thing. It’s even better as it does not consume so much CPU time as VLC.


  1. First of All, Play the video File on your Chrome Browser.
  2. Type Ctrl+Shift+I using Keyboard.
  3. Navigate to Network Section and Search M3u8 in the Filter Box.
  4. There will be List Displayed. Choose the last M3u8 file by Right Clicking and Copy the Link Address.
  5. Download https://play.google.com/store/apps/details?id=com.leavjenn.m3u8downloader&hl=en_IN&gl=US on Your Phone.
  6. Open the App & Paste the URL that You Have Copied.
  7. Click Download. Thanks...Keep Supporting.