entirely off-topic, i’d say. this is a computer-vision library, not a video-editing one.
and VideoWriter probably won’t write animated gif’s
(still a license problem)
also, opencv uses bgr pixel order, imageio rgb.
if you blindly mix different image processing libs, you run into problems like this