How brandsconnet-byte/video-rag-engine works
Video RAG Engine turns video into searchable scene indexes and exports matching clips. The principal workflow is scene detection, dual-model scene enrichment, LanceDB indexing, query search, then duration-based routing to clip extraction or editing; pro export produces EDL/XML. CLI, Flask, and Gradio interfaces expose parts of this workflow, and the README also documents batch queries and configurable processing. The pipeline and component relationships are supported by excerpts and README; some routing and export dispatch details are documented but not shown at their call sites.
Main entry points: pipeline.py Pipeline Orchestrator · export_manager.py Clip And EDL Export · main.py CLI Commands · app.py Flask API
Components 13
User Interfaces
- CLI Commands
main.py - Flask API
app.py - Gradio UI
gradio_app.py
Video Processing
- Pipeline Orchestrator
src/pipeline.py - Scene Detection
src/scene_detector.py - Dual AI Indexing
src/dual_brain_processor.py
Index And Search
- Scene Index And Search
src/vector_database.py
Routing And Export
- Export Router
src/intelligent_router.py - Clip And EDL Export
src/export_manager.py - FFmpeg
- auto-editor
Other components
- CLI User
- Web User
Connections 14
- CLI User → CLI Commands: runs commands
main.py - CLI Commands → Pipeline Orchestrator: invokes workflow
main.py - Web User → Flask API: uploads and searches
app.py - Flask API → Pipeline Orchestrator: calls workflow
app.py - Web User → Gradio UI: uploads and searches
gradio_app.py - Gradio UI → Pipeline Orchestrator: calls workflow
gradio_app.py - Pipeline Orchestrator → Scene Detection: detects scenes
src/pipeline.py - Pipeline Orchestrator → Dual AI Indexing: enriches scenes
src/pipeline.py - Pipeline Orchestrator → Scene Index And Search: stores and searches
src/pipeline.py - Pipeline Orchestrator → Export Router: selects export route
README.md - Pipeline Orchestrator → Clip And EDL Export: exports results
README.md - Export Router → Clip And EDL Export: dispatches export
README.md - Clip And EDL Export → FFmpeg: extracts clips
src/export_manager.py - Clip And EDL Export → auto-editor: edits segments
src/export_manager.py