Character-Aware Continuity Companion for Video Production
CastThread automatically tracks recurring characters across video scenes, builds relationship graphs, and flags continuity issues — helping editors and creators stay focused on storytelling.
- Backend: Vanilla PHP (no framework)
- Frontend: Bootstrap 5.3, jQuery 3.7, Font Awesome 6
- Database: MySQL 8+ (InnoDB)
- Video AI: Replicate API (Apollo-7B model)
- Graph Visualization: vis-network
- Font: Google Fonts — Outfit
Import the schema into MySQL:
mysql -u root -p < schema.sqlEdit config.php and set:
DB_HOST,DB_NAME,DB_USER,DB_PASS— your MySQL credentialsREPLICATE_API_TOKEN— your Replicate API key (get one at https://replicate.com)
Run with PHP's built-in server or Apache/Nginx:
php -S localhost:8000Then open http://localhost:8000 in your browser.
- PHP 8.0+
- MySQL 8.0+
- cURL extension enabled
ffmpeg/ffprobe(optional, for video metadata & thumbnails)
castthread/
├── config.php # DB connection, API keys, helpers
├── header.php # Shared HTML header & navbar
├── footer.php # Shared HTML footer & scripts
├── index.php # Dashboard
├── project_list.php # All projects
├── project_create.php # Create/edit project
├── project_view.php # Project detail (tabs: videos, characters, graph, alerts)
├── video_upload.php # Video upload with drag & drop
├── video_process.php # Video analysis (start, poll, simulate)
├── video_api.php # Replicate API integration
├── character_list.php # All characters (with inline rename)
├── character_timeline.php # Character detail & appearance timeline
├── continuity_list.php # All continuity alerts (with filters)
├── continuity_detail.php # Alert detail with scene context
├── scene_list.php # Scene list for a video
├── graph_view.php # Standalone relationship graph
├── style.css # Custom styles
├── app.js # jQuery interactions & AJAX
├── schema.sql # MySQL database schema
├── .htaccess # Apache config (upload limits, security)
└── uploads/ # Video files, thumbnails, frames (auto-created)
- Project Management — Organize videos by production/episode
- Video Upload — Drag & drop with progress bar, auto-metadata extraction
- AI Analysis — Send videos to Apollo-7B for character detection, scene segmentation, and continuity checking
- Demo Mode — Generate simulated analysis data for testing without API key
- Character Tracking — View all detected characters, rename them, see appearance timelines
- Relationship Graph — Interactive vis-network graph of character co-occurrences
- Continuity Alerts — Flagged issues (wardrobe changes, missing characters, prop inconsistencies) with severity levels and resolution workflow
- Scene Timeline — Visual timeline bar and per-scene character roster
- Mobile-First UI — Bottom navigation bar, responsive cards, native app feel
| Role | Color | Hex |
|---|---|---|
| Primary | Navy Blue | #1B2A4A |
| Secondary | Wine Red | #722F37 |
| Background | White | #FFFFFF |