+
Skip to content

ItsJimi/gif

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gif

go reference

🏞 The simplest way to create gif from video

Install

Install ffmpeg before running gif.

CLI

Use precompiled versions in releases page

or

go install github.com/ItsJimi/gif@latest

Code

go get -u github.com/ItsJimi/gif

Usage

CLI

Help

gif help

Convert

gif convert --help
gif convert my-video.mp4 my-gif.gif
gif convert my-video.mp4 my-gif.gif --fps 60 --scale 1280
gif convert ./folder ./another-folder --crop "1280:720:30:60"

Code

Convert from folder

package main

import (
  "fmt"
  "github.com/ItsJimi/gif/pkg/convert"
)

func main() {
  options := convert.Options{
    FPS:   30,
    Scale: -1,
    Crop:  "",
  }

  err := convert.FromFolder("./videos", "./gifs", options)
  if err != nil {
    fmt.Println(err)
  }
}

Contribute

Feel free to fork and make pull requests

License

MIT

About

🏞 The simplest way to create gif from video

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载