agentleFS
aslanzubairaevaslanzubairaev/reels-factory/.claude/skills/concat-segments/SKILL.md

concat-segments

Skill2 starsChanged 6 months agoMITView on GitHub

Склеивает сегменты записи (recording_001.mp4, recording_002.mp4, ...) в один recording_full.mp4 без рассинхрона аудио/видео. Использовать сразу после записи, если в output/ больше одного recording_NNN.mp4.

The file

Files
SKILL.md

Skill: concat-segments

Собирает все файлы recording_NNN.mp4 из projects/<name>/output/ в один recording_full.mp4.

Usage

python .claude/skills/concat-segments/concat.py projects/<name>/output/

Зачем нужен

MediaRecorder в браузере пишет VFR (variable frame rate). Если склеивать сегменты наивной командой с -filter_complex "fps=30,setpts=...", видео пересэмплится, а аудио — нет → видео отстаёт от голоса.

Skill делает правильно:

  1. Если все сегменты имеют идентичные кодек/разрешение/fps — использует -c copy (stream-copy без перекодирования, гарантирует синхрон).
  2. Иначе fallback на аккуратное перекодирование с -vsync cfr -r 30 -af aresample=async=1 — выравнивает timestamps без дрейфа.

Поведение

  • Если recording_full.mp4 уже существует — skill не трогает его (используй --force для переcклейки).
  • После успеха: оригинальные recording_NNN.mp4 не удаляются (cleanup-project удалит их позже).
  • Если сегмент только один — просто переименовывает его в recording_full.mp4.

Флаги

  • --force — переcклеить, даже если recording_full.mp4 есть.

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.