This SO answer addresses how to do a screen capture of a UIView
. We need something similar, but instead of a single image, the goal is to produce a video of everything appearing within a UIView
over 60 seconds -- conceptually like recording only the layers of that UIView
, ignoring other layers.
Our video app superimposes layers on whatever the user is recording, and the ultimate goal is to produce a master video merging those layers with the original video. However, using AVVideoCompositionCoreAnimationTool
to merge layers with the original video is very, very, very slow: exporting a 60-second video takes 10-20 seconds.
What we found is combining two videos (i.e., only using AVMutableComposition
without AVVideoCompositionCoreAnimationTool
) is very fast: ~ 1 second. The hope is to create an independent video of the layers and then combine that with the original video only using AVMutableComposition.
An answer in Swift is ideal but not required.
AVMutableComposition
-only combine? How fast? What do you mean by "combine" in this case? – Arcade