project/ │ ├── app.py # Python backend (Flask or FastAPI) ├── templates/ │ └── index.html # Web page ├── static/ │ ├── style.css # CSS │ └── script.js # JavaScript └── downloads/
Features Paste a video URL. Choose video or audio download. Select quality. Display download progress. Show status/errors. Automatically save downloads. Tip: use VLC Media for viewing mp3 into video
A hybrid Python + HTML/CSS/JavaScript web application using Flask and yt-dlp to download video or audio through a browser interface.
use python from terminal after the setup_ytdlp_webapp.py, Ytdlp.py
then go to same folder you will see a run.bat file enjoy👌
- Browser-based interface
- Video downloads using yt-dlp
- Audio-only MP3 extraction
- Real-time download progress
- Simple HTML/CSS frontend
- Python Flask backend
- FFmpeg support
Install Python 3.10 or newer.
Check installation:
python --versionRecommended versions:
- Python 3.11
- Python 3.12
Check pip:
pip --versionFFmpeg is required for:
- Audio conversion
- MP3 extraction
- Video/audio merging
Check:
ffmpeg -version- Download FFmpeg.
- Extract the archive.
- Add the
binfolder to your system PATH. - Restart the terminal.
sudo apt update
sudo apt install ffmpegbrew install ffmpegYTDownloader/
│
├── app.py
├── requirements.txt
│
├── templates/
│ └── index.html
│
├── static/
│ ├── style.css
│ └── script.js
│
├── downloads/
│
└── README.md
mkdir YTDownloader
cd YTDownloaderpython -m venv venv
venv\Scripts\activatepython3 -m venv venv
source venv/bin/activateCreate a file named:
requirements.txt
Add:
Flask>=3.0.0
yt-dlp>=2026.01.01Install:
pip install -r requirements.txtCreate:
app.py
Add the Flask backend code.
Create:
templates/index.html
Add the HTML interface.
Create:
static/style.css
Add CSS styling.
Create:
static/script.js
Add frontend JavaScript.
Start Flask:
python app.pyYou should see:
Running on http://127.0.0.1:5000
Open your browser:
http://127.0.0.1:5000
yt-dlp updates frequently.
Update:
pip install -U yt-dlpExample:
ModuleNotFoundError: No module named 'flask'
Fix:
pip install flask yt-dlpError:
ffmpeg not found
Fix:
- Install FFmpeg.
- Add FFmpeg to PATH.
- Restart terminal.
Try updating yt-dlp:
pip install --upgrade yt-dlpSome websites change their systems frequently, so older versions may stop working.
- Only download content you are allowed to access.
- Respect website terms of service.
- Do not use this application to bypass access restrictions.
- Keep downloaded files in a controlled directory.
Future upgrades:
- Quality selector
- Playlist downloads
- Download history
- User authentication
- Mobile responsive UI
- Dark/light mode
- WebSocket live progress
- Multiple download queue
- Subtitle support
- Thumbnail downloader
- Docker deployment
or run this script: python setup_ytdlp_webapp.py
