Architecture Overview
VidiCrafter uses a triple-layer hybrid architecture. The API surface is organized around the FFI bridge connecting the C++/Qt 6 frontend to the Rust processing core.
UI Layer
C++ / Qt 6 frontend, QGraphicsView timeline, OpenGL preview, and CEF web panels.
Core Engine
Rust processing pipeline, FFmpeg decoders, wgpu rendering, SIMD pipelines, and memory-safe service modules.
AI Services
LLM integration (GPT-4o, Claude), TTS engine, Smart Crop vision, and style transfer processors.
Service Modules
vidicrafter::decoder
FFmpeg-based media decoder with hardware acceleration. Supports H.264, H.265, ProRes, AV1, VP9.
353+ servicesvidicrafter::renderer
wgpu 0.19 rendering backend. Compute shaders for real-time effects, compositing, and color processing.
GPU Computevidicrafter::encoder
Output encoding pipeline supporting H.264, H.265, ProRes, AV1 with hardware acceleration.
Zero-Copyvidicrafter::ai::llm
LLM provider abstraction layer. Supports OpenAI, Anthropic, local models via unified interface.
Asyncvidicrafter::ai::tts
Text-to-speech synthesis engine. Multi-language, multi-voice, with SSML control support.
Streamingvidicrafter::ai::vision
Computer vision services: face detection, object tracking, scene classification, smart crop.
ONNX RuntimeFFI Bridge
The FFI (Foreign Function Interface) bridge connects the C++ frontend to Rust services using a safe, typed protocol with JSON marshalling.
Example: Calling a Rust Service
// C++ side — calling Rust decoder
auto result = ffi_bridge::call("vidicrafter::decoder::open", {
{"path", "/media/video.mp4"},
{"hw_accel", true}
});
// Returns JSON result
// { "handle": 42, "format": "h265", "duration_ms": 125000 }