AI-powered post-game highlight editor. Upload raw game footage, get a music-synced highlight reel back automatically — with optional timeline tweaks.
See docs/PRD.md for the full product/technical spec, and docs/DEVPOST.md for the Devpost writeup.
- Multimodal highlight detection (audio energy + visual motion)
- Target reel length: 30 / 60 / 90 seconds
- Soundtrack picker with original-audio + music mix
- Timeline editor: keep/drop clips, reorder, ±2s nudge, re-render
- Hosted demo: frontend on Vercel, API on Railway
hack_united/
├── backend/ FastAPI service (analysis + rendering)
│ ├── app/
│ │ ├── api/routes/ upload, status, result, rerender, music
│ │ ├── core/ config, job manager, pipeline options
│ │ ├── models/ Pydantic schemas
│ │ ├── services/ audio, motion, fusion, composer, pipeline
│ │ └── storage/ local per-job filesystem storage
│ ├── assets/music/ Royalty-free soundtrack library
│ ├── tests/
│ ├── Dockerfile
│ └── requirements.txt
├── frontend/ Next.js (App Router) + Tailwind
│ └── src/
│ ├── app/ pages + global styles
│ ├── components/ upload, processing, result, timeline, strands
│ └── lib/ API client, types, job hook
├── docs/PRD.md
└── README.md
The frontend deploys on Vercel (Next.js is a first-class fit). The backend runs the media pipeline (ffmpeg, librosa), which needs a persistent process and system binaries — so it deploys separately (Railway) and the frontend talks to it via NEXT_PUBLIC_API_URL.
cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# ffmpeg must be installed and on PATH
brew install ffmpeg # macOS
cp .env.example .env
uvicorn app.main:app --reload --port 8000Run tests:
pytest -qKey modules:
app/services/audio_analysis.py— audio excitement curve (librosa)app/services/motion_analysis.py— visual motion via ffmpeg frame streamapp/services/fusion.py— combines signals, selects highlight clipsapp/services/composer.py— ffmpeg cut/concat + music mixapp/services/media_utils.py— shared ffprobe helpersapp/services/music_catalog.py— soundtrack library (title → file)app/services/pipeline.py— orchestrates stages + timeline re-renderapp/api/routes/jobs.py— upload / status / result / rerenderapp/api/routes/music.py— list available soundtracks
cd frontend
npm install
cp .env.local.example .env.local # points NEXT_PUBLIC_API_URL at localhost:8000
npm run devTracks live in backend/assets/music/. The upload UI lets users pick a song by title; the renderer mixes that track with the original game audio (original ducked under music). To add a track: drop an mp3 into assets/music/ and add an entry in app/services/music_catalog.py.
| Method | Path | Purpose |
|---|---|---|
POST |
/api/upload |
Upload video (+ optional music_track_id, target_duration_seconds) |
GET |
/api/status/{job_id} |
Poll pipeline stage / progress |
GET |
/api/result/{job_id} |
Preview URL + clip list |
POST |
/api/jobs/{job_id}/rerender |
Re-render from edited clips |
GET |
/api/music |
Soundtrack catalog |
GET |
/health |
Health check |
- Frontend (Vercel): set root directory to
frontend. SetNEXT_PUBLIC_API_URLto the Railway API URL. - Backend (Railway): deploy from
backend/using the Dockerfile. Set:CLIPCOACH_CORS_ORIGINSto your Vercel domain(s)- optionally
CLIPCOACH_MAX_RENDER_HEIGHT=480on low-RAM plans