I have managed to setup a basic AVCaptureSession
which records a video and saves it on device by using AVCaptureFileOutputRecordingDelegate
. I have been searching through docs to understand how we can add statistics overlays on top of the video which is being recorded.
i.e.
As you can see in the above image. I have multiple overlays on top of video preview layer. Now, when I save my video output I would like to compose those views onto the video as well.
What have I tried so far?
- Honestly, I am just jumping around on internet to find a reputable blog explaining how one would do this. But failed to find one.
- I have read few places that one could render text layer overlays as described in following post by creating
CALayer
and adding it as a sublayer. - But, what about if I want to render
MapView
on top of the video being recorded. Also, I am not looking for screen capture. Some of the content on the screen will not be part of the final recording so I want to be able to cherry pick view that will be composed.
What am I looking for?
- Direction.
- No straight up solution
- Documentation link and class names I should be reading more about to create this.
Progress So Far:
I have managed to understand that I need to get hold of CVImageBuffer
from CMSampleBuffer
and draw text over it. There are things still unclear to me whether it is possible to somehow overlay MapView over the video that is being recorded.