Overview:
I am working on a video project. The technology I use: imageMagick, php, ffmpeg.
Current status:
Currently, the project is able to create videos using images and texts and several basic transitions. The way I do this is to use imagemagick to create a gif using input images (with transition effects in them), and then convert all the gifs into videos and combine the videos together at the same time.
The following transition (My question):
Now I am set to go to the next level. So, I have a video (1920x1080) with some white frames (1280x720) that keep the offset in each frame. I want to replace these white frames appearing in some frames of the video with some images (1280x720) that I want to use. Please see the image here and you will get an idea: these are just two frames from my video. If you see that the images are shifted (space is not constant).


Expectation:
So, I want to fill these gaps with one of my own images. If the case were for only one frame, I could use ffmpeg to overlay the image at the exact width and height. But here the empty space is not fixed and continues to shift in all frames, and there are many frames. So, I'm looking for something like opencv or some other technology that can be used to detect an object in a video or in a frameset and replace the detected area with some other image.
I just need a punch. So, if someone has already worked on something like this, just suggest me which technology I can use. Thanks in advance.
php image image-processing ffmpeg
Kiran dash
source share