19 C
Jaipur
Wednesday, October 28, 2020

How to Convert Video to GIF in Linux [Terminal and GUI Way]

Must read

Earphones from Xiaomi, Realme, Philips and others you can purchase under Rs 599 in Amazon sale

Earphones from Xiaomi, Realme, Philips and others you can purchase under Rs 599 in Amazon sale Source link

Here’s how many iPhones are may be active in the world

It’s been over 13 years since the Apple iPhone first went on sale and pardon the cliche but it has been a...

Best Tools to Create a Bootable Linux USB Drive

Bootable USB is a USB drive that is used to boot up a computer or laptop for installation on an operating system.Unlike Windows, Linux...

Samsung Galaxy S21 May Ditch Bundled Earphones And Charger Like Apple

A few weeks ago, Apple made headlines after announcing that the iPhone 12 won’t ship with a charger or a pair of earphones. And now it...

Animated GIFs are everywhere on the internet. From blog posts to social media, GIFs can be used in a humorous as well as explanatory way.

Even on It’s FOSS, we use GIFs to show a certain step in action. It is better than still images and shorter than loading a video.

In this tutorial, I will show you how to convert a video clip to GIF. I’ll discuss both:

  • Command line way to convert video to GIF
  • GUI tool for converting video to GIF

Method 1: Create GIF from Video using ffmpeg in command line

FFmpeg is a video and audio converter that can also grab from a live audio/video source. It can also resize video on the fly without compromising the quality.

FFmpeg is a powerful tool and can be used for various scenarios, if you are curious here is the official documentation. We also have a good collection of ffmpge usage examples.

In this example, I will use the Linux Mint 20 new feature presentation video. I downloaded the video from YouTube using youtube-dl and then I trimmed the video to get the first 5 seconds.

Make sure to install ffmpeg using your distribution’s package manager:

sudo apt install ffmpeg

Once you have selected the video that you want to convert, open your terminal and change directory where your video is saved. Below is a general principle, where input is the actual name of the video, following by the video format and the name that you want your gif to be.

The output name can be something totally different to the input name, but I tend to use something similar, as it helps to identify it when you have a folder full of files.

ffmpeg -i input_video_file output.gif
use ffmpeg to convert videos to gif

Press the enter key to execute the command and your gif will be ready shortly.

Converting video to gif using ffmpeg command line tool in Linux

You should find the GIF file in the same folder as your video file unless you specified some other path for the output file).

Video converted to GIF

Method 2: Converting video to GIF using Gifcurry GUI application

Gifcurry is an open-source, easy-to-use app GIF maker app.

It uses ffmpeg and imagemagick to process video and convert to GIF. It can be used both in command-line and the graphical user interface, although this tutorial will only cover the GUI part.

It can be installed using snap and other package managers, but I recommend using the AppImage because I found some issue with other packages.

Before you attempt to open gifcurry, you need to make sure that the required dependencies are already installed.

Open and use gifcurry

To make an Appimage executable is very straight forward and you grant the permission at the file properties as following:

Run Gifcurry tool

When you open Gifcurry you will be prompted to navigate to the file that you want to convert and at this example I will use again the initial video. As ffmpeg, Gifcurry is not limited to purely converting videos to gif and vice versa. Some of the features are listed.

A few other Gifcurry Features

  • Add text to gif
  • Choose starting time
  • Set duration
  • Adjust gif width 
  • Adjust Quality
Using Gifcurry to convert video to Gif in Linux

At the last step, you have to choose the file name, the file format and click save.

Using Gifcurry to convert video to Gif in Linux

The final result is here:

Gifcurry

Conclusion

If you are recording your screen in Linux, you may use Peek to record it a gif instead of a video instead of converting the video to gif later.

Either you choose the command line or the graphical user interface, your job will get done lightning fast both ways.

Let me know which way you prefer and feel free to request any further explanation at the comments section.

Source link

- Advertisement -

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

Earphones from Xiaomi, Realme, Philips and others you can purchase under Rs 599 in Amazon sale

Earphones from Xiaomi, Realme, Philips and others you can purchase under Rs 599 in Amazon sale Source link

Here’s how many iPhones are may be active in the world

It’s been over 13 years since the Apple iPhone first went on sale and pardon the cliche but it has been a...

Best Tools to Create a Bootable Linux USB Drive

Bootable USB is a USB drive that is used to boot up a computer or laptop for installation on an operating system.Unlike Windows, Linux...

Samsung Galaxy S21 May Ditch Bundled Earphones And Charger Like Apple

A few weeks ago, Apple made headlines after announcing that the iPhone 12 won’t ship with a charger or a pair of earphones. And now it...

China launches crackdown on mobile web browsers, decries ‘chaos’ of information – Latest News

China's top cyber authority said it would carry out a "rectification" of Chinese mobile internet browsers to address what it called social concerns over...