agentleFS
fmnapolifmnapoli/video-editores/skills/tela-verde/SKILL.md

tela-verde

Skill4 starsChanged 6 days agoMITView on GitHub

Remove fundo verde (chroma key) ou, sem tela verde, recorta a pessoa por IA e troca o fundo por imagem, vídeo ou cor; também contorno neon na silhueta. Use para /tela-verde, "tira o fundo", "chroma key", "troca o fundo", "me recorta e troca o cenário", "contorno neon".

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use "${CLAUDE_PLUGIN_ROOT}/skills/videoaula/scripts/matte.py": streaming ffmpeg → rembg → ffmpeg (nada em disco), máscara a 960x540 …

    line 24

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

/tela-verde — troca de fundo

Siga ${CLAUDE_PLUGIN_ROOT}/docs/convencoes.md (pastas, nomes de saída, loudness, privacidade). Dependências: ${CLAUDE_PLUGIN_ROOT}/scripts/doctor.sh.

Com tela verde de verdade (rápido, ffmpeg)

  1. Descubra a cor do fundo: extraia um frame (ffmpeg -ss 1 -i IN.mp4 -frames:v 1 f.png), olhe a imagem e amostre a cor (padrão 0x00FF00; telas reais costumam ser ~0x3BB143).
  2. Componha:
    ffmpeg -i FUNDO.mp4 -i IN.mp4 -filter_complex \
      "[1:v]chromakey=0x3BB143:0.12:0.08,despill=type=green[fg];[0:v][fg]scale2ref[bg][fg2];[bg][fg2]overlay=shortest=1[v]" \
      -map "[v]" -map 1:a -c:a copy IN_fundo.mp4
    • Fundo imagem: troque -i FUNDO.mp4 por -loop 1 -i fundo.jpg.
    • Sobrou verde na borda → aumente similarity (0.12→0.16). Comeu a pessoa → diminua.
    • scale2ref está marcado como obsoleto a partir do ffmpeg 7.1 (ainda funciona). Alternativa: [0:v]scale=W:H[bg] com a resolução lida por ffprobe.
  3. Mostre com /prova.

Sem tela verde (IA, rembg — MIT)

Use "${CLAUDE_PLUGIN_ROOT}/skills/videoaula/scripts/matte.py": streaming ffmpeg → rembg → ffmpeg (nada em disco), máscara a 960x540 suavizada no tempo, sombra, saída composta + máscara separada (_alpha.mp4) para recompor com deslocamento:

uv run --with rembg --with onnxruntime --with pillow --with numpy python "${CLAUDE_PLUGIN_ROOT}/skills/videoaula/scripts/matte.py" IN.mp4 0 25.1 fundo.png trabalho/<slug>/pessoa --threads 4

CPU: 1–3 s por frame; vários trechos em paralelo com matte_workers.sh (um trabalhador por ~4 núcleos e 1,3 GB). Lance detached (setsid nohup) e avise o tempo. Modelo padrão u2net_human_seg (download do GitHub pode dar 504 em rede corporativa: espelho no Hugging Face, ver troubleshooting). Para clipes longos com GPU, RobustVideoMatting (GPL-3) é mais estável.

Contorno neon (efeito de Reels)

Com a máscara do rembg dá para desenhar um contorno colorido na silhueta, sem trocar o fundo:

  1. Extraia os frames do trecho e gere a máscara da pessoa (rembg.remove(img, only_mask=True)).
  2. Dilate a máscara (Pillow ImageFilter.MaxFilter(15)), subtraia a original → anel; pinte o anel com a cor neon, aplique GaussianBlur(6) para o brilho e componha sobre o frame original, com a pessoa por cima.
  3. Remonte com ffmpeg e substitua o trecho como no text_behind.py (mesma estrutura de script; copie-o e troque a composição). Cor típica: #FF6B35 (laranja) ou #39FF14 (verde neon). Trechos de 1–3 s, como no /texto-atras.

Regras

  • Fundo novo deve ter a mesma resolução/proporção do vídeo (o scale2ref resolve, mas avise se for distorcer).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.