Skip to content

Latest commit

ย 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

DOCs Media Engine โ€” Live Broadcasting & Guest Management Platform

License: MIT LiveKit Django Next.js PostgreSQL Redis

The all-in-one production studio for live streaming.

WebRTC PWA MediaSite Full Logo

Main Logo Image for ITG with DOC Media App. Which runs as a full PWA App, and works on all mobile devices.

Check out the live PWA Media App here! (https://donoconnor.com)

What is MediaSite?

MediaSite is a complete live broadcasting platform. Host a show, bring in remote guests via their browser (no installs), manage a guest queue, push your stream to YouTube / Facebook / TikTok simultaneously โ€” all from one central Dashboard. Viewers can watch live on the Broadcast Page. Built for podcasters, sports shows, radio hosts, and content creators.

See it in action

Demo video coming soon โ€” we'll show a full broadcast from guest join to multi-platform simulcast.


โœจ Highlights

๐ŸŽ™๏ธ Host & Guest Broadcasting ๐Ÿ“ก Multi-Platform Simulcast ๐Ÿ“… Show Calendar & Blog
Host uses OBS Studio (or any tool with a browser source) to capture the composed stream Push to YouTube, Facebook, and TikTok all at once Schedule shows, assign guests, publish episodes
Guests join via browser on desktop or mobile โ€” no software install needed (full PWA) Per-platform RTMP with auto-reconnect Built-in blog with categories, comments, featured posts
Director-controlled guest queue + auto picture-in-picture Stream health monitoring Public archive of past shows
๐Ÿ‘ค Roles & Profiles ๐Ÿค– AI Assistant ๐Ÿ”’ Security
host ยท guest ยท athlete ยท staff ยท admin Avatar agent greets & preps guests before air COPPA age gate & parental consent
Bio, photos, social links, sport stats Site-wide FAQ chatbot with conversation memory Turnstile CAPTCHA, email verification
Optional Sports Module โ€” drills, measurables, leaderboards Powered by Ollama + local LLMs JWT auth, rate limiting, admin IP whitelist

๐Ÿ—๏ธ How it works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚    User      โ”‚     โ”‚               Your Server                     โ”‚
โ”‚              โ”‚     โ”‚                                               โ”‚
โ”‚  Browser โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ–ถโ”‚  Nginx (443)                                 โ”‚
โ”‚  (Viewer)    โ”‚     โ”‚    โ”‚                                          โ”‚
โ”‚              โ”‚     โ”‚    โ”œโ”€โ”€โ–ถ Next.js (3000)  โ€” Frontend UI         โ”‚
โ”‚  OBS Studioโ”€โ”€โ”ผโ”€โ”€โ”  โ”‚    โ”œโ”€โ”€โ–ถ Django  (8000)  โ€” REST API           โ”‚
โ”‚  (Host)      โ”‚  โ”‚  โ”‚    โ”œโ”€โ”€โ–ถ Daphne  (8001)  โ€” WebSockets         โ”‚
โ”‚              โ”‚  โ”‚  โ”‚    โ”‚                                          โ”‚
โ”‚  Guest โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”ค  โ”‚  โ”Œโ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”‚
โ”‚  Browser     โ”‚  โ”‚  โ”‚  โ”‚  LiveKit Server ยท Egress ยท Ingress  โ”‚      โ”‚
โ”‚  (WHIP)      โ”‚  โ””โ”€โ–ถโ”‚  โ”‚  (Docker, host networking)          โ”‚      โ”‚
โ”‚              โ”‚     โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ”‚
โ”‚              โ”‚     โ”‚                                               โ”‚
โ”‚              โ”‚     โ”‚  PostgreSQL (5432)  ยท  Redis (6379)           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                               โ”‚
                               โ–ผ
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚   YouTube  ยท  Facebook  ยท TikTok โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐ŸŽฌ How Broadcasting Works

The Host (Two Ways to Broadcast)

MediaSite gives the host two ways to get video/audio into the stream:

Method 1 โ€” OBS Virtual Camera (simplest):

  1. Open the Studio Control page at /studio/Broadcast_Studio_A1
  2. Select OBS Virtual Camera as your video source and VB-Audio Cable as your audio
  3. Click "Start Broadcast" โ€” your camera and mic are streamed directly to the room via WebRTC
  4. No browser source or WHIP configuration needed โ€” just your OBS virtual devices

Method 2 โ€” OBS Browser Source (for composed overlays): The host uses OBS Studio (or any streaming tool that supports a browser source โ€” Streamlabs, vMix, etc.). In OBS, add a Browser Source pointing at:

/studio/obs-source?room=Broadcast_Studio_A1

This URL displays the live composed view โ€” host video, guest video, lower-thirds, and overlays โ€” all auto-arranged by MediaSite. The host then streams this browser source out to YouTube, Facebook, TikTok, or wherever they want. Choose this method when you need OBS overlays, scenes, and multi-source composition.

๐Ÿ’ก Default room name: The room Broadcast_Studio_A1 is the default. You can create additional rooms for individual guests, but having a known room name makes it easy to reuse the same OBS browser source URL across shows.

The Guests (Just a Browser โ€” Desktop or Mobile)

Guests join through a simple link โ€” no downloads, no OBS, no software install. They click the guest link, allow camera & mic, and appear in the host's composed view automatically. MediaSite handles the WebRTC connection via LiveKit.

MediaSite is a full Progressive Web App (PWA) โ€” guests can join from their phone, tablet, or desktop. All they need is a good internet signal and headphones or earbuds to prevent audio feedback. The app can be installed to their home screen for quick access.

Method 3 โ€” WHIP Ingress (pro-quality, separate video feed): OBS can push a dedicated video feed directly to LiveKit via WHIP. Use the Streaming Admin panel to generate a WHIP URL, then add it as a custom RTMP/WHIP output in OBS. This gives you a clean, high-quality feed separate from Virtual Camera.


The Dashboard & Broadcast Page

After logging in, the Dashboard is your home base โ€” manage shows, access the Director Control panel, generate guest links, and configure streaming. Viewers watch live on the Broadcast Page at /broadcast, which shows the composed stream in real time.

The Director

From the Director Control Panel, you manage the guest queue โ€” mute/unmute, kick, rearrange, and control when guests appear on air. Multi-platform simulcast (YouTube + Facebook + TikTok) is managed from the same dashboard.

Django Admin (Super-User Backend)

The Django Admin panel is the true super-user backend โ€” add, edit, and manage every model, user, and setting in the database. Most day-to-day management happens through the frontend dashboard, but the admin panel is available for full control when needed.

โš ๏ธ Change the admin URL โ€” by default it's at /admin/. Set ADMIN_URL=your-custom-path in your .env to hide it from bots and unauthorized visitors. The IP whitelist (ADMIN_IP_WHITELIST) adds an extra layer of protection.

After deploying, run collectstatic to serve the admin CSS:

python manage.py collectstatic --noinput

๐Ÿš€ Quick Start

Prerequisites

Tool Version Why
Python 3.11+ Django backend
Node.js 20+ Next.js frontend
PostgreSQL 14+ Database
Redis 7+ WebSocket channels & caching
Docker Compose 2.x+ LiveKit + optional full-stack dev

Option A: One-Command Docker Dev Stack (Easiest)

Everything runs in containers โ€” Postgres, Redis, Django, Next.js, Nginx:

git clone https://github.com/docisit/itg-media-engine.git
cd itg-media-engine
docker compose -f docker-compose.dev.yml up --build

Open http://localhost:3000 โ€” you're live!

โš ๏ธ LiveKit is not included in the dev stack. For WebRTC features (guest video/audio), set up LiveKit separately with docker compose -f docker-compose.yaml up.

Option B: Manual Setup (PM2 / Bare Metal)

For production deployments or if you prefer running services directly on your server:

git clone https://github.com/docisit/itg-media-engine.git
cd itg-media-engine

# Backend
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env   # Edit with your settings
python manage.py migrate
python manage.py createsuperuser

# Frontend
cd frontend
npm install
cp .env.example .env.local   # Edit with your settings
npm run build

# Start with PM2 (see SETUP.md for full ecosystem.config.js example)
pm2 start ecosystem.config.js
pm2 save

See SETUP.md for the complete bare-metal guide including Nginx, SSL, and LiveKit configuration.


๐Ÿ“‚ Project Structure

itg-media-engine/
โ”œโ”€โ”€ backend/                   # Django REST API
โ”‚   โ”œโ”€โ”€ backend/               #   Settings, URLs, middleware, throttles
โ”‚   โ””โ”€โ”€ members/               #   Models, views, serializers, AI consumers
โ”œโ”€โ”€ frontend/                  # Next.js 16 (App Router)
โ”‚   โ””โ”€โ”€ src/                   #   Pages, components, API routes, hooks
โ”œโ”€โ”€ agents/                    # LiveKit AI agents (avatar + voice pipeline)
โ”œโ”€โ”€ docker/                    # Nginx Dockerfile + configs (prod + dev)
โ”œโ”€โ”€ docs/                      # Feature flags & additional docs
โ”œโ”€โ”€ docker-compose.yml         # Production Docker stack
โ”œโ”€โ”€ docker-compose.dev.yml     # One-command development stack
โ”œโ”€โ”€ docker-compose.yaml        # LiveKit Server + Egress + Ingress
โ”œโ”€โ”€ Dockerfile.django          # Multi-stage Django build
โ”œโ”€โ”€ Dockerfile.nextjs          # Multi-stage Next.js build
โ””โ”€โ”€ SETUP.md                   # Manual bare-metal deployment guide

๐Ÿณ Deployment Options

Option Best For Guide
Docker Dev (docker-compose.dev.yml) Local dev, trying it out docker compose -f docker-compose.dev.yml up --build
Docker Prod (docker-compose.yml) Containerized production Requires .env.docker with prod secrets
PM2 Bare Metal Production on VPS / dedicated server See SETUP.md
LiveKit (docker-compose.yaml) WebRTC infrastructure Always needed for guest video/audio

โš™๏ธ Environment Variables

Copy .env.example to .env and fill in your values:

Variable Required Description
SECRET_KEY โœ… Django secret key โ€” generate with python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"
DATABASE_URL โœ… PostgreSQL connection string
REDIS_URL โœ… Redis connection (e.g., redis://127.0.0.1:6379/0)
LIVEKIT_API_KEY โœ… LiveKit API key
LIVEKIT_API_SECRET โœ… LiveKit API secret
LIVEKIT_URL โœ… WebSocket URL (e.g., wss://vdo.yourdomain.com)
ALLOWED_HOSTS โœ… Your domain + localhost
FRONTEND_URL โœ… Frontend URL for CORS & email links
TURNSTILE_SITE_KEY โ€” Cloudflare Turnstile CAPTCHA key
TURNSTILE_SECRET_KEY โ€” Cloudflare Turnstile secret
SPORTS_MODULE_ENABLED โ€” Set True to enable athlete profiles, drills, leaderboards

๐Ÿ“ License & Usage

MediaSite is MIT licensed โ€” you're free to use, modify, and run it for personal or commercial projects.

We ask two things:

  1. Keep the Don O'Connor logo & copyright notice on the site. The branding in the footer, favicon, and any "Powered by" text should remain intact. This is how we get credit for the platform.

  2. Give credit to the open-source projects that make this possible (see Acknowledgments below).


๐Ÿ™ Built On Giants

MediaSite wouldn't exist without these incredible open-source projects:

Project Used For
LiveKit WebRTC signaling, ingress, egress โ€” the backbone of all real-time video/audio
Django & Django REST Framework Backend API, ORM, authentication
Next.js React framework, SSR, API routes
PostgreSQL Reliable, production-grade database
Redis WebSocket channel layers, caching, session store
OBS Studio Broadcast software (WHIP/WebRTC output)
Ollama Local LLM inference for AI agents
Nginx Reverse proxy, SSL termination, RTMP module
Docker Containerization
Cloudflare Turnstile Privacy-friendly CAPTCHA
FFmpeg Video composition & RTMP encoding

๐Ÿค Contributing

We welcome contributions! Here's how:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please keep the copyright logo and attribution intact.


๐Ÿ“ฌ Support


Look at how it works, with screenshots while in use

## ๐Ÿ“š Wiki Pages
Page Description
๐Ÿ“ฆ Installation Prerequisites, Docker dev stack, bare-metal setup
โš™๏ธ Configuration Environment variables, .env setup, feature flags
๐ŸŒ LiveKit Setup WebRTC infrastructure โ€” Cloud vs. self-hosted
๐ŸŽฌ Broadcasting Guide Host setup, guest joining, studio page, broadcast page
๐ŸŽฎ Director Control Guest queue, mute/unmute, multi-platform simulcast
๐Ÿ‘ค User Roles & Profiles Roles, registration, COPPA age gate
๐Ÿ… Sports Module Athlete stats, drills, leaderboards
๐Ÿค– AI Assistant Avatar agent, FAQ chatbot, Ollama setup
๐Ÿ”ง Admin Panel Django admin, model management, IP whitelist
๐Ÿš€ Deployment Production Nginx + SSL, Docker stack, PM2 ecosystem
โ“ Troubleshooting & FAQ Common issues, WebRTC debugging, FAQs

Built with โค๏ธ for content creators everywhere. ยฉ Don O'Connor โ€” keep the logo, share the code.

About

livekit, webrtc, django, nextjs, daphne, asgi, websockets, pm2, nginx-proxy, ollama, ai-agent, broadcasting, simulcast, push-to-talk, sports-analytics

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages