Communitygithub.com

FilippTrigub/abra

>- Remove the background from every frame of a video using AI (BiRefNet-general via rembg). Outputs transparent-background video or composites onto a solid colour or image. Requires a CUDA GPU with at least 3 GB free VRAM.

abra란 무엇인가요?

abra is a Claude Code agent skill that >- Remove the background from every frame of a video using AI (BiRefNet-general via rembg). Outputs transparent-background video or composites onto a solid colour or image. Requires a CUDA GPU with at least 3 GB free VRAM.

지원 대상✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/FilippTrigub/abra/tree/HEAD/skills/video-matte

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

keyer — AI Video Background Removal

Removes the background from every frame of a video using BiRefNet-general (a high-quality matting model via rembg). Optionally composites onto a flat colour or a background image. Audio is preserved.

The skill directory (where this SKILL.md lives) is referred to as $SKILL_DIR below.

GPU required. Needs a CUDA GPU with ≥ 3 GB free VRAM. If the LLM context is occupying VRAM, pause it before running.


When to Use

Use this skill when the user wants to:

  • Remove the background from a video (talking head, product demo, etc.)
  • Place a subject onto a solid colour or branded background
  • Export a video with a transparent background (alpha channel PNG frames)

Setup (first run only)

cd "$SKILL_DIR" && uv sync

BiRefNet model weights are downloaded automatically on first run (~500 MB).


Agent Workflow

1. Ask the user

Before I remove the background, I need to know:

🎭 Background replacement
  - null          — keep transparent alpha channel (PNG frames; no mp4 alpha)
  - #hex colour   — e.g. "#1a1a2e" for dark navy
  - /path/to/bg   — composite onto an image file

🧠 Model
  - birefnet-general   — best general quality  [default]
  - birefnet-portrait  — optimised for people
  - isnet-general-use  — faster alternative
  - u2net_human_seg    — fast, human-only

📁 Input / output directories  (default: ./input and ./output)

Wait for user response before proceeding.

2. Edit config.json

Write or update $SKILL_DIR/config.json based on the user's choices.

3. Run

cd "$SKILL_DIR" && uv run python scripts/matte.py --config config.json

4. Report results

Tell the user the output file paths and background mode used.


Config Reference

KeyValuesDefaultDescription
input_dirpath./inputFolder containing input videos
output_dirpath./outputDestination folder
modelsee abovebirefnet-generalMatting model
bgnull / hex / pathnullBackground replacement

Common Invocations

# Default: remove background, transparent output
cd "$SKILL_DIR" && uv run python scripts/matte.py

# Dark background composite
cd "$SKILL_DIR" && uv run python scripts/matte.py --bg "#0d0d0d"

# Composite onto an image
cd "$SKILL_DIR" && uv run python scripts/matte.py --bg /path/to/studio_bg.jpg

# Portrait-optimised model
cd "$SKILL_DIR" && uv run python scripts/matte.py --model birefnet-portrait

# Null background (pass as string "null" via CLI)
cd "$SKILL_DIR" && uv run python scripts/matte.py --bg null

Output

Each input video produces one output .mp4 in output_dir with the same filename. If bg=null, the output is encoded with yuv420p (no true transparency in mp4); for actual transparent frames, run clawimig or export as PNG sequence.


Error Handling

  • Insufficient VRAM → prints required vs available GB, tips to free VRAM, exits
  • No CUDA GPU / ONNX CUDAExecutionProvider missing → clear error, exits
  • No videos in input_dir → clean message, exits
  • Individual video errors → logged; other videos continue processing

Individual skills in this repo

This repo contains 7 individual skills — each has its own dedicated page.

FilippTrigub/abra

>- Animate a still image into a short video clip using fal.ai's LTX-2.3 Fast image-to-video model in the cloud. No GPU required - runs entirely on fal.ai serverless infrastructure.

FilippTrigub/abra

>- Auto-describe and caption images using a local vision-language model. Writes a JSON sidecar per image containing a one-sentence description, a suggested Instagram caption with hashtags, and detected content tags.

FilippTrigub/abra

>- Animated caption pipeline. Use this skill when the user wants to burn word-by-word animated captions into videos — using Whisper for transcription and pycaps for rendering. Supports default minimalist style or a futuristic CSS theme with alternating gold/magenta glowing words.

FilippTrigub/abra

>- Cut videos into segments, rearrange them, and produce an output video with a specific cuts-per-second rate. Uses MoviePy for video manipulation. Prioritizes audio transcription for timestamped cutting, falls back to adaptive scene detection.

FilippTrigub/abra

>- Edit a region of a video using a text prompt via Wan2.1-VACE inpainting. Supports two modes: background (auto-segment via rembg) or region (rectangle defined by fractions). Requires a CUDA GPU with at least 8 GB free VRAM.

FilippTrigub/abra

>- Video enhancement pipeline. Use this skill when the user wants to sharpen, colour grade, warm, or normalise the audio of videos — including presets for natural, cinematic, or vivid looks.

FilippTrigub/abra

Generate videos from text or images using Higgsfield's multi-model cloud platform. Supports kling, seedance, dop, and dop-preview models. Uses a small preset layer for common creative styles. Auto-detects text-to-video or image-to-video based on input. No GPU required.

관련 스킬