# extract-frames

extract-frames guides Claude Code in extracting video frames at specific timestamps using Mediabunny and rendering them to canvas.

- rule · `type=rule` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline · ★ 849 repo stars
- Author: coleam00
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/coleam00/second-brain-skills/tree/HEAD/.claude/skills/remotion/rules/extract-frames.md
- Updated: 2026-01-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/extract-frames

## What it does

This rule injects an `extractFrames` TypeScript utility into Claude Code context for media processing tasks. It instructs the agent on reading container tracks, pulling discrete frame samples through `mediabunny`, and drawing them onto an HTML `canvas` surface.

The guidance covers generating static thumbnails, assembling filmstrips with dynamic interval math, and aborting slow runs using `AbortSignal` or timeout races. Without the `mediabunny` package and a functional canvas environment, the generated code fails.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/rules/extract-frames.md` — The paths frontmatter field limits the files

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### Cursor

**Manually: put the files in place**
- File: `.cursor/rules/extract-frames.mdc` — Frontmatter: description, globs, alwaysApply

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/extract-frames.instructions.md` — The applyTo field sets which files it applies to

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/extract-frames.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/extract-frames.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/coleam00/second-brain-skills/tree/HEAD/.claude/skills/remotion/rules/extract-frames.md

## When to use it
- extract video frames at exact timestamps for thumbnails
- generate filmstrip previews by calculating dynamic time intervals
- render video samples onto an HTML canvas element
- cancel slow frame extraction runs with AbortSignal or timeouts

## Example prompts
- Write a helper to grab thumbnail frames from a video URL using Mediabunny
- Create a filmstrip generator that calculates timestamps from video duration
- Add cancellation to the frame extraction pipeline using an AbortController

## Similar
- [extract-video-frames](https://affpapa.org/en/nevibecode/skills/extract-video-frames.md) — skill · ★ 1357 repo stars
- [remotion-multimedia](https://affpapa.org/en/nevibecode/skills/remotion-multimedia.md) — skill · 3 installs
- [scenario-thumbnails](https://affpapa.org/en/nevibecode/skills/scenario-thumbnails.md) — skill · 622 installs
- [media-toolkit](https://affpapa.org/en/nevibecode/skills/media-toolkit.md) — skill · 184 installs
- [viral-video-long-form](https://affpapa.org/en/nevibecode/skills/viral-video-long-form.md) — skill · 114 installs
- [video-frames](https://affpapa.org/en/nevibecode/skills/video-frames.md) — skill · ★ 138 repo stars

From the same set: [coleam00/second-brain-skills](https://affpapa.org/en/nevibecode/by/coleam00/second-brain-skills.md) — 33 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
