How to create a GIF motion diagram in Ubuntu 16.04

Source: Internet
Author: User
Tags imagemagick

Guide FFmpeg is an open-source audio and visual converter that uses FFmpeg to easily convert and record audio and video files, while ImageMagick is an open source software for creating, editing, and merging bitmap images.


People often in Sina meager, QQ, Facebook, Twitter to see the interesting GIF animation, GIF file smaller than the video, more vivid than the static JPG image, very suitable for the internet comedy post, product display and functional step demonstration, so this small tutorial will teach you how in Ubuntu Make and convert gifs in the 16.04 LTS desktop system. It is not difficult, just a FFmpeg Ubuntu 16.04 desktop, install the ImageMagick, tools are available (the same applies to other Linux distributions).

convert video to GIF

Let's start with a simple, first look at how to convert a video directly to a GIF motion diagram. As mentioned earlier, install FFmpeg and ImageMagick (the two tools Ubuntu official source, can be installed directly):

Apt Install ffmpeg ImageMagick
Tip: Previously introduced, after Ubuntu 16.04 release, the official has suggested using apt to replace the old Apt-get command, Ubuntu 16.04 new features and improvements can be seen before the article.

To convert a video to GIF use only the FFmpeg command, in the following format:

-xx:xx:-i input.  -Ten-VF scale  =$:-1  output. gif
    • -ss represents the starting point
    • -I followed with the video file to be manipulated
    • -to Indicates the end point of the file
    • - R frame rate, which can increase this value to output more picture-quality GIF files
    • -VF graphics filter, GIF zoom size


Parameters can be adjusted according to their own needs, the completion of the implementation of the video after the successful conversion to GIF.

Merging multiple GIF files merging multiple GIF files

If you want to merge multiple gifs into a single file It is also very simple to save the merged files to the same folder, and then execute the following command:

 -0 *. gif Output . gif
create a GIF motion diagram from a JPG image sequence

If you have a static JPG image sequence, you can easily generate animated gifs in Linux without having to use artifacts like Photoshop in Windows. First put all the JPG in the same folder, and then execute the following command in the terminal:

 -0 *. jpg Linux . gif
    • -delay GIF animation speed
    • -loop 0 means infinite loop

Free to provide the latest Linux technology tutorials Books, for open-source technology enthusiasts to do more and better: http://www.linuxprobe.com/

How to create a GIF motion diagram in Ubuntu 16.04

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: info-contact@alibabacloud.com 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.