Skip to content

MmightyGame/videotolink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VideoToLink

Download videos from YouTube, Vimeo, Twitter/X, Instagram, and 1000+ sites.

Project Structure

videotolink/
├── frontend/          React + Vite frontend (deploy to Netlify)
├── backend/           Python FastAPI backend (deploy to Render)
└── netlify.toml       Netlify build config

Local Development

1. Backend

cd backend

# Create a virtual environment
python -m venv venv
source venv/bin/activate        # Windows: venv\Scripts\activate

# Install dependencies (requires Python 3.10+)
pip install -r requirements.txt

# Start the server
uvicorn main:app --reload --port 8000

Requires: ffmpeg installed and on your PATH.

The backend runs at http://localhost:8000

2. Frontend

cd frontend

# Copy env file and set API URL
cp .env.example .env
# .env already points to http://localhost:8000 — no changes needed for local dev

npm install
npm run dev

The frontend runs at http://localhost:5173


Deployment

Step 1 — Deploy the Backend on Render (free)

  1. Push this repo to GitHub.
  2. Go to https://render.comNew Web Service.
  3. Connect your GitHub repo.
  4. Set these values:
    • Root directory: backend
    • Runtime: Python 3
    • Build command: pip install -r requirements.txt
    • Start command: uvicorn main:app --host 0.0.0.0 --port $PORT
  5. Add environment variable:
    • ALLOWED_ORIGINShttps://videotolink.netlify.app (or your Netlify URL)
  6. Click Deploy. Copy the URL (e.g. https://videotolink-api.onrender.com).

Render's free tier includes FFmpeg. If it's missing on a custom plan, add a build step: apt-get install -y ffmpeg && pip install -r requirements.txt


Step 2 — Deploy the Frontend on Netlify

  1. Go to https://netlify.comAdd new site → Import an existing project.
  2. Connect your GitHub repo.
  3. Netlify auto-detects the netlify.toml — no extra config needed.
  4. Add environment variable:
    • VITE_API_URL → your Render backend URL (e.g. https://videotolink-api.onrender.com)
  5. Click Deploy site.
  6. (Optional) Claim a custom subdomain: Site settings → Domain management → Edit site name → type videotolink.

API Reference

Method Path Description
GET /health Health check
POST /api/info Fetch video title, thumbnail, duration
POST /api/download/start Start download job, returns job_id
GET /api/download/status/{job_id} Poll download progress
GET /api/download/file/{job_id} Download the finished file

Request body for /api/info and /api/download/start

{ "url": "https://www.youtube.com/watch?v=..." }

About

Download any video

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors