video-merge-gpu
Skill210 starsChanged yesterdayMITView on GitHub
Merges multiple videos from a folder (sorted by filename) into one clip with a random xfade transition (0.5s) between each pair; freeze-pads so total duration equals the sum of sources. Encodes with GPU HEVC only (NVENC / AMF / QSV — no CPU libx265 fallback). Exports 3840×2160 60fps H.265 Main10 40Mbps + AAC 320kbps. Use when the user wants video-merge-gpu, GPU video merge, NVENC merge, hevc_nvenc concat, GPU concat, GPU video merge, or batch stitch clips with xfade on GPU.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- godot-fun/godot-agentword for word, first seen Nov 15, 2026
Other versions1 project uses a version of this.
Word for word · 1
- godot-fun/godot-agent★ 210100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository40 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/AGENTS.mdAGENTS.md
- ai-text-to-speechSkill
- audio-denoiseSkill
- audio-fadeSkill
- audio-loudness-normalizationSkill
- audio-sample-rate-standardizeSkill
- audio-splitSkill
- audio-to-oggSkill
- audio-to-textSkill
- audio-to-wavSkill
- audio-trimSkill
- audio-volume-adjustSkill
- file-naming-normalizationSkill
- git-commit-messageSkill
- image-inpaint-regionSkill
- image-region-remove-key-color-appSkill
- image-remove-backgroundSkill
- image-remove-white-backgroundSkill
- image-resizeSkill
- image-sprite-sheet-splitSkill
- image-to-pngSkill
- image-to-textSkill
- image-trimSkill
- storyboard-av-mixSkill
- storyboard-shot-to-htmlSkill
- storyboardSkill
- storyboard-ttsSkill
- video-4k-normalizationSkill
- video-bgmSkill
- video-compress-to-sizeSkill
- video-cutSkill
- video-mergeSkill
- video-publishSkill
- video-remove-audioSkill
- video-to-4kSkill
- video-to-60fpsSkill
- video-to-mp4Skill
- video-to-ogvSkill
- video-to-wavSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 1 is distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
When this skill applies, read and follow dependency-manager — run scripts as documented, install missing tools into .dependency/.
- Very specific: line 25
Run merge.py through .dependency/python/python.exe.
- Distinctive: line 27
Use the bundled script — do not hand-write equivalent FFmpeg commands.
- Very specific: line 76
Use the bundled script — do not hand-write ffmpeg xfade chains.
- Very specific: line 78
Every clip except the first must be longer than 0.5s (incoming side of xfade).
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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.
Files
Video Merge GPU
Same merge as video-merge: concatenate every video in a folder (filename sort) into one high-quality MP4, random FFmpeg xfade (0.5s) + matching acrossfade, freeze-pad so output length equals the sum of source durations.
GPU encode only. Probe hevc_nvenc → hevc_amf → hevc_qsv (HEVC Main10). If none work, fail — do not fall back to libx265. Use video-merge when CPU encode is wanted.
xfade / scale / pad still run on CPU; only the H.265 encode is hardware.
Rules
When this skill applies, read and follow dependency-manager — run scripts as documented, install missing tools into .dependency/.
- Run
merge.pythrough.dependency/python/python.exe. Never use hostpython/ffmpeg. - Never overwrite sources. Outputs go under
video-merge-gpu/. - Use the bundled script — do not hand-write equivalent FFmpeg commands.
- Folder input only — pass
--folderwith a directory of clips (top-level files; no recurse).
Quick Start
.dependency/python/python .ai/video-merge-gpu/merge.py --folder path/to/clipsExample:
assets/shots/
01.mp4
02.mp4
03.mp4
→ assets/shots/video-merge-gpu/shots.mp4Output Spec (fixed)
| Setting | Value |
| Resolution | 3840×2160 (scale + letterbox pad) |
| Frame rate | 60 fps |
| Video | H.265 Main10 (GPU: hevc_nvenc / hevc_amf / hevc_qsv, p010le) @ 40 Mbps |
| Audio | AAC 320 kbps, 48 kHz stereo |
| Transition | 0.5 s, random from the pool below (freeze-pad; duration preserved) |
| Container | .mp4 (hvc1 tag) |
Transition Pool (random per cut)
fade · dissolve · wipeleft · wiperight · wipeup · wipedown · slideleft · slideright · circlecrop · pixelize · distance · radial · smoothleft · smoothright · circleopen · circleclose · diagtl · diagtr · hblur · zoomin
Each cut independently samples one transition. Printed in the run log.
Common Flags
--folder · -o / --output
.dependency/python/python .ai/video-merge-gpu/merge.py --folder clips
.dependency/python/python .ai/video-merge-gpu/merge.py --folder clips -o out/final.mp4Never overwrite source files. Input must be a folder (--folder), not a single video file. Only top-level videos in the folder (no recurse). Supported: .mp4, .mkv, .mov, .avi, .webm, .wmv, .flv, .m4v, .mpeg, .mpg, .ts, .mts, .m2ts, .3gp, .ogv.
Agent Notes
- Use the bundled script — do not hand-write
ffmpegxfade chains. - Transition duration is fixed at 0.5s — no duration override flag.
- Every clip except the first must be longer than 0.5s (incoming side of
xfade). - Single file in the folder → re-encode to the output spec with no transition.
- Many clips (4K10) auto-chunk (max 8 inputs per filtergraph) to avoid OOM; transitions stay correct across chunk boundaries.
- No CPU fallback. Missing GPU HEVC Main10 → report the probe failure; suggest
video-mergeonly if the user accepts CPU. - Missing Python/FFmpeg → populate
.dependency/per dependency-manager, retry. - FFmpeg filter / encoder details: reference.md
Tests
From repo root:
.dependency/python/python .ai/video-merge-gpu/test_merge.pyManual CLI examples: cli/video-merge-gpu.md
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
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.

