Ubuntu16.04 Create a tutorial on GIF motion diagrams

Source: Internet
Author: User
Tags imagemagick

It's not hard, just install the FFmpeg Ubuntu 16.04 desktop side, install the ImageMagick, and the tools are available (same for other Linux distributions).

FFmpeg is an open source audio, visual converter, using FFmpeg we can easily convert and record audio and video files, and ImageMagick is a create, edit and merge bitmap images of an open source software.

Convert Video to GIF

Let's start with a simple, first look at how the video directly converted to GIF motion diagram. As previously stated, first install FFmpeg and ImageMagick (these two tools are available in Ubuntu official source, can be installed directly):

Apt Install ffmpeg ImageMagick

Tip: After the release of Ubuntu 16.04, 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 the video to GIF use only the FFmpeg command, in the following format:

Ffmpeg-ss 00:00:20-i input.mp4-to 10-r 10-vf scale=200:-1

-SS represents the starting point

-I followed by the video file to be manipulated

-to indicates the end point of a file

-R frame rate, you can increase this value output better quality GIF files

-VF graphics filter, GIF zoom size

Parameters can be adjusted according to their own needs, after the completion of the video successfully converted to GIF.

Merging multiple GIF files

If you want to combine multiple gifs into a single file, you can simply save the merged files to the same folder, and then execute the following command:

Convert-delay 120-loop 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 such as Photoshop in Windows. First put all JPG in the same folder, and then execute the following command in the terminal:

Convert-delay 120-loop 0 *.jpg linux.gif

-delay 120 indicates the speed of GIF animation

-loop 0 represents an infinite loop

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.