Search code examples
iosvideo-recordingcameraoverlayview

Recording video including record overlay in iOS


I'm using AVFoundation to record video. I added some overlay views on it such as 2 labels.

My idea is recording video also recording the overlay views into result video. I mean the result video will also have the overlay views go through with video

How can I do it?


Solution

  • The view hierarchy does not get reflected in the recorded media. In order to achieve this you could attempt to capture the frames of the view hierarchy and composite your own movie, which is likely will be of poor quality due to dropped frames. Or you can attempt to composite the video after it's recorded.

    Both of these methods will require deeper understanding of AVFoundation.

    This tutorial covers modifying a video file with overlays.

    http://www.raywenderlich.com/30200/avfoundation-tutorial-adding-overlays-and-animations-to-videos