Happy Hanukkah

kitty_menorah_animation_bf.gif

– lightning up the Menorah (1’st candle was today)
– cat is acting funny
out00000

– at first I’m..
2015-12-07_031449
– but then I’ve quickly grabbed the phone and started to film..

– breaking video to frames, one per new PNG file, using

convert -coalesce video.mpeg out%05d.png

– adding watermark to the bottom of each PNG file, using

convert out00000.png -background #685067 -fill white -background #6C938E -pointsize 12 label:"i c o m p i l e . e l a d k a r a k o . c o m" -gravity Center -append anno_label2.jpg

making a quick and dirty parallel-multi-process batch file (using “start”)
to make it faster/better/cool’er

“_file_encoder.cmd”:

@echo off

set sFILE_NAME_INPUT="%~s1"

::path
set sFILE_NAME_OUTPUT=%~d1%~p1
::filename
set sFILE_NAME_OUTPUT=%sFILE_NAME_OUTPUT%_watermark_%~n1
::use JPG ext.
set sFILE_NAME_OUTPUT=%sFILE_NAME_OUTPUT%.jpg


call convert %sFILE_NAME_INPUT% -background #685067 -fill white -background #6C938E -pointsize 12 label:"i c o m p i l e . e l a d k a r a k o . c o m" -gravity Center -append "%sFILE_NAME_OUTPUT%"

exit

“_start_all.cmd”:

@echo off
echo I am the runner

for %%e in (*.png) do (
    ::parallel different process. and continue.
    start /low /min "cmd /c "call _file_encoder.cmd "%%e"""
)

– double click the _start_all.cmd, 1 second operation x99 files (in parallel) takes about 10 seconds.

– making a 6-seconds delay, HD animated GIF, using:

convert -background white -alpha remove -layers OptimizePlus -delay 6 *.jpg -loop 0 animation.gif

– thinking 2-way gif will be wayyyy funnier, making the gif go back and forth, using:

convert animation.gif -coalesce -duplicate 1,-2-1 -layers OptimizePlus -loop 0 animation_bf.gif

result is a super HD, but single gif> 22MB,
copy every 2nd image to another folder, cut 1/2 of the frames (some things do not need a script…)

– quickly writing this post with all those convert tricks,
clicking publish, and laugh my ass out for 4 minutes no b$hit :)

Going with the holiday spirit and watching some “Robot Chicken” Hanukkah sketches:

Happy Holidays