I'm trying to add a watermark layer to a video.
I've already learned how to use the AVMutableComposition class. I have approximately 300 lines of code written that creates the video I need by composing several layers of source video and audio.
On top of this, I need to add a watermark. I thought going into it that there would be a simple way to take an image and create an AVAssetTrack out of it, which I already know how to insert into my composition. But when I searched for instructions on how to do this, holy cannoli, all the examples are around 100 lines of code in and of themselves, with references to things I've never heard of.
I can't believe it's that complicated. Maybe the examples I'm looking at are years old and don't take advantage of the modern SDK.
So, simply put: how can I make an AVAssetTrack out of a UIImage?
I don't need a whole tutorial on how to make and export a video composition because I already know how to do that. Just looking for this piece of it.
Thanks,
Frank