How tharshananth/ai_video_editor works
Framewise turns an uploaded screen recording into an edited product demo. The main path is upload and project creation, graph-driven frame/vision/audio analysis, timeline and narration planning, theme/voice selection and music generation, then dual-engine rendering with captions and downloadable output. Project files, SQLite metadata and WebSocket progress support that flow. Edges reflect the README and the sampled-source index; unsampled frontend and route internals limit detail on their interactions.
Main entry points: graph_builder.py Pipeline graph · render_orchestrator.py Render orchestration · main.py FastAPI endpoints · processing_service.py Processing service
Components 25
Client and API
- Web interface
frontend/src/App.tsx - FastAPI endpoints
api/main.py - Upload and project routes
api/routes/upload.py
Project services
- Project service
api/services/project_service.py - Processing service
api/services/processing_service.py - Progress updates
api/services/websocket_manager.py
Analysis and planning
- Pipeline graph
orchestration/graph_builder.py - Pipeline state
orchestration/state_schema.py - Frame extraction
agents/agent_1_frame_extractor.py - Cursor detection
agents/agent_2_cursor_detector.py - Vision analysis
agents/agent_3_vision_description.py - Audio analysis
agents/agent_4_audio_agent.py - Edit analysis
agents/agent_5_analysis_agent.py - Script and edit plan
agents/agent_6_script_planner.py - Music generation
agents/agent_7_music_agent.py - Theme and voice
agents/agent_8_theme_agent.py
Rendering
- Render orchestration
rendering/render_orchestrator.py - FFmpeg processing
rendering/ffmpeg_processor.py - MoviePy fallback
rendering/moviepy_processor.py
Persistence and files
- Project lifecycle
utils/project_manager.py - Project files
utils/file_manager.py - SQLite metadata
utils/database.py
Other components
- Video creator
- AI and voice providers
- Rendered video
Connections 34
- Video creator → Web interface: uploads recording
README.md - Web interface → FastAPI endpoints: submits project
- FastAPI endpoints → Project service: creates project
api/main.py - FastAPI endpoints → Processing service: starts processing
api/main.py - FastAPI endpoints → Progress updates: opens progress channel
api/main.py - Project service → Project lifecycle: manages lifecycle
api/services/project_service.py - Processing service → Pipeline graph: executes pipeline
api/services/processing_service.py - Processing service → Progress updates: sends updates
api/services/processing_service.py - Pipeline graph → Pipeline state: uses state
orchestration/graph_builder.py - Pipeline graph → Frame extraction: dispatches stage
- Pipeline graph → Cursor detection: dispatches stage
- Pipeline graph → Vision analysis: dispatches stage
- Pipeline graph → Audio analysis: dispatches stage
- Pipeline graph → Edit analysis: dispatches stage
- Pipeline graph → Script and edit plan: dispatches stage
- Pipeline graph → Music generation: dispatches stage
- Pipeline graph → Theme and voice: dispatches stage
- Frame extraction → AI and voice providers: samples frames
README.md - Vision analysis → AI and voice providers: analyzes recording
README.md - Audio analysis → AI and voice providers: transcribes audio
README.md - Edit analysis → AI and voice providers: analyzes timeline
README.md - Script and edit plan → AI and voice providers: writes narration
README.md - Music generation → AI and voice providers: generates music
README.md - Theme and voice → AI and voice providers: casts voice
README.md - Pipeline graph → Render orchestration: invokes renderer
- Render orchestration → FFmpeg processing: applies edits
rendering/render_orchestrator.py - Render orchestration → MoviePy fallback: uses fallback
rendering/render_orchestrator.py - Render orchestration → Music generation: requests music
rendering/render_orchestrator.py - Render orchestration → Rendered video: writes output
README.md - Project lifecycle → Project files: creates project files
utils/project_manager.py - Project lifecycle → SQLite metadata: stores metadata
utils/project_manager.py - Frame extraction → Project files: stores intermediates
agents/agent_1_frame_extractor.py - Render orchestration → Project files: reads and writes assets
rendering/render_orchestrator.py - FastAPI endpoints → Rendered video: serves download