Unified yt-dlp downloader - generates cross-platform Python scripts for video, audio, subtitles
☕ If you find this tool helpful & would like to support its maintenance, please consider leaving a tip on:
Thank you! :-)
🖼 For a quick impression of this script, refer to the screenshots at the bottom.
Generates ready-to-run Python scripts for downloading media from YouTube, Reddit, Instagram, TikTok, and many more sites using yt-dlp. One-click download button, configurable video/audio/subtitle options, and sophisticated merge/separate output modes—all in a cross-platform script that works on Windows, Mac, and Linux.
This script is developed and tested primarily on Windows using the following environment:
While the generated Python scripts are designed to be cross-platform and include FFmpeg fallbacks, complex merge scenarios have been thoroughly tested only with mkvmerge on Windows. If you encounter issues on other platforms or without mkvmerge, please feel free to report them, but be aware this is a personal tool shared for others to use "as is."
Downloading media with yt-dlp requires memorizing complex command-line syntax:
-f bestvideo[height<=1080]+bestaudio is not intuitive-S flags--write-subs --sub-langs en --convert-subs srt is verboseThis script generates a complete, ready-to-run Python script with all your options pre-configured. Just click, download, and run.
--cookies.py scriptGM_cookie API — no separate browser extension needed| Mode | Description |
|---|---|
| Merge | Combine video + audio + subtitles into one MKV file |
| Separate | Keep each component as its own file |
| Merge + Sep | Get both: merged file AND separate copies |
| None | Skip this component entirely |
Mix and match modes per component—e.g., merge video+audio but keep subtitles separate.
Hover over the ⚙️ Options row in the context menu to access power-user toggles:
.py script after successful executionWhen downloading video + audio as separate streams, the script uses a robust two-tier system to correctly identify which file is which:
This prevents misclassification of audio-only .webm/.mp4 files as video.
Generated scripts verify that all required tools (ffmpeg, ffprobe, mkvmerge) are available before starting any downloads, based on what the selected options actually need. Clear error messages tell you exactly what to install.
Works on any site supported by yt-dlp, including:
| Action | Result |
|---|---|
| Click | Download Python script with current settings |
| Right-click | Open settings menu |
| Double-click | Hide button for 5 seconds |
Windows:
python dl_video_name.py
Mac/Linux:
python3 dl_video_name.py
The script changes to its own directory automatically—run it from anywhere.
.py script pre-configured with your URL and settings.For public content, no cookies are needed. For login-required content (age-restricted, private, members-only), you can use the built-in cookie export.
The built-in export produces a complete cookie file equivalent to a dedicated extension — but you need to enable HttpOnly cookie access in your userscript manager first. This is a one-time setting.
Why is this needed? Critical authentication cookies (YouTube's
LOGIN_INFO,HSID,__Secure-*PSID, etc.) are marked asHttpOnly— a security flag that blocks access by default. Both Tampermonkey and Violentmonkey can access these cookies through the browser's extension API, but they require you to explicitly opt in. With the setting enabled, the export is complete.
Once the setting is enabled:
.py downloadIf you prefer not to change userscript manager settings, you can use a dedicated cookie extension like "Get cookies.txt LOCALLY". Place the exported file in the same directory as the .py script, named %domain%_cookies.txt (e.g., www.youtube.com_cookies.txt). The generated scripts automatically detect and use it.
| Manager | GM_cookie | HttpOnly Support | Status |
|---|---|---|---|
| Tampermonkey | ✅ | ✅ (enable in settings) | Available in current stable release |
| Violentmonkey | ✅ | ✅ (enable globally + per-script) | Available in beta v2.35.1+ |
hostname_cookies.txt next to the script for authenticationPHASE 1: Download all components (single metadata fetch)
PHASE 2: Identify downloaded files (two-tier: ffprobe → yt-dlp probe)
PHASE 3: Merge selected components (mkvmerge or FFmpeg)
PHASE 4: Create separate copies (if requested)
PHASE 5: Cleanup temporary files (+ optional script/cookie removal)
Q: Why Python instead of batch files?
A: Batch files only work on Windows. Python scripts run on Windows, Mac, and Linux with identical behavior.
Q: Do I need to install any Python packages?
A: No. The script uses only Python's standard library (subprocess, shutil, pathlib, glob).
Q: What if mkvmerge isn't installed?
A: The script falls back to FFmpeg via yt-dlp's native merging. Some advanced combinations (merge video+subs without audio) require mkvmerge.
Q: Why does the script ask for subtitle language every time?
A: Different videos have different available subtitles. The script shows you what's available and lets you choose interactively.
Q: Can I download private/age-restricted videos?
A: Yes, with cookies. Use the built-in "🍪 Export Cookies" feature — make sure to enable HttpOnly cookie access in your userscript manager's settings first (see Cookie Authentication section).
Q: Will the generated scripts run after I close the browser?
A: Yes. The .py scripts are fully standalone and run independently of the browser.
Q: Can the script and cookie files auto-delete after running?
A: Yes. Enable "Delete .py After Run" and/or "Delete Cookie After Run" in the ⚙️ Options flyout menu. Files are only deleted after successful execution.
Q: The download button isn't appearing on a site.
A: The script only activates on sites listed in the @match directives. You can add additional sites by editing the userscript header.
Q: Where are the advanced options?
A: Hover over the "⚙️ Options" row in the context menu to reveal power-user toggles like Prefer MP4, auto-cleanup, and cookie auto-export.
Q: The cookie export says the API is not available.
A: A banner will appear with setup instructions for your userscript manager. Violentmonkey (beta v2.35.1+) and Tampermonkey both support it — you just need to enable cookie access in their settings. Alternatively, use a dedicated cookie extension as a workaround.
Q: The exported cookies don't work for age-restricted content.
A: Make sure you've enabled HttpOnly cookie access in your userscript manager's settings. Without this, critical authentication cookies are filtered out. See the Cookie Authentication section for step-by-step instructions.
| Permission | Why It's Needed |
|---|---|
GM_setValue / GM_getValue |
Save your quality/codec/format preferences |
GM_cookie |
Export browser cookies for yt-dlp authentication (enable HttpOnly access in manager settings for full functionality) |