web-video
Optimize video for the web
This skill is built by Evil Martians, an American design and engineering consultancy for developer tools, AI, and cybersecurity startups.
Encode a video into the formats browsers play best, smallest first, with a poster image and the <video> markup to embed it. Companion to https://evilmartians.com/chronicles/better-web-video-with-av1-codec.
Every encoding setting lives in scripts/web-video.sh next to this file. Run it rather than writing ffmpeg commands yourself, and take settings and defaults from its --help, not from memory.
Running the script
bash <skill-dir>/scripts/web-video.sh [options] <video>
<skill-dir> is the directory this SKILL.md is in. Read --help before the first encode, then map the user's words onto its options: "at 2x speed" is --speed 2, "put them in public/media" is --output-dir public/media, "skip AV1" is --formats hevc,h264.
Some options are worth suggesting when the request implies them. Say why when you do: