How to Create GIF dynamic images in Ubuntu 16.04

Source: Internet
Author: User
Tags image filter imagemagick

How to Create GIF dynamic images in Ubuntu 16.04

We often see interesting GIF animations in Sina's meager images, QQ, facebook, and twitter. GIF files are smaller than videos and more vivid than static JPG images, this tutorial is applicable to funny posts, product presentations, and functional steps on the Internet. It will teach you how to create and convert GIF images in the Ubuntu 16.04 LTS desktop system.

In fact, it is not difficult. You only need to install FFmpeg on the Ubuntu 16.04 desktop and then ImageMagick. The tool is ready (also applicable to other Linux distributions ).

FFmpeg is an open-source Audio and Video Converter. With FFmpeg, we can easily convert and record audio and video files, imageMagick is an open source software used to create, edit, and merge bitmap images.

Convert video to GIF

Let's start with a simple process. Let's first look at how to convert a video to a GIF animation. As described above, install FFmpeg and ImageMagick first (these two tools are available in official Ubuntu sources and can be directly installed ):

apt install ffmpeg imagemagick

TIPS: I have already mentioned that after the release of Ubuntu 16.04, it is recommended that you replace the old apt-get command with apt. For new features and improvements of Ubuntu 16.04, see the previous article.

To convert a video to GIF, use only the ffmpeg command. The format is as follows:

ffmpeg -ss 00:00:20-i input.mp4 -to 10-r 10-vf scale=200:-1 output.gif
  • -Ss indicates the start point.
  • -I: the video file to be operated.
  • -To indicates the file termination point.
  • -R frame rate. You can increase this value to output GIF files with better image quality.
  • -Vf image filter: zooming GIF size

You can adjust the parameters according to your needs. After execution, the video is successfully converted to GIF.

Merge multiple GIF files

To Merge multiple GIF files into one file, you only need to save the files to be merged to the same folder, and then execute the following command:

convert -delay 120-loop 0*.gif output.gif
Create GIF animation from jpg image sequence

If you have a static jpg image sequence, you can also easily generate dynamic GIF images in Linux without using artifacts like Photoshop in Windows. Put all JPG files in the same folder, and then execute the following command on the terminal:

convert -delay 120-loop 0*.jpg linux.gif
  • -Delay 120 indicates the GIF animation speed
  • -Loop 0 indicates an infinite loop

Check for new features and improvements worth noting in Ubuntu 16.04 LTS

Upgrade Ubuntu 15.10 To Ubuntu 16.04

Install Lua game engine in Ubuntu 16.04

Ubuntu 16.04 requires your help to make GNOME Software more beautiful

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.