[ Prev ] [ Index ] [ Next ]

Create_Gif

Created Tuesday 26 September 2017


# It's fairly simple to create a .gif in linux.
# We'll record a small video of the Terminal and create a gif preview


# Install the gtk-recordmydesktop, mplayer and imagemagick packages
$ pacman -S mplayer gtk-recordmydesktop imagemagick


# Record with recordmydesktop - you can select window which is rather nice.
# You'll end up with a out.ogv format (unless changed), let's say it's at ~/out.ogv


# Then we'll use mplayer to create a shitload of images from the small video we just recorded
# Create a folder to hold all the images, if you havent already. We'll call it project
$ mplayer -ao null out.ogv -vo jpeg:outdir=/home/stick/project


# Now we'll use the imagemagick package to create a gif - it'll take a while.
$ convert -delay 10 -loop 0 *.jpg final.gif


# And we can optimize it once it's done creating the final.gif
# This will take even longer time and your system might become unresponsive. Maybe try with optirun next.
$ convert final.gif -fuzz 10% -layers Optimize final_optimzed.gif