Files
songs2vid/README.md
T

1.3 KiB

s2yt

Create YouTube videos from an image and audio files.

Stack

  • Next.js 15 (App Router, TypeScript, Tailwind)
  • PostgreSQL + Prisma
  • Redis + BullMQ
  • NextAuth (Google OAuth with YouTube scopes)
  • FFmpeg for video encoding
  • YouTube Data API v3

Setup

  1. Copy environment variables:
cp .env.example .env
  1. Start PostgreSQL and Redis:
docker compose up -d
  1. Install dependencies and run migrations:
npm install
npm run db:push
  1. Configure Google OAuth in Google Cloud Console:

    • Enable YouTube Data API v3
    • Create OAuth 2.0 credentials
    • Add redirect URI: http://localhost:3000/api/auth/callback/google
    • Set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET in .env
  2. Install FFmpeg on your system (required for the worker).

  3. Start the web app and worker in separate terminals:

npm run dev
npm run worker

Free Plan

  • 14 videos/month (each audio = 1 video)
  • Max 720p resolution
  • 30 MB max per file
  • Watermark required
  • Per-video metadata (title auto-filled from audio filename)

Scripts

  • npm run dev — Next.js dev server
  • npm run worker — Background job processor
  • npm run db:push — Push Prisma schema to database
  • npm run build — Production build