0

December 30, 2016 AT 9:18 am

ffmpeg + gifsicle + giflossy + ImageMagick = GIFs From Videos in Linux

Here’s a simple setup and a readymade script for converting MP4s (or WEBMs) to animated GIFs, form Ubuntu 16.04 or Fedora 25:

I started making some .gifs to embed in documentation and my notes as I develop Rusty Nail. I always have to lookup how to convert the images to gifs. Everytime I am also concerned with how big the .gifs are so after doing some looking around I made a little script which uses ffmpeg, convert, and gifsicle (with giflossy) to take an input mp4, webm, or any video that ffmpeg can decode.

The process is this:

    ffmpeg splits the video into a directory of gifs
    convert those images and stitches them together into one gif.
    gifsicle optimizes the gif and allow a stage to resize it and also change the color. The giflossy plug-in also can apply lossy compression to the gif video during the optimization step.

Thanks Drew for sending this in!


Check out all the Circuit Playground Episodes! Our new kid’s show and subscribe!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Learn resistor values with Mho’s Resistance or get the best electronics calculator for engineers “Circuit Playground”Adafruit’s Apps!


Maker Business — SoftBank Invests $300 Million in WeWork

Wearables — Impatience reward

Electronics — Cool your FETs!

Biohacking — What I Learned from VO2 Testing in Ketosis

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !



No Comments

No comments yet.

Sorry, the comment form is closed at this time.