About
The M3U file is a playlist file format used often to define a stream video on the Internet. Twitter (as of today) uses it as video definition format.
This page shows you how to download and convert a m3u8 playlist video to mp4 manually.
This is a knowledge article, if you just want to download it straight away, you can also just use a downloader tool such as youtube-dl
Example:
youtube-dl.exe -v https://twitter.com/twitter/statuses/1002000000000000000
Steps
Download/convert into mp4:
- Refresh the page with the video
- Spot the file m3u or m3u8 in the network tab of the developer tool
- Download it
#EXTM3U
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=256000,RESOLUTION=320x180,CODECS="mp4a.40.2,avc1.4d0015"
/ext_tw_video/1077291806440726529/pu/pl/320x180/lPgvvrbPTNkCmUS5.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=832000,RESOLUTION=640x360,CODECS="mp4a.40.2,avc1.4d001f"
/ext_tw_video/1077291806440726529/pu/pl/640x360/FB26Ha3W0n5YjtKh.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2176000,RESOLUTION=1280x720,CODECS="mp4a.40.2,avc1.640020"
/ext_tw_video/1077291806440726529/pu/pl/1280x720/CD3BlFgCASTKsG7k.m3u8
- Choose the file with the resolution wanted and create the URL by adding the base url. Example for 640×360: https://video.twimg.com//ext_tw_video/1077291806440726529/pu/pl/640x360/FB26Ha3W0n5YjtKh.m3u8
- Download it. It shows a playlist of chunk of the original video file.
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-TARGETDURATION:3
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-ALLOW-CACHE:YES
#EXTINF:3.000,
amplify_video/910995837114769408/vid/0/3000/640x360/_o1ZIigzjG6YtFRk.ts
#EXTINF:3.000,
amplify_video/910995837114769408/vid/3000/6000/640x360/Z3AUA6Q2Nonvqg4C.ts
- Make the URL absolute for each chunk by adding the base URL. For twitter, https://video.twimg.com
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-TARGETDURATION:3
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-ALLOW-CACHE:YES
#EXTINF:3.000,
https://video.twimg.com/amplify_video/910995837114769408/vid/0/3000/640x360/_o1ZIigzjG6YtFRk.ts
#EXTINF:3.000,
https://video.twimg.com/amplify_video/910995837114769408/vid/3000/6000/640x360/Z3AUA6Q2Nonvqg4C.ts
- Download the last version of VLC. Choose Media > Convert.
- Select the m3u file with the absolute URL.
- Click on the Convert option of the Convert / Save dropdown
- Choose your destination