Turn any video into a perfectly optimized GIF.
MakeGIF is a command-line tool that makes it easy to create high-quality GIFs from video files. It comes with a beautiful interactive interface, automatic black bar removal, and smart optimization to keep file sizes small.
curl -sSL https://raw.githubusercontent.com/dissidentcode/makegif/master/install.sh | bashThis will download MakeGIF, add it to your shell, and offer to install any missing dependencies.
- Interactive TUI - A guided step-by-step interface (powered by gum) that walks you through every option
- High & Low Quality Modes - High quality uses advanced palette generation for better colors; low quality is faster and smaller
- Auto Black Bar Removal - Automatically detects and removes letterbox bars from widescreen videos
- Square Crop - Crop GIFs to square for social media with customizable alignment
- Smart Optimization - Uses gifsicle to compress GIFs without losing quality
- Flexible Time Input - Enter times as
10,1:30, or01:30:45— whatever's easiest - Works Everywhere - macOS and Linux with bash or zsh
MakeGIF has three ways to run:
Just type makegif with no arguments. You'll get a beautiful interface that guides you through each step:
makegifThe TUI lets you browse for video files, preview your settings, and go back to change options before creating your GIF.
Pass all your options directly:
makegif video.mp4 0:30 5 output.gif highThis creates a 5-second GIF starting at 30 seconds into the video, using high quality mode.
makegif <video> <start> <duration> <output.gif> [quality] [width] [fps] [colors] [remove_bars] [square]| Parameter | Required | Default | Description |
|---|---|---|---|
video |
Yes | - | Path to your video file (MP4, MOV, MKV, AVI, WebM, etc.) |
start |
Yes | - | Start time (10, 1:30, or 01:30:45) |
duration |
Yes | - | How long the GIF should be |
output.gif |
Yes | - | Output filename (must end in .gif) |
quality |
No | low |
high for better colors, low for faster/smaller |
width |
No | 640 |
Output width in pixels (32-7680) |
fps |
No | 10 |
Frames per second (1-60) |
colors |
No | 256 |
Color palette size (2-256). Lower = smaller files |
remove_bars |
No | no |
yes to auto-remove black bars |
square |
No | no |
yes to crop to square aspect ratio |
Basic GIF from a video:
makegif movie.mp4 1:23:45 3 reaction.gifHigh quality, smaller size:
makegif clip.mov 0 10 demo.gif high 480 15 128Remove letterbox bars:
makegif widescreen.mp4 5:00 8 scene.gif low 640 10 256 yesSquare crop for Instagram:
# First create the GIF
makegif video.mp4 0:15 4 post.gif high
# Then crop it square (center-aligned)
squaregif post.gif post-square.gif centerThe squaregif command lets you choose which part to keep:
squaregif <input.gif> <output.gif> [alignment]Alignment options: left, right, center (default), top, bottom
GIFs can get large. Here's how to keep them small:
- Lower the width -
480or320instead of640 - Reduce colors -
64or128colors still look good and save a lot of space - Lower FPS -
8or10fps is usually smooth enough - Shorter duration - Every second adds frames
MakeGIF needs these tools installed:
- ffmpeg - Does the actual video processing
- gifsicle - Optimizes the final GIF
- gum (optional) - Powers the pretty TUI interface
The install script will offer to install these for you. If you prefer to install manually:
# macOS
brew install ffmpeg gifsicle gum
# Ubuntu/Debian
sudo apt install ffmpeg gifsicle
# For gum: https://github.com/charmbracelet/gum#installation
# Fedora
sudo dnf install ffmpeg gifsicleIf you prefer not to use the install script:
- Download
makegif.shfrom this repo - Add this line to your
~/.zshrcor~/.bashrc:
source /path/to/makegif.sh- Restart your terminal or run
source ~/.zshrc
"command not found: makegif"
- Make sure you've sourced the script in your shell config
- Try opening a new terminal window
GIF is too large
- Reduce width, colors, or fps (see "Reducing File Size" above)
Colors look bad
- Use
highquality mode for better color accuracy - Increase the color count (up to 256)
Black bars still showing
- Try
yesfor theremove_barsoption - The detection works best with solid black bars
Contributions welcome! Feel free to open issues or submit pull requests.