How to properly export CALayer on top of AVMutableComposition with AVAssetExportSession
I know this question was asked before (for example here and here ) but I just can't figure out what I'm doing wrong. I have an AVMutableComposition that I use to combine some video clips with some CALayer s that animate on top of them. Everything works ok when I take my AVMutableComposition and combine it with an AVSynchronizedLayer for playback inside an AVPlayerLayer . The video comes out correctly and everything is positioned where it should. My problem is that when I tried to export this thing I tried using AVVideoCompositionCoreAnimationTool instead of AVSynchronizedLayer (that's what the