This is not funny – I spent a few evening fixing and fixing and fixing. Now ./configure then make and sudo make, but where is binary? Why is it not is /usr/bin/ OR /usr/local/bin/? Oh you do brew install opencv – but it does not work in terminal? Amazing. I was THIS close to wiping mac os and installing Linux on my macbook guys, THIS CLOSE.
My previous version has flaws. It works well for opaque GIFs, but OpenCV is famous for not being good with transparent images. So instead of OpenCV I use imageio for GIF iteration and PIL for adding GIF frames to the static background.
Why do more?
The original algorithm left these artifacts, look at the cyan block on the intersection of GIF frame and a darker abstract part:
BTW, if you want to run ffmpeg or any other command inside a python script (a very reasonable idea), use subprocess:
command = "ffmpeg -f concat -safe 0 -i list.txt -c copy final_video.avi -y"
As a result – the videos got smashed together – some frames even never appeared.