I have two corresponding video files. One is a regular video and the other is meant to be the alpha channel for that video. I wish to combine them, and use the alpha video to lay a transparency key over the video, then output to a PNG sequence to avoid any lossy artifacts on the transparency key.
The alpha video needs a threshold filter applied to remove the gray pixels, then the main video needs the transparency color applied where the alpha video has black pixels. From trying to understand the threshold filter in ffmpeg, is almost seems like it might be possible to do this one one operation, however I am having trouble understanding how streams work.
The motivation here is that I would like to store these videos as small as possible. This could be done directly in a video editor, but I would need to keep the videos as PNG sequences to preserve the sharp transparency key. I have tried other codecs to keep this alpha data but they either aren't supported by my editor, are as large as PNG sequence and/or don't preserve the sharp transparency mask. I would like to use ffmpeg so that I can script this conversion when the frames are needed and they can remain as h264 the rest of the time.