Thursday, August 19, 2010

Making an animated gif from a movie clip

Using open-source software, I was able to take a clip from a movie file and turn it into an Animate GIF file.

Software: VLC and ImageMagick
Operating System: Windows 7 64bit (XP will work too)
Movie filename: "Epv peeps rev1.mov"

Command line for VLC: "C:\Program Files\VLC\vlc.exe" --video-filter scene -V dummy --scene-format=png --scene-ratio=3 --scene-width=300 --start-time=1 --stop-time=21 --scene-path=c:\temp\fw --scene-prefix=fw "c:\temp\Epv peeps rev1.mov" vlc://quit

This will create subdirectory c:\temp\fw and place files with the name "fw00001.png" and add multiple files with numerically incremented filenames.

Now to convert to an Animated GIF:
"c:\Program Files (x86)\ImageMagick\convert.exe" c:\temp\fw\*.png c:\temp\fw\John.GIF

This will create "John.GIF" comprised of all the png files created from the video file. Finding the correct parameters for VLC was difficult because they made minor changes with each newer version.