aethex.live/STREAMING_SETUP.md

2.8 KiB

Live Streaming Setup Guide

Overview

Transform aethex.live into a fully functional live streaming platform.

🎥 Streaming Options

Option 1: OBS Studio → Streaming Service

Recommended for beginners

Services to consider:

  • Cloudflare Stream - $5/month, easy setup, global CDN
  • Mux - Pay-as-you-go, developer-friendly
  • AWS IVS - Scalable, AWS infrastructure
  • Twitch API - If you want to use Twitch as backend

Setup with Cloudflare Stream:

  1. Sign up at cloudflare.com/products/cloudflare-stream
  2. Get your Stream URL and Key
  3. Configure OBS Studio:
    • Settings → Stream
    • Service: Custom
    • Server: Your Cloudflare RTMP URL
    • Stream Key: Your key
  4. Update app/page.tsx with your HLS playback URL

Option 2: Self-Hosted (Advanced)

For full control

Requirements:

  • VPS/Server (DigitalOcean, AWS, etc.)
  • Nginx with RTMP module
  • Domain with SSL

Stack:

# Install on Ubuntu server
sudo apt update
sudo apt install nginx libnginx-mod-rtmp

See docs/SELF_HOSTED_SETUP.md for full guide.

Option 3: Multiple Stream Sources

Support streaming from:

  • OBS Studio
  • StreamLabs
  • Mobile apps
  • Pre-recorded content

💬 Real-Time Features

Chat Implementation

Option A: Firebase (Quickest)

npm install firebase

Option B: WebSocket Server

npm install socket.io

Option C: Third-party (Pusher, Ably)

Viewer Count

  • WebSocket connections
  • Analytics services
  • Real-time database

🚀 Deployment

Deploy Frontend to Vercel

npm install -g vercel
vercel

Deploy to Custom Domain

  1. Point DNS to Vercel
  2. Add domain in Vercel dashboard
  3. SSL auto-configured

Alternative Platforms:

  • Netlify - Similar to Vercel
  • Cloudflare Pages - Free tier, fast global CDN
  • AWS Amplify - If using AWS for streaming

🔐 Backend Needs

Essential APIs:

  1. Authentication - Clerk, Auth0, or NextAuth.js
  2. Database - Supabase, Firebase, or PostgreSQL
  3. Chat Storage - Real-time DB or Redis
  4. Analytics - Track views, engagement

Example Backend Stack:

Frontend: Next.js (current)
Auth: Clerk
Database: Supabase
Storage: Cloudflare R2
Streaming: Cloudflare Stream
Chat: WebSocket (socket.io)

📊 Monetization Features (Future)

  • Subscriptions (Stripe)
  • Donations/Tips
  • Private streams
  • VOD content
  • Channel memberships

🎯 Quick Start Checklist

  • Choose streaming service
  • Set up OBS Studio
  • Get HLS stream URL
  • Update streamUrl in app/page.tsx
  • Set up backend for chat
  • Add authentication
  • Deploy to Vercel
  • Configure custom domain
  • Test stream end-to-end
  • Set up analytics

🛠️ Next Steps

Run the setup wizard to configure your platform:

npm run setup:streaming

Or manually update configuration in config/streaming.ts