mediasnacks
v0.24.0
Published
Utilities for optimizing and preparing videos and images
Downloads
2,520
Readme
mediasnacks
Utilities video and images.
Install
FFmpeg and Node.js must be installed.
npm install -g mediasnacksOptionally, if you have ignore-scripts=true in your .npmprc,
you can install zsh auto-completions with:
$(npm root -g)/mediasnacks/install-zsh-completions.jsOverview
mediasnacks <command> <args>Commands
avifConverts images to AVIFpngOptimizes PNG images with oxipngsqcropSquare crops imagesresizeResizes videos or imagesedgespicExtracts first and last framesssimComputes similarity of two imagesgif: Video to GIFdetectdupsDetects sequentially duplicate frames in a videodropdupsRemoves sequentially duplicate frames in a videoframediff: Plays a video of adjacent frames diffhev1tohvc1: Fixes video thumbnails not rendering in macOS Findermoov2frontRearranges .mov and .mp4 metadata for fast-start streamingvconcat: Concatenates videosvdiff: Plays a video with the difference of two videosvsplit: Splits a video into multiple clips from CSV timestampsvtrim: Trims video from start to end timeprores: Converts video to Apple ProResflattendir: Moves unique files to the top dir and deletes empty dirsqdirSequentially runs all *.sh files in a folderseqcheckFinds missing sequence numberrandomOpens a random fileplayPlays filtered playlist with mpvdlaudio: yt-dlp best audiodlvideo: yt-dlp best videounemoji: Removes emojis from filenamesrmcover: Removes cover art
Globs
Glob patterns are expanded by Node.js.
mediasnacks avif file[234].png
# Expands to: file2.png, file3.png, file4.pngmediasnacks avif -- file[234].png
# Literal filename: "file[234].png"Adding a macOS Quick Action

For example, for dropdups -n2 file.mov
- Open Automator
- Select: Quick Action
- Workflow receives current:
movie filesinFinder.app - Action:
Run Shell Script
export PATH="/opt/homebrew/bin:/opt/homebrew/opt/node@24/bin"
for f in "$@"; do
$HOME/bin/mediasnacks dropdups -n2 "$f"
doneIt will be saved to ~/Library/Services
