Registry Mirror
Skip to content

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 (48–320 kbps), MP4 (360p–4K), or Image (PNG/JPG/JPEG)
  • ✂️ Interactive Trimming: Drag timeline handles or enter MM:SS timestamps to clip audio & video
  • 💻 Windows Desktop App (desktop/): Tauri 2 + React + Rust app that downloads and converts directly on your PC with zero server dependency
  • 🧩 Hybrid Browser Extension (extension/): Auto-routes to the local Desktop App when running, falls back to direct in-browser download, or sends links to your remote Reelo server
  • 🔄 Auto-Update & Alerts: Automatically updates for users who opt in, and notifies users on older versions when a new GitHub Release ships
  • ⚡ Lightning Fast: Optimized conversion using yt-dlp and ffmpeg
  • 🎨 Modern UI: Dark & Light themes across Web, Desktop, and Extension (documented in DESIGN.md)
  • 🔒 Secure: Automatic file cleanup, rate limiting, and CORS protection on the web server

📁 Project Structure

Reelo/
├── frontend/                   # Web UI & PWA
├── backend/                    # FastAPI server (yt-dlp + ffmpeg)
├── desktop/                    # Windows Desktop App (Tauri 2 + React + TypeScript + Rust)
├── extension/                  # Hybrid Chrome/Edge Manifest V3 Browser Extension
├── deployment/                 # systemd + Nginx configs
├── .github/workflows/          # CI & automated GitHub Release workflow (release.yml)
├── .dockerignore               # Excludes desktop/, extension/, docs from Docker builds
├── docker-compose.yml
├── DESIGN.md                   # Cross-surface design system
├── AGENTS.md                   # Architecture & contributor/agent guide
└── 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

# Concurrency / Resource Limits (shared-server safe defaults)
# MAX_WORKERS: concurrent yt-dlp/ffmpeg jobs
#   2 = safe for a 16 GB server with other containers running
#   Raise to 3-4 only if you have >= 4 GB free RAM
MAX_WORKERS=2

# FFMPEG_THREADS: CPU threads ffmpeg uses per conversion
#   2 = polite on a shared host
#   0 = let ffmpeg decide (may use ALL cores -- avoid on shared hosts)
FFMPEG_THREADS=2

🌐 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

📈 Performance Monitoring

Every completed job exposes timing metrics via GET /api/status/{job_id}:

Field Description
download_time Seconds spent downloading (yt-dlp network phase)
processing_time Seconds spent in ffmpeg post-processing
total_time Wall-clock seconds from job start to finish
file_size_bytes Output file size in bytes

Quick benchmark:

JOB=$(curl -s -X POST http://localhost:7654/api/convert \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://youtu.be/dQw4w9WgXcQ","format":"mp3-128"}' | jq -r .job_id)

until curl -s http://localhost:7654/api/status/$JOB | jq -r .status | grep -q completed; do sleep 2; done

curl -s http://localhost:7654/api/status/$JOB | jq '{download_time, processing_time, total_time, file_size_bytes}'

Interpreting results:

  • download_time >> processing_time — bottleneck is network bandwidth
  • processing_time >> download_time — bottleneck is ffmpeg (consider raising FFMPEG_THREADS)
  • total_time much larger than both — queue backlog (consider raising MAX_WORKERS)

All metrics are also logged at INFO level:

🛠️ 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

💻 Windows Desktop App (desktop/)

Built with Tauri 2 + React + TypeScript + Rust + yt-dlp + FFmpeg. Downloads and converts locally on the user's PC without connecting to a conversion server, and exposes a local bridge (http://127.0.0.1:47654) for the browser extension.

Running locally in development

  1. Prerequisites: Node.js 20+, Rust (rustup), Visual Studio 2022 C++ Build Tools, WebView2 (pre-installed on Windows 10/11).
  2. Install dependencies & run:
    cd desktop
    npm install
    npx tauri dev
  3. Tools (yt-dlp & ffmpeg):
    • The app automatically checks %LOCALAPPDATA%\Reelo\bin\, bundled bin/ resources, and your system PATH.
    • If yt-dlp or ffmpeg are missing, click "Install Missing Tools" in the banner or Settings -> Local Engine Tools to download them in one click.

Building a local Windows installer

cd desktop
npm run build
npx tauri build --config '{"bundle":{"createUpdaterArtifacts":false}}'

🧩 Browser Extension (extension/)

A Manifest V3 extension for Chrome, Edge, and Brave supporting:

  • Auto (Hybrid): Automatically uses the local Windows Desktop App if it is running (http://127.0.0.1:47654), or falls back to direct in-browser download when a progressive stream/image is detected, or uses your Reelo Server.
  • Desktop: Forces local conversion on your PC via Reelo Desktop App (supports all formats & trimming).
  • Browser: Direct in-browser download via chrome.downloads for direct video/image streams.
  • Server: Paste any link or send the active tab URL to your configured Reelo Server URL.

Loading the extension locally

  1. Open chrome://extensions (or edge://extensions).
  2. Enable Developer mode.
  3. Click Load unpacked and select the extension/ folder.

🚀 Releasing Desktop App & Extension (GitHub Releases & Auto-Updates)

.github/workflows/release.yml automatically builds the Windows Desktop installers (.exe NSIS + .msi with yt-dlp.exe, ffmpeg.exe, ffprobe.exe, and deno.exe bundled), packages reelo-extension-v<version>.zip + updates.xml, and publishes them to GitHub Releases.

Docker Note: .dockerignore excludes desktop/, extension/, DESIGN.md, AGENTS.md, and build artifacts so server Docker deployments remain clean and unaffected.

1. One-time setup: Tauri Updater Signing Keys (for silent Desktop auto-updates)

Generate a signing keypair outside the repository:

cd desktop
npx tauri signer generate -w "$env:USERPROFILE\.tauri\reelo.key"
  1. Copy the printed public key into GitHub Repository Secrets as TAURI_UPDATER_PUBKEY (and optionally paste it into desktop/src-tauri/tauri.conf.json -> plugins.updater.pubkey).
  2. Copy the contents of %USERPROFILE%\.tauri\reelo.key into GitHub Repository Secrets as TAURI_SIGNING_PRIVATE_KEY.
  3. If you entered a password, also save it as TAURI_SIGNING_PRIVATE_KEY_PASSWORD.

(If TAURI_SIGNING_PRIVATE_KEY is not set yet, the release workflow still builds and publishes unsigned .exe/.msi installers, and existing users still get "New update available" alerts with a download link.)

2. Publish a new release

Ensure everything is merged and tested on main, then push a semver tag (v*):

git checkout main
git pull origin main
git tag v1.0.1
git push origin v1.0.1

Or trigger Actions -> Release Desktop & Extension -> Run workflow from GitHub and enter the tag (e.g. v1.0.1).

3. How updates work for users

  • Desktop App:
    • Checks GitHub Releases on startup and via Settings -> Check.
    • Automatic Updates ON (default): Downloads the signed update from latest.json, installs it, and restarts Reelo automatically.
    • Automatic Updates OFF: Displays a "New update available (vX.Y.Z)" banner with an Update Now / Download Release button.
  • Browser Extension:
    • Checks GitHub Releases every 6 hours (and via chrome.runtime.onUpdateAvailable for CRX/Store installs).
    • Allow Automatic Updates ON (default): Automatically reloads CRX/Store updates, or downloads the new reelo-extension-vX.Y.Z.zip once per version for unpacked/sideloaded installs.
    • Allow Automatic Updates OFF: Shows a NEW badge on the toolbar icon and a "New update available (vX.Y.Z)" banner inside the popup.

🐛 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

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages