So do you need it to be transparent on top of something else and during playback?
Any preprocessing you can do ahead of time to reduce the amount of work needed at playback is usually better.
For the Mac you can use After Effects or Premiere to do what you're talking about.(create mask for black or making a mask.
You can also use ffmpeg (free) but will been to sort through the commands.
Yes, it needs to be transparent. I don't have any of those fancy programs like After Effects, nor do I want to learn them for just this one task. The Pond5 video has a black background embedded in it - the first 30 seconds. The second 30 seconds are the appropriate mask for the equivalent point in the core video.
I read a really interesting article on how to apply a mask in real time - I realize I could preprocess it too. Since links here can be problematic, try searching on terms quentinfasquel ios-transparent-video-with-coreimage
In the end, I think I can do this in code: I'll run the video once, from start to finish. I'll cache every frame (30*25 of them), then when I get past the 30 second mark, I'll add the original frame to the mask frame, and output that as an AVAsset (to a writer), saving this final 30 seconds with both images placed such that I can pull each out (per the link above).
I'll get more experinece with AVFoundation and not waste time learning to use some tools that I'll never use again.