You can combine multiple GIF using: gifsicle in1.gif in2.gif in3.gif > output.gif gifsicle input.gif "#8-45" -resize 720x360 -o output.gif -O3 The following command creates an output.gif using frames 8-45 from the input gif and resizes down to 720×360. To do this I use the gifsicle command-line tool, available in package repositories. One task I’ll often want to do is to remove a couple frames from the beginning or end. Once installed, use gifski like so: gifski -fps 12 -width 720 -o output.gif input.mp4 Edit You can then clone the Gifski repo and build using: cargo build -release -features=video On Ubuntu 21.04, I used: apt install clang libclang-dev libavutil-dev libavformat-dev libavfilter-dev libavdevice-dev Gifski is written in Rust and requires a Rust enviornment to build, plus you’ll need to install the following packages. Once setup this is much easier to use and produces great results but can be a little trickier to setup. The second method to convert a mpg4 to animated gif is to use the gifski utility. ffmpeg -i input.mp4 -i palette.png -filter_complex "fps=12,scale=720:-1:flags=lanczos paletteuse" output.gif Convert movie to GIF using gifski The second command then uses that palette to create the GIF, in the example below I set the scale to 720px and frames per second to 12, adjust to match your goals. ffmpeg -i input.mp4 -filter_complex " palettegen" palette.png Using ffmpegg is a two step process, first you need to create a palette file for the colors. The two ways I use to convert a movie file to an animated gif are ffmpeg and gifski. It is also in most distro package repositories so readily available. Captureįor capturing the screen, I use the Peek utility. Unfortunately, it is only availalble on Windows.įor Linux, I use a couple of different tools to work with GIFs. It is the only app I know that shows you every frame captured and allows editing them directly before saving. It is quite useful to haveįor Windows 10, the ScreenToGif app is excellent. I use animated GIFs for various screenshots to highlight bugs or demonstrate features. A few resources and snippets for working with animated GIFs on Linux.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |