Creating animated gifs from movie files.

Recently I needed help a client create a web page / script to create animated gifs from video files.

I wrote up details on what was needed and how to achieve it using php, ffmpeg, and imagemagick.

saving here in case I might need in the future or maybe I could help someone out that is looking to do the same thing.

For a web interface:

input: Video ID, Start Time, Length (max 5 seconds), frames per second
hit go – ffmpeg portion runs and creates thumbs.

output: png images that are created.
ability to chose start-point and end-point thumbnail
ability to delete specific thumbnails

radio button for normal (default) | black & white | Sepia
Speed button: normal (default) | SlowMotion | Speed x2 (would be great if we could do a slider of some sort that would alter r/d)
Create button – takes all png images between start-point and end-point and creates animated gif

thumbnails should still be available for fine tuning if .gif didn’t turn out as expected.

Upload button – clicking will take final .gif and upload/move it to somewhere on our web server.

Sepia:

convert – set colorspace RGB -sepia-ton 80% -delay 12 +map -ordered-dither o8x8,19 -layers Optimize *.png gstepmom.gif

Black&White –
convert -set colorspace RGB -colorspace Gray -delay 12 +map -ordered-dither o8x8,19 -layers Optimize *.png gstepmom.gif

normal:
convert -delay 11 -ordered-dither o8x8,19 +map -layers Optimize *.png stepmom.gif
speed normal – 100/r=d
speed slow – 100/rd