Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

50 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Reelo - YouTube to MP3/MP4 Converter

Reelo is a fast, secure, and private YouTube downloader that allows you to download YouTube shorts, videos & Instagram Reels and convert them to MP3 or MP4. With a clean and simple interface, Reelo makes it easy to save your favorite videos for offline viewing.

Reelo License

✨ Features

  • 🎡 Multiple Formats: Download as MP3 or MP4 (360p/720p/1080p)
  • ⚑ Lightning Fast: Optimized conversion using yt-dlp and ffmpeg
  • 🎨 Modern UI: Beautiful, responsive design with smooth animations
  • πŸ“Š Progress Tracking: Real-time conversion status updates
  • πŸ”’ Secure: Automatic file cleanup, rate limiting, and CORS protection
  • πŸ“± Mobile Friendly: Fully responsive design for all devices
  • 🎬 Video Preview: See thumbnail, title, and duration before converting

πŸ“ Project Structure

YT-Downloader/
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ index.html              # Main landing page
β”‚   └── static/
β”‚       β”œβ”€β”€ css/
β”‚       β”‚   └── style.css       # Styles with glassmorphism
β”‚       └── js/
β”‚           └── app.js          # Frontend logic
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ main.py                 # FastAPI application
β”‚   β”œβ”€β”€ requirements.txt        # Python dependencies
β”‚   β”œβ”€β”€ .env.example            # Environment variables template
β”‚   └── app/
β”‚       β”œβ”€β”€ __init__.py
β”‚       β”œβ”€β”€ models.py           # Pydantic models
β”‚       β”œβ”€β”€ routes.py           # API endpoints
β”‚       β”œβ”€β”€ converter.py        # yt-dlp integration
β”‚       └── cleanup.py          # File cleanup service
β”œβ”€β”€ deployment/
β”‚   β”œβ”€β”€ ytconverter.service     # systemd service
β”‚   └── nginx.conf              # Nginx configuration
└── README.md

πŸš€ Quick Start

Prerequisites

  • Python 3.9+
  • ffmpeg
  • yt-dlp

Installation

  1. Clone the repository

    git clone <repository-url>
    cd YT-Downloader
  2. Install system dependencies

    Ubuntu/Debian:

    sudo apt update
    sudo apt install python3-pip python3-venv ffmpeg
    pip3 install yt-dlp

    Windows:

  3. Set up Python virtual environment

    cd backend
    python -m venv venv
    
    # Windows
    venv\Scripts\activate
    
    # Linux/Mac
    source venv/bin/activate
  4. Install Python dependencies

    pip install -r requirements.txt
  5. Configure environment

    cp .env.example .env
    # Edit .env with your settings
  6. Run the development server

    python main.py
  7. Open in browser

    • Navigate to http://localhost:8000
    • The frontend will be served automatically

πŸ”§ Configuration

Edit .env file to customize settings:

# CORS Settings
ALLOWED_ORIGINS=http://localhost:3000,http://localhost:8000

# Rate Limiting
RATE_LIMIT=10/minute

# File Management
DOWNLOAD_DIR=./downloads
FILE_RETENTION_HOURS=1
CLEANUP_INTERVAL_MINUTES=30

# Server Settings
HOST=0.0.0.0
PORT=8000

🌐 Production Deployment

1. Set up the server

# Create application directory
sudo mkdir -p /var/www/yt-converter
sudo chown -R $USER:$USER /var/www/yt-converter

# Copy files
cp -r frontend /var/www/yt-converter/
cp -r backend /var/www/yt-converter/

# Set up virtual environment
cd /var/www/yt-converter/backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

2. Configure systemd service

# Copy service file
sudo cp deployment/ytconverter.service /etc/systemd/system/

# Edit the service file to match your paths
sudo nano /etc/systemd/system/ytconverter.service

# Enable and start service
sudo systemctl daemon-reload
sudo systemctl enable ytconverter
sudo systemctl start ytconverter

# Check status
sudo systemctl status ytconverter

3. Configure Nginx

# Install Nginx
sudo apt install nginx

# Copy configuration
sudo cp deployment/nginx.conf /etc/nginx/sites-available/ytconverter

# Update domain name in the config
sudo nano /etc/nginx/sites-available/ytconverter

# Enable site
sudo ln -s /etc/nginx/sites-available/ytconverter /etc/nginx/sites-enabled/

# Test configuration
sudo nginx -t

# Reload Nginx
sudo systemctl reload nginx

4. Set up SSL with Let's Encrypt

# Install Certbot
sudo apt install certbot python3-certbot-nginx

# Obtain certificate
sudo certbot --nginx -d your-domain.com -d www.your-domain.com

# Auto-renewal is set up automatically

πŸ”’ Security Hardening

  1. Firewall Configuration

    sudo ufw allow 80/tcp
    sudo ufw allow 443/tcp
    sudo ufw enable
  2. Rate Limiting

    • Application-level: 10 requests/minute (configurable in .env)
    • Nginx-level: Additional rate limiting in nginx.conf
  3. CORS Protection

    • Configure ALLOWED_ORIGINS in .env
    • Only allow trusted domains
  4. File Cleanup

    • Automatic deletion after 1 hour (configurable)
    • Runs every 30 minutes
  5. User Permissions

    • Run service as www-data user
    • Restrict file permissions

πŸ“Š API Documentation

Once running, visit http://localhost:8000/docs for interactive API documentation.

Endpoints

  • GET /api/info?url={youtube_url} - Get video metadata
  • POST /api/convert - Start conversion
  • GET /api/status/{job_id} - Check conversion status
  • GET /api/download/{job_id} - Download converted file
  • GET /health - Health check

πŸ› οΈ Development

Running in development mode

cd backend
python main.py

The server will run with auto-reload enabled.

Logs

# View application logs
sudo journalctl -u ytconverter -f

# View Nginx logs
sudo tail -f /var/log/nginx/ytconverter_access.log
sudo tail -f /var/log/nginx/ytconverter_error.log

πŸ› Troubleshooting

"yt-dlp not found"

pip install --upgrade yt-dlp

"ffmpeg not found"

# Ubuntu/Debian
sudo apt install ffmpeg

# Windows
# Download from https://ffmpeg.org/download.html

"Permission denied" errors

sudo chown -R www-data:www-data /var/www/yt-converter
sudo chmod -R 755 /var/www/yt-converter

Backend not starting

# Check logs
sudo journalctl -u ytconverter -n 50

# Verify Python dependencies
cd /var/www/yt-converter/backend
source venv/bin/activate
pip install -r requirements.txt

πŸ“ License

This project is for educational purposes only. Respect YouTube's Terms of Service and only download videos you have permission to download.

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

⚠️ Disclaimer

This tool is for personal use only. Users are responsible for complying with YouTube's Terms of Service and copyright laws. The developers assume no liability for misuse of this software.

πŸ“§ Support

For issues and questions, please open an issue on GitHub.


Made with ❀️ for the community

About

Website for downloading Youtube Videos/Shorts & Instagram Reels.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages