Personal·engineering
Transparent Video Player
HEVC Alpha on iOS
SwiftMetaliOSVideo
When you're building AI characters that need to appear in an app — overlaid on a map, a chat interface, or a camera feed — you need video with transparency. This is a harder problem than it sounds. Standard video formats don't support alpha channels, and the common workarounds all have significant trade-offs in file size, performance, or device compatibility.
I explored multiple approaches to solving this on iOS, from GPU-accelerated shader-based compositing using
Metal to leveraging Apple's newer
HEVC with Alpha codec support. The final solution achieves dramatically smaller file sizes compared to traditional stacked-video approaches, with hardware-accelerated playback across multiple resolution presets.
The system also needed to work across different iOS versions and device capabilities, which meant building a fallback pipeline that gracefully degrades on older hardware while taking advantage of newer codec support where available.
This is now used in production for real-time character compositing — AI characters can be overlaid onto any background seamlessly, with their expressions, gestures, and speech rendered as transparent video layers.