SceneFlow
Script-to-screen synchronization for AI filmmakers.
Sync scripts and screenplays with video. Evaluate AI-generated footage. Analyze script-to-screen fidelity.
https://github.com/user-attachments/assets/e2469136-4224-4192-affc-d19d7e403f74
đ Overview
SceneFlow is a tool that syncs scripts and screenplays with video content, letting you see which parts of your prompt appear on screen in real-time.
Built for evaluating how AI video models visualize prompt instructions, it supports both traditional Screenplay formatting and high-precision, state-driven Auteur Script formatting with 5-part staging metadata. SceneFlow helps you compare instructions against what was actually generated â essential for assessing prompt adherence and iterating on AI cinema projects.
Note on Cue Creation: SceneFlow does not automatically extract video sync cues in the background. Cues can be authored manually in the dedicated 3-Panel Edit Workstation or generated externally using multimodal AI models (such as Google Gemini). SceneFlow includes a built-in Cues JSON Editor & LLM Sync Setup with a ready-to-copy Gemini Sync Prompt and minimal JSON Schema for fast 1-click structured cue generation.
What It Does
- Script-to-Screen Tracking â Highlights which parts of your script are playing in real-time
- Dual Script Workflows â Seamlessly handles both human-readable screenplays and state-chained Auteur Scripts
- Desktop 3-Panel Studio Workstation â Integrated media preview, time-clustered cue grid, reading canvas, and draggable cue inspector
- Continuous Multi-Track Timeline â Smooth display-synchronized (VSync) timeline tracking with stationary 35% anticipation playhead
- Color-Coded Cues â 8 element types: dialogue, action, camera, shots, audio, VFX, transitions, environments
- Adherence Analysis â Pinpoint missed prompt elements, camera drift, or continuity deviations against the generated video
- LLM Sync Setup â Built-in Gemini system prompt and JSON schema generator for structured cue outputs
- Timing Controls â Micro-nudge steppers (
Âą0.1s, Âą0.5s), interactive loop previews, and adjustable per-category buffers
- Portable â JSON-based projects you can save, share, and version-control
⨠Features
Synchronization System
| Feature |
Description |
| Cue-Based Sync |
Link specific script segments to video timestamps |
| 8 Cue Types |
Dialogue, Action, Camera, Shot, Audio, VFX, Transition, Environment |
| Auto-Scroll |
Script automatically follows dialogue during playback |
| Auto-Alignment |
Re-match cues when script text changes |
| Timing Buffers |
Adjustable before/after timing for each cue type |
Color-Coded Cue Types (360° Harmonized & CVD-Safe)
| Type |
Color |
Standard Hue |
Protanopia Profile |
Purpose |
| đĄ Dialogue |
Amber |
Sunlight Amber |
Sunlight Amber |
Character speech and conversations |
| đľ Action |
Blue |
Royal Cobalt Blue |
Royal Cobalt Blue |
Physical actions and movements |
| đ˘ Camera |
Green |
Emerald Green |
Mint Emerald |
Camera movements and angles |
| đŁ Shot |
Indigo / Wine |
Deep Iris |
Deep Wine / Burgundy |
Shot descriptions, framing, and camera scale |
| đ Audio |
Orange |
Vivid Tangerine |
Vivid Tangerine |
Sound effects and music cues |
| đˇ VFX |
Cyan / Aqua |
Electric Aqua |
Radiant Ice Aqua |
Visual effects descriptions |
| 𩷠Transition |
Rose / Coral |
Crimson Rose |
Vermilion Coral |
Scene transitions and editorial cuts |
| ⪠Environment |
Slate |
Balanced Slate |
Balanced Slate |
Setting and atmosphere descriptions |
Accessibility Profile: SceneFlow includes an opt-in Protanopia / Deuteranopia Safe Mode in theme settings that remaps Shot to Deep Wine ($L^* \approx 25$) to eliminate blue-indigo ambiguity, paired with high-luminance Ice Aqua VFX ($L^* \approx 85$) and Vermilion Coral transitions.
https://github.com/user-attachments/assets/cf3a7fec-2a4b-48d8-9028-245eba49934c
đ Multi-Track Sync Timeline & Playback Workspace
- Horizontal Multi-Track Timeline â Visual NLE/DAW-inspired horizontal lanes for each cue category with deterministic sub-lane stacking
- Sub-Frame Clock Extrapolation â Continuous timeline clock advancement (
useSmoothTimelineTime) running via requestAnimationFrame and performance.now(), eliminating jittery ~100ms API polling delays and fixed-step CSS transition stutter
- Stationary Anticipation Playhead â Laser marker anchored at 35% with a continuous sliding timecode ruler for upcoming cue anticipation
- Adaptive Single-Row Header â Stepped label collapsing with live active cue counter, 8-slot category LED VU meter strip, and compact
[ â Fixed ] / [ â Flex ] track height toggle
- Docked Paused Inspector â Detailed cue inspection card with quotes, timestamps, category badges, and instant replay when paused
- Persistent Transport Controls â Header-mounted Play, Pause, and Replay (0:00) controls operable even when video is hidden
- Live Timecode HUD Badge â Real-time
MM:SS.s precision timecode and media duration indicator active in both modes
- Collapsible YouTube Source Header Pill â Replaces bulky inputs with a sleek
[ đ˘ {videoId} âď¸ ] pill, saving vertical space
- Local Video Files â Play an MP4, WebM, or MOV from your computer in place of the YouTube source for the current session; the file is not saved with the project
- Collapsible Video Player â Hide video frame with zero-height clipping for clean timeline screen recording while keeping background audio and clock continuity (
V)
- Mode-Aware Layout Reset â Snaps split panes to calibrated distributions (40/35/25 in Edit Mode, 65/35 in Playback Mode) with 1-click or
Shift+R
- Timeline Zoom & Height Modes â Discrete zoom presets (4s, 8s, 16s) and Fixed vs. Flexible track height allocation
âď¸ Desktop 3-Panel Edit Workstation & Cue Studio
- Calibrated 40 / 35 / 25 Distribution â Dedicated 3-panel layout: Left Media & Cues Studio (40%), Center Screenplay Canvas (35%), and Right Draggable Cue Inspector (25%)
- Draggable Vertical Inspector Splitter â Fluid percentage-based resizing (18% to 45% with 260px safety floor), double-click reset to 25%, and keyboard accessibility (â / â / Enter)
- Time-Clustered Fluid Grid (Cards View) â Chronological cue grouping ($\le 2.5$s proximity, max 10s span) with frosted sticky timecode landmark rulers and dense auto-fill packing
- Mini Cue Cards & Dialogue Safeguard â Compact 1-column cards for quick audio/shot bursts ($\le 1.8$s, $\le 40$ch), while character dialogue (
type === 'dialogue') and longer text are guaranteed at least 2 columns
- Ergonomic Cue Inspector â Symmetrical Start/End audio-visual timing deck with live timecode HUDs (
MM:SS.s), micro-nudge steppers (-0.5s, -0.1s, +0.1s, +0.5s), clock capture, live duration chips (âą 1.6s), and interactive Play Cue [âś] preview with a dynamic Loop [đ] controller
- Surrounding Scene Context Window â Displays screenplay lines immediately preceding (
PREV) and following (NEXT) the selected text for instant narrative orientation
- Script Anchoring Card â Decoupled card retaining editable character offsets (
Start Index, End Index), live span counter, and cue ID badge
- Pinned Sticky Bottom Action Bar â Anchors
Update Cue (Ctrl+Enter), Cancel (Esc), and Delete permanently to the inspector bottom
- Two-Tier Theme-Harmonized Highlights â Primary scroll focus cue commands attention with radiant ambient glow, halo, and active border; secondary co-active cues render with subtle ambient wash
- Performance-Shielded Auto-Scroll â Forward monotonic scrolling guard eliminating rubber-band jitter, with instant touch/wheel cancellation and filter-aware visible cue tracking
- Cross-Mode Playback Continuity â Single persistent media viewport prevents YouTube player destruction, audio cutoffs, or timestamp resets when toggling between Playback and Edit modes
- Clean Script Click Dismissal â Clicking clean script canvas safely dismisses inspector back to idle overview when no unsaved changes exist (
dismissIfClean), with reactive Saved vs Unsaved status badging
đ¤ Studio Cues JSON Editor & LLM Sync Setup (RawCuesModal)
- Two-Column Workstation Architecture â Left column visual Schema Reference (essential, auto-calc, and optional fields with copy/insert snippets); right column dual-tab editor
JSON Data Tab â Live non-blocking syntax validation pill ({ cues } detected, N cues ready), error diagnostics without browser alerts, and [ ⨠Format JSON ] 2-space indentation standardizer with automatic { cues: [...] } unwrapping
Sync Prompt & Schema Tab â Integrated 3-step Gemini setup guide with standalone public asset links (/sync-prompt.txt, /schema.json)
- Segmented Sub-View Switcher â Full-width views (
[ đ Sync Prompt ], [ đ¤ Gemini Schema ]) eliminating horizontal scrollbars, and [ ⍠Split ] side-by-side mode
- Token-Optimized Minimal Schema â Modular schema contract strictly focused on data types and enums without noisy descriptions that degrade LLM token generation
- Context-Aware Footer Actions â Tab-specific actions (
Apply Cues (N) vs Go to JSON Data â) with wrap-resistant Title Case styling
đ Studio Script Editor & Formatting Suite (RawScriptModal)
- 4-Rank Hierarchical Outline â Collapsible navigation tree parsing
PART, Roman numeral acts (I. ...), scene headings (INT./EXT.), staging containers, brief execution blocks, and directive tags with section item counters, expand/collapse all, and auto-unfold caret tracking
- Soft Word-Wrap with Gutter Alignment â Toggleable via
[ Wrap ] or Alt+Z, utilizing an off-screen measurement mirror container computing rendered line heights for exact 1:1 line number gutter alignment without vertical drift
- Searchable Formatting Guide Sidebar â Integrated right-hand cheat sheet with live search, category filtering (
Structure, Directives, Dialogue, Effects), 1-click Insert and Copy snippets, and live visual preview badges
- Single-Tier Streamlined Toolbar â 40px single-row toolbar housing segmented view switcher, container wrapping buttons (
[[STAGING]], [<BRIEF>]), core directive presets (INTENT, LOGIC, AESTHETIC, OPENING), persistent custom directive tags with removal pips, and right-aligned history/document utilities
- Debounced Undo/Redo & Custom Tags Engine â Keystroke-debounced history engine (300ms) with full Ctrl+Z/Ctrl+Y support and
localStorage persistence for user-defined directive tags
- Fast-Path Outline Parsing & DOM Virtualization â Fast-path character prefix filtering bypassing 95% of regex evaluations, single-pass bottom-up $O(N)$ accumulation, and
content-visibility: auto CSS virtualization
Data Management
- Universal File Dropdown Data Access â Instant direct access to
Sync Cues (JSON)... and Source Script... across both Playback and Edit modes without mode switching
- Import/Export â Save and load projects as JSON files
- Remote Sharing â Share projects via URL using query parameters
- Raw Editing â Direct access to screenplay text and cue data
- Separated Blank Canvas & Starter Guide â Authentic blank project template (
blank.json) for starting fresh, alongside dedicated 1,200+ line interactive tutorial script (guide.json)
- Local Storage â Automatic saving of your work
Script Viewer Customization & Dynamic Theming
- 3-Zone Studio Header Architecture â Balanced layout: Left Wing tiered
[ File âž ] dropdown (Project I/O, Blank Canvas, Starter Guide, Library), Center Stage segmented mode switcher ([ âś Playback | âď¸ Edit ]), and Right Wing Studio Preferences
- Consolidated Studio Preferences (
[ âď¸ Settings âž ]) â 4-theme quick selector grid (Auto, Light, Warm, Dark), dedicated "Reading Canvas & Viewport" section with 5-segment Script Width row and 3-segment Focus Line row, <kbd> shortcut badges, dynamic Custom layout badge, and 1-click [ âş Reset All ] action