diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 9a101cc..aaf5631 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -6,7 +6,7 @@ }, "metadata": { "description": "Production-grade Agent Skills from Evil Martians", - "version": "1.0.0" + "version": "1.0.1" }, "plugins": [ { @@ -22,7 +22,9 @@ "geo", "ai-crawlers" ], - "skills": ["./skills/llms-visibility"] + "skills": [ + "./skills/llms-visibility" + ] }, { "name": "good-readme", @@ -36,7 +38,9 @@ "open-source", "technical-writing" ], - "skills": ["./skills/good-readme"] + "skills": [ + "./skills/good-readme" + ] }, { "name": "secure-npm-package", @@ -51,7 +55,9 @@ "provenance", "github-actions" ], - "skills": ["./skills/secure-npm-package"] + "skills": [ + "./skills/secure-npm-package" + ] }, { "name": "skills-visibility", @@ -66,7 +72,9 @@ "distribution", "packaging" ], - "skills": ["./skills/skills-visibility"] + "skills": [ + "./skills/skills-visibility" + ] }, { "name": "tailwind-best-practices", @@ -79,7 +87,9 @@ "css", "dx" ], - "skills": ["./skills/tailwind-best-practices"] + "skills": [ + "./skills/tailwind-best-practices" + ] }, { "name": "web-video", @@ -94,8 +104,9 @@ "performance", "transparency" ], - "skills": ["./skills/web-video"] + "skills": [ + "./skills/web-video" + ] } ] -} - +} \ No newline at end of file diff --git a/skills/web-video/SKILL.md b/skills/web-video/SKILL.md index 231cb83..7d3d5ab 100644 --- a/skills/web-video/SKILL.md +++ b/skills/web-video/SKILL.md @@ -26,6 +26,16 @@ Some options are worth suggesting when the request implies them. Say why when yo - **`--fps 30`** for a 60fps screencast of a slow UI, which drops half the frames with little visible loss. - **`--fast`** for a draft. It keeps the quality settings but switches to quicker encoder presets, so the encode finishes several times sooner and the files come out bigger. Use it to check timing or framing, then encode again without it. +**Project defaults** go in a `.web-video` file at the root of the project's git repository. When the user states a preference for every video ("we don't ship HEVC", "covers never have sound"), offer to save it there instead of repeating it each run: + +```bash +# AV1 and H.264 only; transparent video still gets VP9 and HEVC +--opaque-formats av1,h264 +--no-audio +``` + +The script prints the defaults it picked up, and options on the command line override them. Use `--opaque-formats` here rather than `--formats`: that one applies to transparent video too, so the first transparent video would fail. Run the script from inside the project: it looks for the file from the current directory, not from the video's location, and resolves a relative `--output-dir` the same way. + **Encoding is slow on purpose.** At the defaults, expect minutes per minute of 1080p video, most of it AV1. Run the script in the background or with the longest timeout your tools allow, and don't kill it for going quiet: when its output isn't a terminal, it reports progress every 30 seconds. It takes one video per run. For several, run them one after another, since each encode already uses every core. **The script checks its requirements before encoding anything** and names what's missing: ffmpeg with SVT-AV1, x265, x264, and libvpx-vp9, plus macOS `avconvert` for HEVC with alpha. Relay that message. On macOS, `brew install ffmpeg` has every encoder. Elsewhere, a transparent video can only get VP9 (`--formats vp9`): tell the user Safari needs the HEVC file to show transparency and that it has to be encoded on a Mac. diff --git a/skills/web-video/scripts/web-video.sh b/skills/web-video/scripts/web-video.sh index 7cab14b..33147b1 100755 --- a/skills/web-video/scripts/web-video.sh +++ b/skills/web-video/scripts/web-video.sh @@ -17,6 +17,11 @@ VP9_CRF=30 # SVT-AV1 logs on its own, past -loglevel: keep only its errors. export SVT_LOG=1 +# Every scale and pixel format conversion: Lanczos keeps downscaled text and UI +# edges sharp where the default bicubic blurs them; chroma from every pixel; +# exact rounding. +sws=(-sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp) + # In a terminal, progress redraws in place twice a second. Piped to an agent or # a log, every redraw is another line, so report every 30 seconds instead. if [[ -t 2 ]]; then @@ -34,7 +39,7 @@ usage() { Usage: $(basename "$0") [options]