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

mediasnacks

v0.16.3

Published

Utilities for optimizing and preparing videos and images for the web

Readme

mediasnacks

Utilities optimizing and preparing video and images for the web.

Overview

FFmpeg and Node.js must be installed.

npx mediasnacks <command> <args>

Commands

  • avif Converts images to AVIF

  • sqcrop Square crops images

  • resize Resizes videos or images

  • edgespic Extracts first and last frames

  • gif: Video to GIF

  • dropdups Removes duplicate frames in a video

  • framediff: Plays a video of adjacent frames diff

  • hev1tohvc1: Fixes video thumbnails not rendering in macOS Finder

  • moov2front Rearranges .mov and .mp4 metadata for fast-start streaming

  • vconcat: Concatenates videos

  • vdiff: Plays a video with the difference of two videos

  • vsplit: Splits a video into multiple clips from CSV timestamps

  • vtrim: Trims video from start to end time

  • flattendir: Moves unique files to the top dir and deletes empty dirs

  • qdir Sequentially runs all *.sh files in a folder

  • seqcheck Finds missing sequence number

  • dlaudio: yt-dlp best audio

  • dlvideo: yt-dlp best video

  • unemoji: Removes emojis from filenames

  • rmcover: Removes cover art

  • curltime: Measures request response timings

Globs

Glob patterns are expanded by Node.js.

mediasnacks avif file[234].png
# Expands to: file2.png, file3.png, file4.png
mediasnacks avif -- file[234].png
# Literal filename: "file[234].png"

Commands

Converting Images to AVIF

mediasnacks avif [-y | --overwrite] [--output-dir=<dir>] <images> 

Resizing Images or Videos

Resizes videos and images. The aspect ratio is preserved when only one dimension is specified.

--width and --height are -2 by default:

  • -1 auto-compute while preserving the aspect ratio (may result in an odd number)
  • -2 same as -1 but rounds to the nearest even number
mediasnacks resize [--width=<num>] [--height=<num>] [-y | --overwrite] [--output-dir=<dir>] <files>

Example: Overwrites the input file (-y)

mediasnacks resize -y --width 480 'dir-a/**/*.png' 'dir-b/**/*.mp4'

Example: Output directory (-o)

mediasnacks resize --height 240 --output-dir /tmp/out video.mov

Fast-Start Streaming Video

Rearranges .mov and .mp4 metadata to the start of the file for fast-start streaming.

Files are overwritten

mediasnacks moov2front <videos>

What is Fast Start?

  • https://wiki.avblocks.com/avblocks-for-cpp/muxer-parameters/mp4
  • https://trac.ffmpeg.org/wiki/HowToCheckIfFaststartIsEnabledForPlayback

Adding a macOS Quick Action

For example, for dropdups -n2 file.mov

  • Open Automator
  • Select: Quick Action
  • Workflow receives current: movie files in Finder.app
  • Action: Run Shell Script
export PATH="/opt/homebrew/bin"
for f in "$@"; do
  $HOME/bin/mediasnacks dropdups -n2 "$f"
done

It will be saved to ~/Library/Services