npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

gifcap

v1.2.2

Published

A Node.js CLI to capture screen, crop, trim and convert to GIF.

Readme

🎬 GifCap

Record your screen. Create perfect GIFs. Share everywhere.

npm version License: MIT

Created by @notraces to document his website better over the coming months. Check out 🚀 microsaastemplate.com - the perfect starting point for your next micro-SaaS project!

✨ Features

  • 🖥️ Screen recording - Capture any part of your screen
  • 🎯 Smart cropping - Remove unwanted areas (headers, sidebars, etc.)
  • Speed control - Speed up or slow down your GIFs
  • 🎨 Quality settings - From quick demos to high-quality tutorials
  • 📐 Aspect ratio preservation - Keep your content looking natural
  • 🎪 Multiple resolutions - 480p, 720p, 1080p, or custom sizes
  • Fast processing - Optimized for quick GIF creation

🚀 Quick Start

# Install globally
npm install -g gifcap

# Start recording (press CTRL+C to stop)
gifcap record

# Create a tutorial with specific settings
gifcap record -t 100 -l 55 -s 1 -e 2 -c 0 --speed=2.0 -g 720p -o tutorial.gif

# Cut the first 1 second from an existing GIF
gifcap cut demo.gif -s 1s -o cut-demo.gif

# Optimize a GIF to reduce file size
gifcap optimize large.gif --target-size=2 --fps=10 --colors=128 -o small.gif

📖 Command Options

| Option | Alias | Description | Example | |--------|-------|-------------|---------| | record | | Record screen and create GIF/MP4 | gifcap record -t 100 -l 55 | | cut | | Cut seconds from existing GIF | gifcap cut -s 1 demo.gif | | optimize | | Optimize GIF file size | gifcap optimize large.gif --target-size=2 | | --top | -t | Crop pixels from top | -t 100 | | --left | -l | Crop pixels from left | -l 55 | | --bottom | -b | Crop pixels from bottom | -b 50 | | --right | -r | Crop pixels from right | -r 50 | | --start | -s | Skip seconds from start | -s 2 | | --end | -e | Cut seconds from end | -e 5 | | --speed | | Speed multiplier | --speed=2.0 | | --gifcompression | -c | Compression level 0-100 | -c 0 | | --keep-aspect-ratio | -a | Maintain aspect ratio | --keep-aspect-ratio | | --output | -o | Output filename | -o demo.gif | | --target-size | -ts | Target file size in MB | --target-size=2 | | --fps | | Target frames per second | --fps=10 | | --colors | | Maximum number of colors (2-256) | --colors=128 | | --dither | | Dithering method | --dither=bayer | | --lossy | | Lossy compression level (0-200) (requires FFmpeg 5.0+) | --lossy=30 | | --min-resolution | -g | Minimum resolution (480p/720p/1080p/custom) | -g 480p |

🎯 Perfect Examples

📱 Quick Demo (Fast & Small)

gifcap record -g 480p --speed=1.5 -o quick-demo.gif

🎓 Tutorial (HD Quality)

gifcap record -t 80 -l 40 -s 1 -e 3 -c 0 --speed=1.2 -g 720p -o tutorial.gif

🎬 Feature Showcase (Cinematic)

gifcap record -t 120 -r 100 -s 2 -e 5 -c 0 --speed=1.0 -g 1080p -o showcase.gif

✂️ Cut Existing GIF

gifcap cut demo.gif -s 1s -o cut-demo.gif

🔄 Optimize GIF Size

# Basic optimization to target size
gifcap optimize large.gif --target-size=2 -o small.gif

# Advanced optimization with custom parameters
gifcap optimize large.gif --target-size=1 --fps=10 --colors=128 --dither=bayer --lossy=30 -o optimized.gif

Dynamic Scale Re-estimation

The optimizer now dynamically re-estimates the scaling factor after each optimization attempt based on the actual output file size. This allows for more efficient convergence to the target file size while maintaining maximum quality. The scale is recalculated using the square root of the ratio between target size and current size, rounded to the nearest 5%.

Minimum Resolution Support

You can now specify a minimum resolution threshold using the -g or --min-resolution option to prevent scaling below a set resolution. This is useful when you want to ensure your GIF maintains a certain quality level regardless of the target file size.

Supported formats:

  • Standard resolutions: 480p, 720p, 1080p
  • Custom resolution: 640x360 (width x height)

Example:

gifcap optimize input.gif -o output.gif --target-size=2 -g 720p

This ensures that even when trying to meet the target file size, the GIF will never be scaled below 720p resolution.

🌈 Beautiful CLI Experience

GifCap provides a colorful, engaging command-line experience:

$ gifcap --help

╔══════════════════════════════════════════════════════════════╗
║                                                              ║
║   🎬 GifCap Usage                                          ║
║   Record your screen and convert to optimized GIFs      ║
║                                                              ║
║   Usage: gifcap [command] [options]                     ║
║   Commands: record, cut                                  ║
║                                                              ║
╚══════════════════════════════════════════════════════════════╝

🛠️ Installation Options

📦 NPM (Recommended)

npm install -g gifcap

🏗️ From Source

git clone https://github.com/notraces/gifcap.git
cd gifcap
npm install
npm link

🐳 Docker

docker run -it --rm -v $(pwd):/output gifcap [options]

🔧 Requirements

  • 🐧 Linux (X11 display server)
  • 🎥 FFmpeg installed (required)
  • 🔄 Gifsicle (optional, for better optimization)
  • 📦 Node.js 14+

Dependencies Auto-Installation

GifCap can automatically detect missing dependencies and offer to install them:

  • When using the optimize command, it will check for required tools (FFmpeg, FFprobe)
  • If Gifsicle is not found, it will offer to install it for better optimization results
  • Requires apt-get for automatic installation (Ubuntu/Debian)

FFmpeg Version Compatibility

  • Basic optimization works with all FFmpeg versions
  • Advanced lossy compression (--lossy parameter) requires FFmpeg 5.0+
  • The tool automatically detects your FFmpeg version and offers to upgrade if needed
  • Auto-upgrade to FFmpeg 5.0+ is supported on Ubuntu/Debian systems

Manual Installation

# Ubuntu/Debian
sudo apt install ffmpeg gifsicle

# macOS
brew install ffmpeg gifsicle

# Windows (with chocolatey)
choco install ffmpeg gifsicle

🎪 Creative Use Cases

  • 📚 Documentation - Create GIF tutorials for your README
  • 🐛 Bug Reports - Record issues with precise reproduction steps
  • 🎓 Teaching - Make engaging coding tutorials
  • 💼 Portfolio - Showcase your apps in action
  • 📱 Social Media - Create shareable content for Twitter/LinkedIn
  • 🎯 Product Demos - Show off features to potential users

🌟 Pro Tips

  • 🚀 Speed up processing: Use smaller resolutions (480p) for quick tests
  • 🎯 Perfect loops: Use --start and --end to trim precisely
  • 📐 Clean captures: Crop toolbars and sidebars for focused content
  • Engaging content: Slightly increase speed (1.2x-1.5x) for better pacing
  • 💾 File size: Balance quality vs size with compression settings

📝 License

MIT © @notraces