https://github.com/itsjimi/gif
🏞 The simplest way to create gif from video
https://github.com/itsjimi/gif
cli gif go
Last synced: about 1 year ago
JSON representation
🏞 The simplest way to create gif from video
- Host: GitHub
- URL: https://github.com/itsjimi/gif
- Owner: ItsJimi
- License: mit
- Created: 2017-12-03T11:05:45.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2025-01-30T13:44:04.000Z (over 1 year ago)
- Last Synced: 2025-03-29T12:30:32.750Z (about 1 year ago)
- Topics: cli, gif, go
- Language: Go
- Homepage:
- Size: 18.6 KB
- Stars: 17
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gif
[](https://pkg.go.dev/github.com/ItsJimi/gif/pkg/convert)
🏞 The simplest way to create gif from video
## Install
Install [ffmpeg](https://ffmpeg.org/) before running `gif`.
### CLI
Use precompiled versions in [releases page](https://github.com/ItsJimi/gif/releases)
or
```shell
go install github.com/ItsJimi/gif@latest
```
### Code
```shell
go get -u github.com/ItsJimi/gif
```
## Usage
### CLI
#### Help
```shell
gif help
```
#### Convert
```shell
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
```go
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](https://github.com/ItsJimi/gif/blob/master/LICENSE)