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

gifvid

v0.1.1

Published

Local-first CLI for turning online videos and local files into size-constrained GIFs.

Readme

gifvid

gifvid is a local-first CLI for turning a URL or local media file into a size-constrained GIF, MP4, or WebM that is actually usable in Slack, docs, and the web.

The product shape is simple:

  1. bring in a video source
  2. pick the exact clip window that matters
  3. export something that fits where you need to send it

gifvid starts with the reliable primitives that already work on a real machine:

  • yt-dlp for URL-based ingestion
  • ffmpeg and ffprobe for clipping and rendering
  • optional Cloudflare R2 upload for sharing

Requirements

  • Node.js 20+
  • ffmpeg
  • ffprobe
  • yt-dlp for URL inputs

On macOS with Homebrew:

brew install ffmpeg yt-dlp

Install

Run without installing globally:

npx gifvid --help

Install globally:

npm install -g gifvid

With pnpm:

pnpm dlx gifvid --help

Quick Start

Inspect a source:

npx gifvid inspect "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

Make a Slack-sized GIF from a URL:

npx gifvid make "https://www.youtube.com/watch?v=dQw4w9WgXcQ" \
  --start 0:42 \
  --duration 4 \
  --preset slack

Make a GIF from a local file with a hard size budget:

npx gifvid make ./clip.mp4 \
  --start 1:03 \
  --end 1:07 \
  --preset web \
  --max-bytes 3mb

Generate GIF, MP4, and WebM plus a manifest:

npx gifvid make ./clip.mp4 \
  --start 1:03 \
  --duration 4 \
  --preset slack \
  --format all

If a URL host requires a real browser session, let yt-dlp read local cookies:

npx gifvid make "https://www.youtube.com/watch?v=..." \
  --browser chrome \
  --start 0:15 \
  --duration 3

Commands

gifvid inspect <input>

Shows source metadata and rough preset estimates.

Useful flags:

  • --browser <profile> for URL sources that need browser cookies
  • --json for structured output

gifvid make <input>

Generates a clip asset from a URL or local media file.

Required:

  • --start <time>

Choose one:

  • --end <time>
  • --duration <time>

Optional:

  • --preset <slack|web|tiny|hq>
  • --format <gif|mp4|webm|all>
  • --width <pixels>
  • --fps <frames>
  • --colors <count>
  • --max-bytes <value>
  • --browser <profile>
  • --output-dir <path>
  • --name <basename>
  • --publish
  • --json

Every make run writes a sidecar manifest:

<basename>.manifest.json

When --format all is used, the command emits:

  • <basename>.gif
  • <basename>.mp4
  • <basename>.webm
  • <basename>.manifest.json

gifvid publish <file>

Uploads an existing asset to Cloudflare R2.

Optional:

  • --key <bucket/key.gif>
  • --json

Cloudflare R2

Publishing is optional and env-driven.

Required env vars:

GIFVID_R2_ACCOUNT_ID=...
GIFVID_R2_ACCESS_KEY_ID=...
GIFVID_R2_SECRET_ACCESS_KEY=...
GIFVID_R2_BUCKET=...

Optional:

GIFVID_R2_PUBLIC_BASE_URL=https://cdn.example.com/
GIFVID_R2_KEY_PREFIX=gifs

If GIFVID_R2_PUBLIC_BASE_URL is set, gifvid returns a shareable public URL after upload.

Presets

  • tiny: low-friction reaction GIFs
  • slack: default preset for chat usage
  • web: bigger embed-friendly GIFs
  • hq: highest-quality GIF master before you need a tighter byte budget

Each preset defines:

  • a default clip length
  • a max clip length
  • a starting width, fps, and color count
  • a default byte target

If the first GIF render is too large, gifvid iterates downward on palette, fps, and width until it lands under budget or returns the smallest viable result.

Notes

  • URL reliability is only as good as the local yt-dlp setup and the target site's defenses.
  • GIF is the compatibility format. MP4 and WebM are often the better output.
  • You are responsible for respecting source platform terms and any copyright or licensing constraints.

Repository

Source, docs, and the public site live at:

github.com/danielgwilson/gifvid

If you are working from the repo itself instead of the published package, the workspace root exposes:

pnpm cli make ...