While it is easy to embed videos in web-sites, sometimes you want the immediacy that you get an image. GIFs are the obvious answer to this "a video in an image file". Creating them is not always obvious though. There are many pieces of software that can be used. On Linux, one is gifcurry which is not bad and interestingly is written in Haskell , a sophisticated type-safe functional language. Gifcurry does suffer from a few limitations such as for long videos however. ffmpeg After some experimentation, the most reliable mechanism I've found is old faithful command-line utility ffmpeg . Once you know the correct arguments to pass, it is reliable and fast. You do it in two steps. First you extract a colour palette from the video, then you create the GIF using that palette: ffmpeg -i <Video File> . <extension> -filter_complex "[0:v] palettegen" <palette file> .png ffmpeg -i <Video File> . <extension> ...
Comments
Post a Comment