Stylize an animation sequence using G’MIC

When making an animation many times we want the scene to look painted, there are many effects that mimic this, but they are not very convincing so build a script to do it with G’MIC which has quite a convincing effect. The problem is that the sequence often creates flicker caused by creating each frame separately.

In this case, he paints the scene with the baby as if it were “The Starry Night” by Vincent van Gogh.

Download example

wget -c https://download.tuxfamily.org/4232/wordpress/2017/05/4232.cf-e2.gif

Extract the images using FFmpeg

ffmpeg -i 4232.cf-e2.gif w.%04d.png

stylize the sequence using G’MIC

ls w.*png | while read A; do
gmic $A _fx_stylize starrynight +fx_stylize 1,6,0,0,0.5,2,3,0.5,0.1,3,3,0,0.7,1,0,1,0,5,5,7,1,30,1,2,1.85,0 output[2] result_$A
done

join everything using FFmpeg

ffmpeg -y -i result_w.%04d.png result.mkv

Origin

Result

Posted in Experiment, Tutorials and tagged , .

Leave a Reply

Your email address will not be published. Required fields are marked *

*

code