* <<HAL.0020>> ffmpeg/avconv, GIF
Some gyrations for scaling, dithering to GIF...

Crop, scale, error-diffusion dither from the source video directly to
a GIF:
$ avconv -i video.file -vf "crop=width:height:left:top,
scale=width:height:sws_dither=ed" output.gif

Additional filters can be chained inside the -vf argument string;
separate them with a comma; ex.:

-vf "crop=100:200:300:400, scale=50:-1:sws_dither=ed,
curves=strong_contrast"

To get better colors, crop and scale the source video to another
high-color video format first:
$ avconv -i video.file -vf "crop=width:height:left:top,
scale=width:height" video2.m4v

Then, get a palette from the video and save it to a PNG file:
$ avconv -i video2.file -vf palettegen palette.png

And convert the second video to a GIF using the palette from the PNG:
$ avconv -i video2.file -i palette.png -filter_complex paletteuse
video3.gif

--
Excerpted from:

PUBLIC NOTES (H)
http://alph.laemeur.com/txt/PUBNOTES-H
©2017 Adam C. Moore (LÆMEUR) <[email protected]>