media

A local command-line tool for turning recorded desktop video into smaller review files. It can make an animated GIF, and optionally a shortened MP4, from a video that tools such as ffmpeg can read.

In plain words
What is it for?
Use it to preview recordings made with desktop recording tools, trim them around periods of motion, and create GIF or MP4 evidence for code reviews and issue reports.
Why use it?
It removes idle parts of a screen recording so reviewers can see the relevant action quickly. The files can be viewed directly in places such as GitHub issues and pull requests.

Command

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.

agentmods
npx agentmods add commands/openclaw/crabbox/media
Clone the repo
git clone --depth 1 https://github.com/openclaw/crabbox
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 944 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00944
Opus 5 $0.00000 $0.00472
Sonnet 5 $0.00000 $0.00189
Haiku 4.5 $0.00000 $0.00094

Measured 2d ago against content hash c4151d6c1fc6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

media scanned grade A with 0 findings 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/media.md · 102 lines

How it starts

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

media

crabbox media turns a recorded desktop video into lightweight review artifacts. It runs entirely on your machine, needs no lease or broker, and depends only on ffmpeg and ffprobe being on your PATH.

The command pairs naturally with desktop record and artifacts video, which produce the MP4 source you feed in here.

media preview

crabbox media preview converts an MP4 (or any ffmpeg-readable video) into a small animated GIF that GitHub renders inline in issues, pull request bodies, and comments. It can optionally also emit a trimmed MP4 clip covering the same window.

crabbox media preview \
  --input desktop.mp4 \
  --output desktop-preview.gif \
  --trimmed-video-output desktop-change.mp4

Both --input and --output are required.

Motion trimming

By default the preview is motion-focused so the GIF shows the change, not the idle desktop around it:

  • ffmpeg freezedetect locates every static region across the recording.
  • Crabbox removes long static spans, keeps --trim-padding (default 750ms) around each moving segment, then stitches the segments together.
  • The stitched preview is widened to at least --min-duration (default 1500ms) when the detected motion is shorter.
  • If no motion is detected at all, Crabbox keeps the full source rather than emitting an empty preview.

Disable trimming and render the whole video with --no-trim-static.

Encoding

The GIF is palette-optimized for quality: ffmpeg generates a diff-mode palette, then renders at --fps (default 24) and --width (default 1000 px) with Lanczos scaling and Floyd–Steinberg dithering.

When gifsicle is on PATH, Crabbox runs a second optimization pass (gifsicle -O3 --lossy=<n> --gamma=<n>) to shrink the file while preserving the higher-quality palette. Control this with --gifsicle:

  • auto (default) — optimize if gifsicle is available, otherwise skip.
  • off — never run gifsicle.
  • required — fail the command if gifsicle is missing.

Read the full file on GitHub · 102 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. 2d ago First seen · 102 lines · 0 tokens per session scan A c4151d6c1fc6

Subscribe to this mod's changes

media is a command published in the GitHub repository openclaw/crabbox (1,343 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 944 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.