A simple, modern web interface to download media from YouTube and X (formerly Twitter) using yt-dlp and Python.
Supports direct downloads as:
- 🎬 YouTube videos (.mp4)
- 🎵 YouTube audio (.mp3)
- 📥 Twitter/X videos (as
.mp4)
- 🎯 Clean and responsive dark UI
- 🔐 Login Authentication: Optional authentication to restrict access (default username
admin/ passwordadmin) - 🔎 Automatic YouTube title as filename
- 🧠 Smart MP4/MP3 selection (only enabled for YouTube)
- ⚡️ No persistent storage required (downloads stream to browser)
- 🐳 Easy deployment via Docker & Docker Compose
- ⚙️ Customizable download path and filename patterns
-
Clone this repository:
git clone https://github.com/<your-username>/strimdl.git cd strimdl
-
Copy the example environment file and configure your settings:
cp .env.example .env
-
Edit the
.envfile and set:DOWNLOAD_PATH=/path/to/your/downloads TZ=Europe/Berlin LANG=en_US.UTF-8 VIDEO_NAMING_PATTERN={userId}@twitter-{tweetId} IMAGE_NAMING_PATTERN={userId}@twitter-{tweetId} STRIMDL_USER=admin STRIMDL_PASS=admin YTDLP_COOKIES_DIR=./cookies YTDLP_COOKIES_PATH=/cookies/youtube.txt YTDLP_UPDATE_ON_START=true STRIMDL_UPDATE_DEVMODE=false STRIMDL_UPDATE_SERVER_URL=https://update.gerald-hasani.com FFMPEG_VIDEO_PRESET=veryfast FFMPEG_VIDEO_CRF=24 FFMPEG_MAX_HEIGHT=1440
Note: By default, login is required with username
adminand passwordadmin. ChangeSTRIMDL_USERandSTRIMDL_PASSto secure your instance. If YouTube asks yt-dlp to confirm you are not a bot, export browser cookies to./cookies/youtube.txtand keepYTDLP_COOKIES_PATH=/cookies/youtube.txt. -
Start via Docker Compose:
docker compose up -d --build
Or build and run with Docker:
docker build -t strimdl . docker run --rm -p 10001:10001 --env-file .env -v ${DOWNLOAD_PATH}:/download strimdl
-
Open your browser and go to:
http://localhost:10001/
- Access the login page if prompted.
- Log in with your credentials.
- Paste a YouTube or X (Twitter) URL.
- Choose format and quality (for YouTube).
- Click Start Download.
StrimDL checks Gerald Hasani's Update Center once per day and shows a notice in the web UI when a new version is available.
For testing, enable dev mode to check every 3 minutes:
STRIMDL_UPDATE_DEVMODE=trueThe public StrimDL Update Center API key is built into the app.
YouTube often serves high resolutions as AV1 or VP9. For browser-compatible MP4 output StrimDL re-encodes those videos to H.264, and 1440p/2160p re-encoding can take several minutes.
These .env values control that conversion:
FFMPEG_VIDEO_PRESET=veryfast
FFMPEG_VIDEO_CRF=24
FFMPEG_MAX_HEIGHT=1440FFMPEG_VIDEO_PRESET controls speed. Use ultrafast for faster but larger files, veryfast as a good default, or medium for smaller files at the cost of time.
FFMPEG_VIDEO_CRF controls quality/size. Lower values look better and create larger files. Common values are 23 to 26.
FFMPEG_MAX_HEIGHT caps the output height during re-encoding. The default 1440 prevents very slow 2160p conversions. Set it to 0 if you want to keep the source height.
If YouTube returns Sign in to confirm you’re not a bot, yt-dlp needs browser cookies from a signed-in browser session.
-
Create a local cookies directory:
mkdir -p cookies
-
Export YouTube cookies in Netscape
cookies.txtformat and save them as:./cookies/youtube.txt -
Set these values in
.env:YTDLP_COOKIES_DIR=./cookies YTDLP_COOKIES_PATH=/cookies/youtube.txt YTDLP_UPDATE_ON_START=true
-
Recreate the container:
docker compose up -d --build
Keep the cookie file private. It can grant access to your browser session.
YTDLP_UPDATE_ON_START=true checks for the latest stable yt-dlp release whenever the container starts. This avoids stale Docker build-cache layers after YouTube changes.
- yt-dlp
- Python 3.11+
- HTML & JavaScript (no frameworks)
- Docker & Docker Compose
- v3.0.5
- Added update server integration to notify users when a new version is available.
- Changed the main action button to show a red
Cancelstate while a download or conversion is running. - Added a visible activity indicator with elapsed time during long-running download/conversion steps.
- Made ffmpeg conversion behavior configurable through
.env. - Improved conversion performance defaults for AV1/VP9 YouTube videos:
FFMPEG_VIDEO_PRESET=veryfastFFMPEG_VIDEO_CRF=24FFMPEG_MAX_HEIGHT=1440
- Avoided unnecessary re-encoding when the cached video can be copied directly.
- Cleaned up partial cache files after cancelled downloads.
- Updated StrimDL version to
3.0.5. - Centralized version display so the footer reads from backend
APP_VERSIONinstead of hardcoding the version inindex.html. - Rebuilt and smoke-tested the Docker container.
-
v3.0.1 – Switched audio download from CBR/ABR to VBR (Variable Bitrate), providing significantly better quality and bitrate as it always selects the best available quality during download. Improved UI with custom dropdown for format selection, real-time status updates via Server-Side Events (SSE), playlist link detection, and enhanced spacing between UI elements. YouTube downloads are working again after they stopped working following the update on the YouTube platform.
-
v2.0.0 – Added login authentication, improved Docker support, updated UI and README.
This project is licensed under the MIT License.