I would like to find all frames in a clip that are likely to contain an image at a known position.
My idea is to grab a still from the video, cut the image and create a mask, feed the video and mask into ffmpeg, use a filter to apply the mask over the video, calculate the difference between the current frame and mask and try to detect if the entire image is black which would indicate that the image is present in the frame.
But when it does match the blended difference should result in a black screen which I can detect using blackframe.
I've gotten as far as blacking out the actual image, but I'm not sure how to black out the surrounding part of the frame.
Is this possible using ffmpeg, or is there perhaps a different way of doing the same thing?