A Chrome extension that downloads videos from X/Twitter with quality selection.
Why? · How it works · Installation · Usage
You're on X, you find a video you want to keep, and your options are: a sketchy third-party site that wraps the video in five layers of ads, a command-line tool that needs a post URL pasted in, or screen recording like it's 2015.
x-video-dl fixes this. One click on the video, pick your quality, done. The mp4 lands in your Downloads folder.
The extension intercepts X's own API responses as they stream in, extracting the direct mp4 URLs and bitrate metadata that X already sends to your browser. No external services, no API keys, no scraping.
- Download button appears on every video post, directly on the video player
- Quality picker shows all available resolutions (360p, 480p, 720p, 1080p) sorted best-first
- Downloads save to a configurable subfolder in your Downloads directory
- Works on both
x.comandtwitter.com - Dark and light mode support
- Zero dependencies, no build step
This is an unpacked Chrome extension. It works in Chrome, Chromium, and any Chromium fork (Brave, Arc, Helium, etc.).
- Download this repo: click the green Code button above, then Download ZIP
- Unzip the downloaded file somewhere permanent (e.g. your Documents folder)
- Open
chrome://extensionsin your browser - Enable Developer mode (top-right toggle)
- Click Load unpacked
- Select the unzipped
x-video-dl-mainfolder
- Navigate to any post with a video
- A small download button appears in the top-right corner of the video
- Click it to see available quality options
- Pick a resolution and the video downloads immediately
Configure the download folder by clicking the extension icon in your toolbar. The folder is relative to your browser's default Downloads directory (default: x-video-dl).
Tip: If the quality picker says "No video data captured yet," scroll past the post and back, or refresh the page. The extension needs to see X's API response to capture the video URLs.
| File | Role |
|---|---|
inject.js |
Runs in the page context. Intercepts fetch and XMLHttpRequest to capture video variant data from X's GraphQL API responses. |
content.js |
Runs in the extension context. Observes the DOM for video posts, adds download buttons, shows the quality picker, and communicates with the service worker. |
content.css |
Styles for the download button, quality dropdown, and toast notifications. |
background.js |
Service worker. Handles file downloads via chrome.downloads and reads folder settings from chrome.storage.sync. |
popup.html / popup.js |
Extension popup for configuring the download subfolder. |
MIT
