Download videos and extract audio from YouTube, Facebook, Twitter/X, TikTok, Instagram, and 1800+ more.
Auto-detects media on any page. Floating download pills. Zero configuration.
3-tier failover Β Β·Β hidden background server Β Β·Β real-time progress Β Β·Β 6-layer Facebook extraction
Β Β π Quick InstallΒ Β
Β Β Β
Β Β β¨ FeaturesΒ Β
Β Β Β
Β Β π SitesΒ Β
Β Β Β
Β Β ποΈ ArchitectureΒ Β
Β Β Β
Β Β π§ TroubleshootΒ Β
One command. Everything configured. No manual setup.
irm https://raw.githubusercontent.com/SysAdminDoc/MediaDL/refs/heads/main/Install-MediaDL.ps1 | iexRun in an elevated PowerShell window. The installer downloads yt-dlp, ffmpeg, registers protocol handlers, deploys the background download server, creates a Scheduled Task for auto-start, and installs the userscript.
MediaDL has optimized detection for these platforms, plus generic <video> detection for any site yt-dlp supports:
| Platform | Video | Audio | Platform | Video | Audio | ||
|---|---|---|---|---|---|---|---|
| YouTube | β | β | π΅ | Vimeo | β | β | |
| π | β | β | π | SoundCloud | β | β | |
| π¦ | Twitter / X | β | β | πΈ | Bandcamp | β | β |
| π΅ | TikTok | β | β | πΊ | Dailymotion | β | β |
| π· | β | β | Bilibili | β | β | ||
| π£ | Twitch | β | β | π΄ | Rumble / Odysee | β | β |
| π΄ | β | β | πΏ | Crunchyroll / Nebula | β | β |
+ Kick, Floatplane, Streamable, Imgur, Arte, Tagesschau, and 1800+ more via yt-dlp
|
Scans every page for video and audio elements. Attaches floating download pills automatically β no clicking required. HTTP server β protocol handler β GM_download. If one method fails, the next activates seamlessly. |
Lightweight HTTP server on Server token negotiated automatically via |
In-page progress bars with download speed and ETA. Appear at the bottom-right of the browser window. MutationObserver + URL change detection handles single-page navigation on YouTube, Facebook, Twitter, and all modern SPAs. |
|
Title and thumbnail fetched in background jobs. The progress popup renders instantly and never freezes. SHA256 URL lock prevents accidental double-downloads from rapid clicking. Animated bar with eased interpolation. Reads only last 4KB via |
Cancelling kills both the PowerShell wrapper and child YouTube via direct API. All other sites via Click "Complete!" to open Explorer with the downloaded file pre-selected. |
DWM rounded corners via Self-update throttled to once per 24 hours via timestamp file. 4-layer exception handling: closing flag, nuclear try/catch, control guards, and global |
ββ Browser ββββββββββββββββββββββββ ββ Windows βββββββββββββββββββββββββββ
β β β β
β MediaDL Userscript β β ββ Tier 1: Download Server βββββ β
β ββ Auto-detect <video> βHTTPβ β ytdl-server.ps1 β β
β ββ Floating download pills βββββΆβ β 127.0.0.1:9751 β β
β ββ Facebook 6-layer extraction β β β ββ Concurrent downloads (3x) β β
β ββ In-page progress toasts β β β ββ Real-time progress β β
β ββ SPA navigation handling β β β ββ Auto-start on login β β
β β β ββββββββββββββββββββββββββββββββ β
β ββββββββββββββββ ytdl:// β β
β β Click pill ββββββββββΆβ ββ Tier 2: Protocol Handler βββββ β
β ββββββββββββββββ β β β ytdl-handler.ps1 β β
β β β β ββ Progress popup β β
β ββββββββββββββββ GM_dlβ β β ββ Thumbnail + title β β
β β CDN direct βββββββββΆβ β ββ Auto-retry (3x) β β
β ββββββββββββββββ β β βββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββββββββββββ
β
Scheduled Task: MediaDL-Server
(auto-start on login, hidden)
| Tier | Method | How | Progress | Activates When |
|---|---|---|---|---|
| 1 | HTTP Server | GM_xmlhttpRequest to 127.0.0.1:9751 |
β Real-time polling | Server is running (default) |
| 2 | Protocol Handler | ytdl:// URL triggers ytdl-handler.ps1 |
β Popup window | Server is offline |
| 3 | Browser Direct | GM_download for CDN URLs |
β None | Both 1 & 2 fail, URL is direct CDN |
Facebook aggressively obfuscates video URLs. MediaDL defeats this with six extraction layers tried in priority order:
| # | Layer | Technique |
|---|---|---|
| 1 | XHR/Fetch Intercept | Hooks window.fetch and XMLHttpRequest at document-start to capture playable_url_quality_hd from GraphQL responses |
| 2 | Performance Resource Timing | Scans performance.getEntriesByType('resource') for fbcdn.net video entries, sorted by transfer size |
| 3 | React Fiber Tree Walk | Traverses __reactFiber from the <video> element upward through memoizedProps searching for browser_native_hd_url |
| 4 | Embedded JSON Scrape | Searches <script type="application/json"> blocks for HD video URL patterns |
| 5 | DOM Permalink Walk | Climbs the DOM tree from the video element to find a /videos/, /watch/, or /reel/ link |
| 6 | Page URL Fallback | Uses window.location.href if it matches a Facebook video/reel/story URL pattern |
The download server runs on 127.0.0.1:9751 (localhost only, not exposed to network).
| Method | Endpoint | Auth | Response |
|---|---|---|---|
GET |
/health |
β | Server status. Returns auth token when X-MDL-Client: MediaDL header is present |
POST |
/download |
π | Start download. Body: {url, title, audioOnly, referer}. Returns {id} |
GET |
/status/:id |
π | {status, progress, speed, eta, filename} |
GET |
/queue |
π | Array of all active downloads with status |
DELETE |
/cancel/:id |
π | Cancel and clean up a download |
GET |
/shutdown |
π | Gracefully stop the server |
π = Requires X-Auth-Token header (auto-negotiated by the userscript)
| File | Description |
|---|---|
Install-MediaDL.ps1 |
PowerShell WPF installer wizard (dark-themed GUI) |
MediaDL.user.js |
Userscript β auto-detect on all websites |
ytdl-server.ps1 |
Hidden HTTP download server (127.0.0.1:9751) |
ytdl-handler.ps1 |
Protocol handler with async progress popup |
ytdl-server-launcher.vbs |
Windowless server launcher |
ytdl-launcher.vbs |
Silent handler launcher |
config.json |
Paths, server port/token, preferences |
# Open PowerShell as Administrator, then run:
irm https://raw.githubusercontent.com/SysAdminDoc/MediaDL/refs/heads/main/Install-MediaDL.ps1 | iexThe installer creates a MediaDL-Server Scheduled Task that auto-starts the background server on login. No console windows will appear.
- Install Tampermonkey or Violentmonkey
- Install the userscript:
- Install yt-dlp and ffmpeg
- Set up protocol handlers manually (see below)
Protocol Handler Registry Entry
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\ytdl]
@="URL:YTDL Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\ytdl\shell\open\command]
@="wscript.exe \"C:\\Path\\To\\ytdl-launcher.vbs\" \"%1\""|
The installer handles everything:
|
If installing without the wizard:
|
| Issue | Solution |
|---|---|
| Download pills don't appear | Refresh the page. Verify userscript is enabled with @match *://*/* |
| Server not running | Check Task Scheduler for MediaDL-Server, or run ytdl-server-launcher.vbs manually |
| Facebook downloads fail | Click the video to trigger playback first (populates CDN URLs for extraction) |
| Download fails silently | Verify yt-dlp and ffmpeg are installed and paths are correct in config.json |
| JIT debugging dialog | Update to the latest handler (4-layer crash prevention) |
| Duplicate downloads | Update to the latest handler (SHA256 URL lock) |
Run the installer again β it auto-removes the previous installation before reinstalling.
For full manual removal:
- Task Scheduler β Delete the
MediaDL-Servertask - Delete
%LOCALAPPDATA%\MediaDL - Registry β Remove
HKCU:\Software\Classes\ytdl - Browser β Remove the userscript from Tampermonkey
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License β see the LICENSE file for details.
Β Β π Report IssuesΒ Β
Β Β Β Β
Β Β β Star on GitHubΒ Β
Β Β Β Β
Β Β π€ SysAdminDocΒ Β
Made with β€οΈ by SysAdminDoc