Apply video rotation with AVVideoCompositionLayerInstruction and fit to render size

24 Views Asked by At

I want to implement a video rotation feature in a video editor application where the user can rotate the video by 0, 90, 180, or 270 degrees. How can I properly center the rotated video using AVMutableVideoCompositionLayerInstruction?

I have attempted the implementation, but the x and y positions of the video are not correctly centered.

0

There are 0 best solutions below