Who needs boring URLs when you can have your videos wrapped up in style? This project, powered by Flask and a sprinkle of magic from yt-dlp, delivers a sleek interface for downloading YouTube videos (and other supported platforms). Your downloaded treasures land right in the cozy folder ./downloads get converted into Texts. You can then push this file into blog / articles, as you want to process it ahead.
Before you dive in, make sure you have:
- Python 3.12+ (We donβt accept dinosaurs)
- pip (Because Python packages donβt install themselves)
- Docker (Optional: if you want to make your life extra smooth)
-
Grab the code like itβs hot:
git clone https://github.com/sachnaror/Youtube_Video_Downloader.git cd flask-youtube-downloader -
Set up your private Python fortress:
python3 -m venv env source env/bin/activate -
Stock up on the essentials:
pip install -r requirements.txt
-
Hit the launch button:
python run.py
-
Behold the glory: Open your browser and point it to http://localhost:5000.
-
Prepare yourself with Docker and Docker Compose installed.
-
Pull the code (yes, same as above, keep up):
git clone https://github.com/sachnaror/Youtube_Video_Downloader.git cd flask-youtube-downloader -
Let Docker do its thing:
docker compose up --build
-
And voilΓ : Open http://localhost:5000 and bask in the beauty of instant video downloads.
- Paste and Go: Simply paste your video URL, hit the button, and enjoy the magic.
- Auto-download Brilliance: No complicated clicksβyour video lands safely in
./downloads. - User-Friendly Interface: Designed for humans, not robots (though theyβll probably like it too).
- Flask: The cool uncle of Python web frameworks.
- yt-dlp: Your trusty sidekick for video fetching.
- HTML, CSS, JS: A dash of webby goodness for the front-end.
- Docker: Keeping everything tidy and portable.
βββ flask_youtube_downloader/
β βββ run.py
β βββ requirements.txt
β βββ Dockerfile
β βββ README.md
β βββ docker-compose.yml
β βββ video_to_markdown.py
β βββ screenshots/
β βββ app/
β β βββ utils.py
β β βββ routes.py
β β βββ static/
β β β βββ favicon.ico
β β β βββ scripts.js
β β β βββ style.css
β β βββ templates/
β β β βββ index.html
β β β βββ add_video.html
β βββ downloads/
β β βββ Medical Imaging with AI!.wav_chunk1.wav
β β βββ Medical Imaging with AI!.wav_chunk0.wav
β β βββ Medical Imaging with AI!.webm
β β βββ Medical Imaging with AI!.wav_chunk2.wav
β β βββ Medical Imaging with AI!.wav_chunk3.wav
β β βββ Medical Imaging with AI!.wav
β β βββ Medical Imaging with AI!.txt
Error:
python run.py
* Serving Flask app 'app'
* Debug mode: off
Address already in use
Port 5000 is in use by another program. Either identify and stop that program, or start the server with a different port.
On macOS, try disabling the 'AirPlay Receiver' service from System Preferences -> General -> AirDrop & Handoff.
Solution:
-
Identify the conflicting process: Open a terminal and run:
lsof -i :5000
This command shows you which process is using port 5000.
-
Stop the process using port 5000: Note the process ID (PID) from the previous step, then run:
kill -9 <PID>
This will free up the port so Flask can use it.
-
Choose a different port (if needed): If stopping the process isnβt possible, you can run Flask on another port:
python run.py --port 5001
-
Disable macOS services (if applicable):
If youβre on macOS, the AirPlay Receiver service might be using port 5000.
- Go to System Preferences β General β AirDrop & Handoff.
- Turn off AirPlay Receiver and retry running your Flask app.
| Name | Details |
|---|---|
| π¨βπ» Developer | Sachin Arora |
| π§ Email | schnaror@gmail.com |
| π Location | Noida, India |
| π GitHub | github.com/sachnaror |
| π Website | https://about.me/sachin-arora |
| π± WhatsApp | WhatsApp Me |
| π¦ YouTube | youtube.com/@sachnaror4841/videos |
| π΄ Twitter | twitter.com/sachinhep |
| βοΈ Medium | medium.com/@schnaror |
Need help, got feedback, or just want to say hi? Reach out to me here:
- GitHub: sachnaror
- Email: schnaror@gmail.com
Now, go forth and enjoy downloading videos with a touch of wit! π
