Print

Print


Hey,

There are several online converters, that can sometimes do better jobs, depending on how you configure their settings.

If you'd rather do them yourself, and have different controls, or particularly if you want to script multiple conversions, here are two methods that I've used.  If anyone has improvements to add to these, I'd appreciate hearing them.

Method #1 first converts the video to individual frames, and then constructs the frames into a gif.
Method #2 is a more direct conversion, however first generates a more focused palette, resulting in a smaller file size, than when using all available colours.


-Method #1 (requiring ImageMagick and ffmpeg being installed):
# Output video to frames
mkdir frames
ffmpeg -i', source_movie.mp4 -vf fps=10 frames/ffout%03d.png

# Assemble frames into a gif
convert -loop 0 frames/ffout*.png output.gif


-Method #2 (requiring ffmpeg):
# Get the palette
ffmpeg -i infile.mp4 -vf palettegen palette.png

# Generate the gif
ffmpeg -i infile.mp4 -i palette.png -filter_complex fps=10,paletteuse outfile.gif



Thanks,
LO




________________________________
From: Code for Libraries <[log in to unmask]> on behalf of charles meyer <[log in to unmask]>
Sent: Monday, August 31, 2020 12:04 PM
To: [log in to unmask] <[log in to unmask]>
Subject: [CODE4LIB] Creating animated gifs

Hi All,

Itís amazing what can be done without necessarily having an audio/video
department or a tech degree as Iíve learned video editing.

BTW, that video editing software edits; it doesnít create videos or .gifs.

I was wondering if anyone on this list has created a .gif?

Iím interested in creating a learning tutorial making the subject in the
creation animated.

Yes, you can use Blender but that has a learning curve similar to learning
GIMP (which Iíve read can create .gifs but the steps to create one have not
been shared.

Iím interested in any free, easy-to-learn/use software which could create
animated .gifs?

Thank you so very much for sharing your thoughts/suggestions.

Charles.
        CAUTION: This email originated from outside of the Getty. Do not click links or open attachments unless you verify the sender and know the content is safe.