How to convert a video or image into a GIF in linux?
Convert your images or videos to GIFs with the Rust Gifski tool.
2 min read
Table of contents
Gifski is a highest-quality GIF encoder rust-based CLI Tool that helps to convert your image or video into a gif convert. Gifski CLI is based on FFmpeg.
The Gifski tool is only available to install with Cargo and Debian. For Another operating system, you can build directly from the source.
Install with Cargo
You can install the gifski tool with Cargo, With the following command. But Cargo cli only helps fully when you work with Cargo, and you need a
Cargo.toml file. But you do not install gifski cli globally with Cargo.
cargo install gifskicopy success
Install with Debian
You can install the Debian package with Cargo with the following command. It is the best way to install gifski cli.
- Download the
.debfile from gifski GitHub repository.
- Install the
.debfile with the
wget https://github.com/ImageOptim/gifski/releases/download/1.10.0/gifski_1.10.0_amd64.deb sudo dpkg -i gifski_1.10.0_amd64.debcopy success
After completing the installation successfully, you can run the gifski with the terminal.
Why do we use Gifski?
FFmpeg is the best tool for image manipulation. You convert the image to GIFs, compress the GIF, video, zip, etc. Gifski CLI is a small Cli, and it provides the most useful feature, and you do not need to spend time learning. Another hand FFmpeg CLI takes too much time to learn, and it is too complicated for beginners.
How to use Gifski?
Gifski is a lot easier as compared to FFmpeg. You do not need to spend time. You can learn gifski with the following command.
gifski --fps 22 --quality 40 --width 1224 --height 624 --output testing.gif minimalist-video.webmcopy success
--outputA destination where we store the file ( --output my.gif )
--fpsThe animation frame rate to create the GIFs ( default: 20 )
--qualityLower quality may give a smaller files size ( default: 90 )
--widthAdding width for gif ( default 800x600 )
--heightAdding height for gif ( default 800x600 )
--quietHide the standard output/console in terminal
gifski --helpPrint help
gifski --versionPrint version
FFmpeg features a rich library for image manipulation as compared to Gifski. Gifski is a small and easy-to-use library. The downside of gifski cli is only works with the GIF encoder. You can not compress the Gifs.