Skip to content

A lightweight Go CLI tool that converts MOV videos to optimized GIFs with customizable settings, powered by ffmpeg.

Notifications You must be signed in to change notification settings

Lazhari/mov2gif

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

mov2gif

A simple command-line utility to convert MOV videos to GIF format without dealing with complex ffmpeg commands directly.

Requirements

  • Go 1.x installed on your system
  • ffmpeg installed on your system (required for video processing)

Installation

  1. Install ffmpeg first (if not already installed):
# For macOS (using Homebrew)
brew install ffmpeg

# For Linux (using apt)
sudo apt-get install ffmpeg

# For Windows (using Chocolatey)
choco install ffmpeg
  1. Clone this repository And install the mov2gif utility:
git clone https://github.com/Lazhari/mov2gif.git
cd mov2gif
go install .

Usage

mov2gif <input.mov> <output.gif> [fps] [width]

Parameters:

  • input.mov : Path to your input MOV file
  • output.gif : Desired output GIF file path
  • fps : (Optional) Frames per second for the output GIF (default: 10)
  • width : (Optional) Width of the output GIF in pixels (default: 480)

How It Works

This utility simplifies the process of converting MOV files to GIF format by:

  1. Generating an optimized color palette for better GIF quality
  2. Converting the video using the generated palette
  3. Automatically handling proper scaling and frame rate The tool uses ffmpeg under the hood but provides a simpler interface for quick conversions.

Notes

  • The height of the output GIF is automatically calculated to maintain the aspect ratio
  • The tool uses the lanczos scaling algorithm for better quality
  • A temporary palette file is created during conversion and automatically cleaned up

About

A lightweight Go CLI tool that converts MOV videos to optimized GIFs with customizable settings, powered by ffmpeg.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages