GithubHelp home page GithubHelp logo

viniciusgerevini / video2gif Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 1.0 37 KB

a dockerised helper for converting video to gif using ffmpeg and gifsicle.

License: MIT License

Dockerfile 1.68% Shell 98.32%
gif-creator ffmpeg gifsicle docker gifs video-to-animated-gif

video2gif's Introduction

video2gif

a dockerised helper for converting videos to gif using ffmpeg and gifsicle.

Command options

video2gif [OPTIONS] [input file]


-s, --size         size. e.g 600x400. Default: same as video size
-o, --output       output file name. Default: [input].gif.
-i, --input        input file.
-ts, --start-time  time position from video to start gif. Seconds or HH:mm:ss. Default: start of the video
-te, --end-time    time position from video to stop gif. Seconds or HH:mm:ss. Default: end of the video
-h, --help         print help message.
-v, --version      print version.
-d, --gif-frame-duration   delay/duration of each Gif frame in hundredths of a second. Default: 3.
-fr, --video-frame-rate    video frame rate. Less frames generate smaller gifs. Used by ffmpeg. Default: 10.

Note:

-s, -fr, -ts and -te are used by ffmpeg, possible values on: [https://ffmpeg.org/ffmpeg.html#toc-Video-Options]

-d is used by gifsicle, possible values on: [https://www.lcdf.org/gifsicle/man.html]

Installation and usage

To install or update video2gif use cURL or Wget:

cURL

# bash
curl -o- https://raw.githubusercontent.com/viniciusgerevini/video2gif/1.2.2/install.sh | bash

# zsh
curl -o- https://raw.githubusercontent.com/viniciusgerevini/video2gif/1.2.2/install.sh | zsh

Wget:

# bash
wget -qO- https://raw.githubusercontent.com/viniciusgerevini/video2gif/1.2.2/install.sh | bash

# zsh
wget -qO- https://raw.githubusercontent.com/viniciusgerevini/video2gif/1.2.2/install.sh | zsh

This script will install and add a video2gif alias to your profile configuration.

video2gif will try to use your local ffmpeg and gifsicle if installed, otherwise it will download the proper docker image on the first run.

video2gif --help

Examples:

creates gif from 2:45 to 3:00

video2gif --starting-time 2:45 --end-time 3:00 input.mov
#or
video2gif -ts 2:45 -te 3:00 input.mov

create gif with size of 300x100

video2gif -s 300x100 input.mpeg

create gif with less frames (as a side effect you get smaller file size)

video2gif -fr 5 input.mov

video2gif's People

Contributors

viniciusgerevini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

gparlakov

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.