wp-cinematic-encode

wp-cinematic-encode is a command for Claude Code from yojahny55/claude-wp-builder. It costs 84 tokens per session (1,101 once invoked), scanned B, original, MIT.

A video-encoding command for websites with scroll-controlled desktop video and looping portrait video on phones.

In plain words
What is it for?
Use it to create desktop all-keyframe MP4 files, 9:16 mobile versions, and poster images, then place them in the theme's assets folders.
Why use it?
It prepares separate video files for smooth frame-by-frame scrolling, mobile playback, and reduced-motion fallbacks.

Command for Claude Code

Written for Claude Code: arguments in frontmatter.

Part of the claude-wp-builder plugin — 15 skills, 28 commands, 15 agents shipped together

Good fit Use it to create desktop all-keyframe MP4 files, 9:16 mobile versions, and poster images, then place them in the theme's assets folders.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/yojahny55/claude-wp-builder/wp-cinematic-encode
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/yojahny55/claude-wp-builder

Made for: Claude Code.

Or install claude-wp-builder, the plugin that ships this one along with the rest of its 15 skills, 28 commands, 15 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wp-cinematic-encode

README.md
[![agentmods](https://agentmods.dev/badge/commands/yojahny55/claude-wp-builder/wp-cinematic-encode.svg)](https://agentmods.dev/commands/yojahny55/claude-wp-builder/wp-cinematic-encode)
Your own site
<a href="https://agentmods.dev/commands/yojahny55/claude-wp-builder/wp-cinematic-encode"><img src="https://agentmods.dev/badge/commands/yojahny55/claude-wp-builder/wp-cinematic-encode.svg" alt="Measured on agentmods" height="20"></a>
Per session 84 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,101 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00084 $0.01101
Opus 5 $0.00042 $0.00550
Sonnet 5 $0.00017 $0.00220
Haiku 4.5 $0.00008 $0.00110

Measured 7d ago against content hash a28470720c53, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade B, and why

wp-cinematic-encode scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

| `ffmpeg: command not found` | not installed | `sudo dnf install ffmpeg` (Fedora) / `apt install ffmpeg` (Debian) |
commands/wp-cinematic-encode.md · 63 lines

How it starts

The opening of the file, as written. The whole thing — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/wp-cinematic-encode

What it does

Variant Output Used for Encoding
Desktop assets/videos/scene-N.mp4 scroll-scrub (currentTime driven by ScrollTrigger) -g 1 -bframes 0 -crf 23 -preset slow — every frame is a keyframe so video.currentTime = x lands instantly. File is ~2-3× larger than streaming MP4; that's the price of frame-perfect scrub.
Mobile assets/videos/scene-N.mobile.mp4 autoplay + muted + loop + playsinline -vf "crop=ih*9/16:ih,scale=720:1280" center crop to 9:16, -crf 26, standard GOP, -movflags +faststart.
Poster assets/posters/scene-N.jpg prefers-reduced-motion fallback, slow-connection placeholder -vf "select=eq(n\,30)" single frame, JPEG q=85.

Pipeline

  1. Verify ffmpeg and ffprobe available (bash -c 'command -v ffmpeg && command -v ffprobe').
  2. Resolve kit path; locate scripts/encode-keyframe.sh and scripts/encode-mobile-portrait.sh.
  3. Run scripts in parallel via Bash background jobs (encode is CPU-bound, parallel saves wall time):
    bash -c '<kit>/scripts/encode-keyframe.sh <input> <theme>/assets/videos/scene-<N>.mp4 &
             <kit>/scripts/encode-mobile-portrait.sh <input> <theme>/assets/videos/scene-<N>.mobile.mp4 &
             wait'
    
  4. If --poster, extract frame 30 to assets/posters/scene-<N>.jpg.
  5. Verify outputs:
    • Desktop: ffprobe -show_frames -select_streams v:0 -read_intervals %+#10 -print_format csv | grep -c 'I' ≥ 10 (sanity check that all-keyframe took).
    • Mobile: confirm aspect ratio = 9:16 via ffprobe -show_entries stream=width,height.
  6. If --scene=N is set AND a WordPress install is reachable:
    • Run wp media import <each output> to add to Media Library.
    • Run wp eval to update the matching cinematic_scenes row's video_desktop / video_mobile / poster ACF fields to the new attachment IDs.
  7. Print before/after sizes and bitrate stats.

Failure handling

Symptom Cause Fix
ffmpeg: command not found not installed sudo dnf install ffmpeg (Fedora) / apt install ffmpeg (Debian)
Scrub stutters after encode GOP didn't apply (some codecs ignore -g 1 without -bf 0) rerun script — the kit script chains both; if still stuttering try -x264-params "keyint=1:min-keyint=1"
Mobile video portrait looks zoomed wrong source is already 9:16 or 1:1 — center-crop math overshoots pass --mobile-only --keep-source-aspect (skips crop, only re-encodes for +faststart)
WP-CLI media import fails with Could not load image type MP4 mime not allowed run wp option update upload_filetypes "$(wp option get upload_filetypes) mp4"

Read the full file on GitHub · 63 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 63 lines · 84 tokens per session scan B a28470720c53

Subscribe to this mod's changes

wp-cinematic-encode is a command published in the GitHub repository yojahny55/claude-wp-builder (6 stars, last pushed 3d ago), licensed MIT. It adds 84 tokens to every session and 1,101 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.