How dosmoon/videocraft works
VideoCraft is a Windows desktop video-production app: users create a project, add a source video and subtitle/analysis material, then produce and render clips or a News Desk video. The README documents the end-to-end capabilities; the sampled code shows the Electron/Python sidecar boundary, RPC transport, TypeScript material and clip ownership, subtitle processing, AI routing, and model downloads. Some creation and rendering connections are documented but not shown in sampled implementation, so those edges cite the README rather than implying inspected call paths.
Main entry points: index.tsx Workbench UI · clientBackend.ts Clip backend · project.py Project operations · router.py AI provider router
Components 24
Desktop experience
- Workbench UI
desktop/src/renderer/workbenches/index.tsx - Electron main
desktop/electron/main.ts - RPC client
desktop/src/renderer/ipc/client.ts
Projects and materials
- Project operations
core_rpc/methods/project.py - Project schema
src/core/project_schema.py - News Video material
desktop/src/materials/news_video/clientBackend.ts - Material model
desktop/src/materials/news_video/model.ts - Source acquisition
src/core/source_acquire.py - Subtitle workflow
src/core/subtitle_pipeline.py
AI and models
- AI settings
desktop/src/renderer/aiconsole/AiConsole.tsx - AI configuration
src/core/ai/config.py - AI provider router
src/core/ai/router.py - AI providers
src/core/ai/providers - Model manager UI
desktop/src/renderer/models/ModelManager.tsx - Model downloads
src/core/models/manager.py
Creation and rendering
- Clip workbench
desktop/src/renderer/workbenches/clip/ClipWorkbench.tsx - Clip backend
desktop/src/creations/clip/clientBackend.ts - News Desk creation
desktop/src/creations/news_desk - Composition system
desktop/src/composition/assemble.ts - Video render engine
desktop/src/renderer/engine/export/encode.ts
Sidecar services
- RPC server
core_rpc/server.py - RPC dispatch
core_rpc/dispatch.py - Project session
core_rpc/session.py
Other components
- Video editor
Connections 26
- Video editor → Workbench UI: creates and edits
- Workbench UI → RPC client: requests operations
- RPC client → Electron main: invokes bridge
desktop/src/renderer/ipc/client.ts - Electron main → RPC server: forwards RPC
desktop/electron/main.ts - RPC server → RPC dispatch: dispatches requests
core_rpc/server.py - RPC dispatch → Project operations: routes methods
- Project operations → Project schema: uses project schema
core_rpc/methods/project.py - Project operations → Project session: owns open project
- Workbench UI → News Video material: edits material
- News Video material → Material model: loads model
desktop/src/materials/news_video/clientBackend.ts - Material model → Source acquisition: uses acquired source
- Video editor → Source acquisition: adds video
- Video editor → Subtitle workflow: runs subtitle tasks
- Subtitle workflow → AI provider router: requests AI tasks
src/core/subtitle_pipeline.py - AI settings → AI configuration: configures providers
- AI provider router → AI configuration: reads routing config
src/core/ai/router.py - AI provider router → AI providers: dispatches provider calls
src/core/ai/router.py - Model manager UI → Model downloads: manages downloads
- Workbench UI → Clip workbench: opens creation
- Clip workbench → Clip backend: loads clip data
desktop/src/creations/clip/clientBackend.ts - Clip backend → Material model: resolves bound material
desktop/src/creations/clip/clientBackend.ts - Video editor → News Desk creation: generates video
- Video editor → Clip backend: generates clips
- Clip backend → Video render engine: renders clips
- News Desk creation → Composition system: assembles program
- Composition system → Video render engine: encodes output