A FastAPI-based web application that allows users to download YouTube videos in both video and audio formats.
- Download YouTube videos in MP4 format
- Download audio in MP3 format
- Simple and clean user interface
- Fast and efficient downloads
- Python 3.8 or higher
- FFmpeg (for audio conversion)
- Clone the repository:
git clone <your-repository-url>
cd youtube_downloader
- Create a virtual environment and activate it:
python -m venv venv
# On Windows
venv\Scripts\activate
# On Linux/Mac
source venv/bin/activate
- Install the required packages:
pip install -r requirements.txt
- Install FFmpeg:
- Windows: Download from https://ffmpeg.org/download.html and add to PATH
- Linux:
sudo apt-get install ffmpeg
- Mac:
brew install ffmpeg
- Start the server:
uvicorn main:app --host 0.0.0.0 --port 8000
- Open your browser and navigate to:
http://localhost:8000
For production deployment, it's recommended to:
- Use a production-grade ASGI server like Gunicorn
- Set up a reverse proxy (like Nginx)
- Use environment variables for configuration
- Implement proper security measures
MIT License