Twitter videos are .m3u8
playlist files that link to multiple .ts (Transport Stream) video stream files. The Twitter user interface doesn’t provide an option to download the video embedded in a tweet or Direct Message (DM).
There are 3rd party Twitter video downloader websites such as savetweetvid.com
, twdown.net
etc., that can download Tweet videos, but they can’t download your Twitter Direct Message (DM) videos.
This article explains how to download a video from Twitter DM using your web browser (instead of the Twitter app), browser extension, or a third-party tool such as VLC Player or Youtube-DL.
Download Twitter Videos
How to Download Twitter DM Videos in Windows
There are excellent third-party browser extensions that can grab the video being currently played on a webpage. Let’s see how to download Twitter DM videos using a Chrome extension. Another method is to use VLC Player or YouTube-DL or FFmpeg, which is also illustrated in this article.
Method 1: Using Video Downloader PLUS Chrome Extension
The easiest option to download Twitter DM video or Tweet videos is to use the Video Downloader PLUS Chrome Web Store extension. When you play a video on a website (Twitter, Instagram, YouTube, etc.), the Video Downloader Chrome extension offers you the list of videos (resolutions) you can download from that particular webpage.
Method 2: Using VLC Player or YouTube-DL
To download a Twitter DM video without using a browser extension, you’ll need to get the full .m3u8
URL using your web browser’s Developer Tools (aka, “Inspector”). After you get the playlist file’s URL, the entire video can be downloaded using VLC Player, Youtube-DL, or the FFmpeg utility.
Step 1: Get the .m3u8 video playlist URL of a Twitter video
- Open your web browser and log in to
Twitter.com
- Click on the Tweet, which has the video you want to download. On the other hand, if you want to download a video attached in a Direct Message (DM) window, keep the DM window open.
- Press F12 (or Ctrl + Shift + I) on your web browser to open Developer Tools. The keyboard shortcut applies to Chrome, Firefox, Edge. It may vary if you have a different browser.
- In the Developer Tools (“Inspector”) window, click on the Network tab.
- Now, play the tweet or DM video.
When you play the video, the Network tab in Developer Tools will show the list of web addresses accessed by your web browser in realtime. It lists every resource (images, scripts, document, etc.) which your browser tries to access. You need to filter the items such that only the playlist URLs are listed.
- In the Network tab, type
.m3u8
in the Filter text box. You’ll see the list of video playlists of type.m3u8
in the listing.
Twitter will often have two or three versions of the video, each with a different quality or resolution. In this example, it listed three.m3u8
playlist URLs as follows:https://video.twimg.com/dm_video/1239024571245719552/pl/I3tawZVzakdumA4dC1as6gJRG9_m9cYxpedNl1CP5D8.m3u8 https://video.twimg.com/dm_video/1239024571245719552/pl/240x180/sgCoecoPwfDT9Ocy.m3u8 https://video.twimg.com/dm_video/1239024571245719552/pl/480x360/SD09DqlnZnrspKaU.m3u8 https://video.twimg.com/dm_video/1239024571245719552/pl/960x720/-SgzJ7QSJIYLJbjP.m3u8
- Choose the appropriate item depending upon the quality (eg., 240×180, 480×360, 960×720, etc.) you need, and copy its URL to the clipboard.
Now that you’ve got the playlist URL. The next step is to download the video streams and convert/combine them to an MP4 video.
Step 2: Download the video from .m3u8 playlist
The .m3u8 playlist is a plaintext file that will contain references to multiple audio and video streams (.ts). Here is a sample .m3u8
playlist 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, /ext_tw_video/1039419772750913536/pu/vid/0/3000/426x316/2ADgGY9xZ5OKu8G9.ts #EXTINF:3.000, /ext_tw_video/1039419772750913536/pu/vid/3000/6000/426x316/nc9JZv5XuY0VN_TE.ts #EXTINF:3.000, /ext_tw_video/1039419772750913536/pu/vid/6000/9000/426x316/0v-1tgEQh04oSR1s.ts #EXTINF:3.000, /ext_tw_video/1039419772750913536/pu/vid/9000/12000/426x316/ib3nb7WFa7wUsYO6.ts
The objective is to download each .ts
video stream file and concatenate them in the specified order. Downloading the videos manually and merging them is a tedious way. Fortunately, we have some easy 3rd party alternatives to download the video automatically.
Let’s download the videos using one of the following methods:
Option 1: Download video using Youtube-DL utility
YouTube-DL is a command-line program to download videos from YouTube.com and other video sites.
It’s important to make sure you get the latest version of the program, as it’s updated every now and then to fix compatibility issues. You can download the latest version of YouTube-DL from http://ytdl-org.github.io/youtube-dl/download.html
Open a Command Prompt window and then use the following command-line syntax:
youtube-dl.exe <m3u8 link>
Example:
youtube-dl.exe https://video.twimg.com/ext_tw_video/1039419772750913536/pu/pl/242x180/4TjyF_c8JBeoeez2.m3u8
The video will be downloaded to the current directory.
If needed, repeat the steps for each version (resolution) of the video and download it using Youtube-DL.
Option 2: Download using VLC Player
If you’re not a fan of command-line tools such as Youtube-DL.exe or FFmpeg.exe, then you can use the VLC Player to download the Twitter DM video from .m3u8 playlist.
- Install VLC Media Player and run it.
- From the Main menu, click Convert / Save
- Select the Network tab and paste the
.m3u8
URL you copied earlier. - Click the chevron next to Convert / Save button, and then click Convert.
- In the Convert dialog, select the
Video - H.264 + MP3 (MP4)
(or)Video - H.265 + MP3 (MP4)
option, and click the settings button (shown with a wrench icon)
- In the Video codec tab, enable Keep original video track
- Similarly, in the Audio codec tab, enable Keep original audio track
Editor’s Note: In my experience, if you don’t enable the “Keep original…” option, the resulting audio/video may be distorted.
- Click on the Save button.
- In the Convert dialog, mention the destination file name, and click Start.
VLC Player will now download the video from the .m3u8 playlist automatically.
Other than downloading Twitter DM videos, the above methods can be used to download from any video website.
One small request: If you liked this post, please share this?
One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!