video-remove-bg
Removes the background from a video clip — cut out characters/objects onto transparent (or black), keeping the soundtrack.
Skill by victorrentea
Chalk Labs
Need help deploying video-remove-bg?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/victorrentea-video-remove-bg
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/video-remove-bg
What's inside
- Skill name
video-remove-bg- Description
- Removes the background from a video clip — cut out characters/objects onto transparent (or black), keeping the soundtrack. Local and free (rembg + BirefNet). Trigger: remove/cut out background from a video, transparent video, alpha video, green-screen-less matting.
- License
- Unlicense
- Instructions
- 70 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (5)
- SKILL.md
- align_audio.py · scripts/
- rmbg-video.sh · scripts/
- subject_bbox.py · scripts/
- verify_alpha.py · scripts/
SKILL.md (first lines)
# video-remove-bg
Frame-by-frame matting with `rembg -m birefnet-general`, re-encoded into formats that
really keep alpha. Everything local, $0.
```bash
S="${CLAUDE_PLUGIN_ROOT}/skills/video-remove-bg/scripts"
"$S/rmbg-video.sh" -i in.mp4 -s 0.8 -c auto -o out/minions # first pass: picks the crop
"$S/rmbg-video.sh" -i in.mp4 -s 0.8 -c auto -k 3 -o out/minions # keep object 3 only
# -s/-t segment · -c W:H:X:Y or auto (+ -k bands) · -a song.mp3 -A 24 external soundtrack
```
Outputs: `out.mov` (ProRes 4444, alpha — the reference), `out_hevc.mov` (HEVC+alpha,
~15× smaller), `out_black.mp4`, `out_checker.png`. The last step decodes a frame of each
file and prints ✓/✗ for real alpha. First run creates a venv in `~/.cache/video-remove-bg`
(needs `uv`, `ffmpeg`); model downloads to `~/.u2net` once (~1 GB).
Rerunning with the same `-o` resumes — matted frames are skipped.
## Workflow
1. **Pin down the timeline.** "From second 24 to the end" may refer to a *different*
track than the video (a song, a longer cut). If the numbers don't fit the clip, run
`align_audio.py clip.mp4 track.mp3` → offset; `clip_time = asked_time − offset`.
Corr > 0.3 on music ⇒ same recording.
2. **Crop = what survives.** BirefNet keeps *everything* salient — a logo's title is as
foreground as the characters under it. `-c auto` mattes 6 full frames, lists the
horizontal bands it found and writes `boxes.png`; with several bands it stops (exit 3).
Show `boxes.png` to the user, rerun with `-k`. The box is the union over the whole
segment, so a character that falls or jumps later stays in frame.
3. **Show one matted frame before the long run** (`out_checker.png`-style: source /
checkerboard / black stacked). ~15–20 s per frame on CPU: 170 frames ≈ 50 min — run it
in the background, and let the user veto the framing while it is cheap.
4. **Tell the user the final length** up front: frames/fps vs. soundtrack length. With a
longer soundtrack the `.mp4` holds the last frame; the `.mov`s just run the sound on.
5. **Deliver**: open `out_checker.png` so they see what's transparent, and say that
QuickTime shows transparency as black — drop the `.mov` onto a Keynote slide to see it.
## Pitfalls (each cost real time)
- **Model choice.** Human-matting models (RobustVideoMatting, most SaaS removers) are
trained on people only — useless on cartoons/objects. `isnet-anime` is for flat 2D art,
wrong for glossy 3D CGI. `birefnet-general` (salient object, no human prior) works.
- **Input is fixed 1024×1024.** Every frame is resized to 1024² and the mask comes back
1024². A tight crop gives the model more pixels on the subject; 4K instead of 1080p does
*not* give a 4× sharper mask — only a cleaner (less compressed) source helps.
- **ffprobe lies about alpha.** HEVC+alpha and VP9+alpha both report `pix_fmt=yuv420p`
with the alpha intact (separate layer / Matroska BlockAdditional). Verify by decoding to
RGBA (`verify_alpha.py`); for WebM force `-c:v libvpx-vp9`, the native decoder drops alpha.
- **WebM alpha** needs `-auto-alt-ref 0` (otherwise libvpx silently drops it), and some
Homebrew/static ffmpeg builds on macOS write `yuv420p` anyway. Use ProRes 4444 / HEVC.
- **Seek into the video stream, not the file.** With a soundtrack longer than the frames,
`format=duration` points past the last frame and the extraction returns nothing.
- **ffmpeg ≥ 9 removed `-vsync`** → `-fps_mode passthrough`, or `select` duplicates/skips
frames and the numbering stops matching.
- **Fades.** A pure-black frame does NOT come back empty — BirefNet mattes it ~98%
opaque, so a fade-to-black tail ends the clip on a dark slab flashing over the
desktop. Blank those frames (source mean luma < ~3) after matting, and spot fades up
front by PNG size (a black 1080p frame is <1 KB) or mean luma.
- **Trim flush after matting, not before.** Measure the alpha's lowest row over the
frames (ignoring the fade tail) and crop there — "cut 15%" by eye would have
clipped the feet by 6 px.
- **`rembg p` processes files out of order** — don't read progress from the first name.
- **Jittery mask? Measure before blaming the model.** `mean|Δalpha| / mean|Δsource|` < 1
means the mask follows real motion (a cut, a fall). If one window flickers, pick the
calmest window (`mean + max` of source motion) instead of switching models.
- **"HD" uploads lie.** Check `yt-dlp -F` for real resolution; a crisp 1080p copy may be a
fan re-creation (read the description) — cleaner, but not the original.
- macOS `/bin/bash` is 3.2: `set -u` + an empty `"${arr[@]}"` aborts the script.From victorrentea/skills, Unlicense.
More from victorrentea/skills
- 0.588score
smartbill-web
victorrentea
SmartBill invoice automation — issue, rewrite, download, record payments.
SkillAFreshness: A★ 2Claude Code +9 - 0.554score
come-back-when-done
victorrentea
Clears the terminal, then brings it back with a sound when the turn ends.
SkillBFreshness: B★ 2Claude Code +9 - 0.554score
tooltips
victorrentea
Add, restyle, or review a tooltip/hover hint — a native `title=` attribute, `el.title = ...`, or a CSS `::after` speech bubble.
SkillBFreshness: B★ 2Claude Code +9 - 0.551score
scribd-to-pdf
victorrentea
Turns a Scribd document into a local PDF.
SkillBFreshness: B★ 2Claude Code +9 - 0.551score
then-die
victorrentea
Close this terminal window after the work, if it all went fine.
SkillBFreshness: B★ 2Claude Code +9 - 0.551score
why
victorrentea
Audits Claude's own reasoning in this session.
SkillBFreshness: B★ 2Claude Code +9 - 0.551score
jmeter
victorrentea
Creates and runs JMeter load/performance tests.
SkillBFreshness: B★ 2Claude Code +9 - 0.549score
db
victorrentea
Before recommending or making any database change (index, column, constraint, migration, query rewrite).
SkillBFreshness: B★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 2
- Open issues
- 0
- Last commit (this folder)
- Sep 22, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Unlicense
- Repository
- github.com/victorrentea/skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from victorrentea
- 0.588score
smartbill-web
victorrentea
SmartBill invoice automation — issue, rewrite, download, record payments.
SkillAFreshness: A★ 2Claude Code +9 - 0.554score
come-back-when-done
victorrentea
Clears the terminal, then brings it back with a sound when the turn ends.
SkillBFreshness: B★ 2Claude Code +9 - 0.554score
tooltips
victorrentea
Add, restyle, or review a tooltip/hover hint — a native `title=` attribute, `el.title = ...`, or a CSS `::after` speech bubble.
SkillBFreshness: B★ 2Claude Code +9 - 0.551score
scribd-to-pdf
victorrentea
Turns a Scribd document into a local PDF.
SkillBFreshness: B★ 2Claude Code +9 - 0.551score
then-die
victorrentea
Close this terminal window after the work, if it all went fine.
SkillBFreshness: B★ 2Claude Code +9 - 0.551score
why
victorrentea
Audits Claude's own reasoning in this session.
SkillBFreshness: B★ 2Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get video-remove-bg running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
video-remove-bg skill. Agent Mart. https://agentmart.dev/skills/victorrentea-video-remove-bg (last updated 2026-10-24)