mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-14 13:27:13 +00:00
Rust-native encoding: Skia paint → dcv BGRA→I420 → openh264 H.264 → minimp4 MP4. No subprocess, no pipe, no FFmpeg for encoding. Inspired by MediaBunny's browser-side approach (WebCodecs + MP4 muxer) but in Rust. Benchmark (macOS, 30 frames, 1080p): native (openh264+minimp4): 331ms (11.0ms/frame) ffmpeg (VideoToolbox): 348ms (11.6ms/frame) ffmpeg (JPEG pipe): 555ms (18.5ms/frame) The native path is ~5% faster than FFmpeg VideoToolbox on macOS. On Linux without hardware encoders, the gap should be larger since we skip FFmpeg subprocess startup + pipe serialization entirely.