Medba Downloader is an open-source YouTube Downloader web app. Paste a YouTube URL, pick a quality, and download MP4, MP3, or thumbnail files in seconds. No accounts, no database, no dashboard.
- Fast single-page YouTube Downloader UI
- Download YouTube videos as MP4 qualities with merged audio
- Download YouTube audio as MP3
- Download original YouTube thumbnail
- English/Arabic language toggle
- Light/Dark theme toggle
- Friendly and readable error messages
- Temporary file cleanup after streaming download
medba-downloader/
├── client/
│ ├── public/
│ │ └── assets/
│ │ └── favicon.png
│ ├── src/
│ │ ├── App.jsx
│ │ ├── index.css
│ │ └── main.jsx
│ ├── index.html
│ ├── package.json
│ └── vite.config.js
├── server/
│ ├── scripts/
│ │ └── dev.js
│ ├── routes/
│ │ ├── download.js
│ │ └── formats.js
│ ├── tmp/
│ ├── package.json
│ └── server.js
├── .env.example
└── README.md
Install ffmpeg, python3, and pip with your distro package manager, then install yt-dlp with pip.
Examples:
sudo apt update
sudo apt install -y ffmpeg python3-pip
python3 -m pip install yt-dlpsudo dnf install ffmpeg python3-pip
python3 -m pip install yt-dlpsudo pacman -S ffmpeg python-pip
python -m pip install yt-dlpInstall dependencies with winget:
winget install --id Gyan.FFmpeg -e
winget install --id Python.Python.3.12 -e
py -m pip install yt-dlpThen restart terminal so ffmpeg and yt-dlp are available in PATH.
cd server && npm install
cd ../client && npm installCreate backend env file:
cd server
cp ../.env.example .envPowerShell alternative:
cd server
Copy-Item ..\.env.example .envOptional client env (client/.env):
VITE_API_URL=http://localhost:5000
VITE_GITHUB_URL=https://github.com/med6ba/medba-downloaderFrom the project root, run:
npm run devOpen: http://localhost:5173
You now have Medba Downloader running locally as a full YouTube Downloader web app.
From .env.example:
PORT=5000
CLIENT_ORIGIN=http://localhost:5173
RATE_LIMIT_WINDOW_MS=60000
RATE_LIMIT_MAX=120
YTDLP_TIMEOUT_MS=120000
REMOTE_FETCH_TIMEOUT_MS=15000
VITE_API_URL=http://localhost:5000Notes:
PORTandCLIENT_ORIGINare used by the backend.RATE_LIMIT_WINDOW_MSandRATE_LIMIT_MAXcontrol API rate limiting.YTDLP_TIMEOUT_MSandREMOTE_FETCH_TIMEOUT_MScontrol network/process timeouts.VITE_API_URLis used by the frontend and should be set inclient/.envif needed.
Base URL: http://localhost:5000
Returns available MP4 qualities for a YouTube URL in Medba Downloader.
Request body:
{
"url": "https://www.youtube.com/watch?v=VIDEO_ID"
}Response:
{
"title": "Video Title",
"formats": [
{
"formatId": "137",
"quality": "1080p",
"hasAudio": false
}
]
}Downloads MP4 file.
Query params:
url(required): YouTube URLformatId(required): format id from/api/formatshasAudio(required):trueorfalse(controls direct format vs merge with best audio)title(optional): preferred output filename base
Downloads MP3 file.
Query params:
url(required): YouTube URLtitle(optional): preferred output filename base
Downloads best available thumbnail.
Query params:
url(required): YouTube URLtitle(optional): preferred output filename base
- YouTube URL validation on backend routes for safer YouTube Downloader requests
yt-dlpinvoked withspawnfor safer process handling- Request size limit + API rate limiting are enabled server-side
- Security headers are enabled (
X-Frame-Options,nosniff,Referrer-Policy, etc.) - Downloads are streamed directly to browser
- Temporary files are auto-deleted after stream finish/close
Content-Dispositionuses UTF-8 safe filename handling
- Do not commit real
.envfiles, API keys, tokens, cookies, or personal data. - Keep only
.env.examplein GitHub. server/tmpis excluded from Git and should never contain committed media.- Before pushing, run:
git statusand verify no sensitive files are staged.
This tool is for personal/authorized use only. Users are responsible for complying with YouTube Terms of Service and applicable copyright laws. Medba Downloader is an independent open-source project and is not affiliated with YouTube or Google.




