Using AVVideoComposition for kens burn effect?

694 views Asked by At

I'm current using AV Foundation to export images as videos. Now I want to add kens burn effect to these images when they are exported as a video.

As far as I know, this is achievable through AVVideoComposition but I'm not sure how to start.

1

There are 1 answers

0
Gordon Childs On BEST ANSWER

AVMutableVideoComposition.animationTool (AVVideoCompositionCoreAnimationTool) looks promising.

That and AVMutableVideoCompositionLayerInstruction's

- (void)setTransformRampFromStartTransform:(CGAffineTransform)startTransform toEndTransform:(CGAffineTransform)endTransform timeRange:(CMTimeRange)timeRange;

should be a good start, assuming the Ken Burn's effect can be implemented by interpolating affine transforms.