Skip to content

Latest commit

 

History

History

mp42gif

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Script to convert MP4 file to GIF (via ffmpeg)

It creates intermediate custom color palette out of input video file and use it for resulting GIF for better picture quality.

For more info see next articles (with examples):

Obtaining sources

If you want download only this folder (mp42gif), you must execute next command:

svn checkout https://github.com/troyane/StackOverflow-pro/trunk/mp42gif

Script usage

Make script executable chmod +x mp42gif.sh.

Use script with next parameters:

-i|--input   Input MP4 file. 
-f|--fps     FPS frame per second rate as a number. Default FPS=20.
-h|--height  Height value as a number. Script will scale input picture height to given number. 
                        Default Height=512. Width will be calculated proportionally.
-o|--output  Output GIF file. Default Name=output.gif.
--help       Show this usage info.

Example usage

Convert file 1.mp4 using default values:

mp42gif.sh -i 1.mp4

This will create output.gif.