...and for the actual frame-by-frame compositing, I’m leaning on AVVideoCompositing. The custom compositor uses CIBlendWithMask to blend the main video with the matte. I’ve never dug super deep into AVFoundation, I was kinda surprised by how easy it was to do this (~70 lines). Most of the work here was just setting up the scaffolding around it. I didn’t need to dive into shader land or anything of the sort. https://github.com/samhenrigold/MacPlusDancer/blob/main/MacPlusDancer/CustomVideoCompositor.swift