0

Perhaps I'm misunderstanding the capabilities of AVComposition, but I have a task that I am failing to know how to approach.

I have a background video, which is a video of a tree;

enter image description here

I also have a foreground video, which is a video of a horse;

enter image description here

I have a transparent .png mask, which is a circle (shown with background for clarity).

enter image description here

My ideal goal is to create a H.264 video, save to the user's device, that shows the tree in the background, with the horse video masked into a circle.

While I believe using init(asset:applyingCIFiltersWithHandler:) to apply a CIBlendWithMask filter could be feasible, I have no idea how I would render the "masked" video (since it would be transparent around the circle) over the background video.

Cœur
  • 37,241
  • 25
  • 195
  • 267
ZbadhabitZ
  • 2,753
  • 1
  • 25
  • 45

0 Answers0