video-bgm
Skill210 starsChanged 2 days agoMITView on GitHub
Adds background audio from one folder to a single video using FFmpeg. Naturally sorts, sequences, and crossfades the folder tracks, loops a short playlist or trims long audio to match the video, fades out at the end, and mixes it with the original audio while stream-copying the video. Use when the user wants to add BGM, background music, a soundtrack, or a music bed to a video.
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-compress-to-sizeSkill
- video-cutSkill
- video-merge-gpuSkill
- 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
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Add background audio from one folder to a single video.
- Very specific: line 12
When this skill applies, read and follow dependency-manager — run scripts as documented, install missing tools into .dependency/.
- Very specific: line 14
Run add_bgm.py through .dependency/python/python.exe.
- Distinctive: line 16
Use the bundled script; do not hand-write equivalent FFmpeg commands.
- Distinctive: line 18
Read only audio files directly inside the folder.
- Very specific: line 63
Use numbered filenames such as 01_intro.mp3, 02_main.ogg to control folder playback order.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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 BGM
Add background audio from one folder to a single video. Folder audio plays in natural filename order with a crossfade. The resulting playlist loops when shorter than the video and is trimmed when longer.
Rules
When this skill applies, read and follow dependency-manager — run scripts as documented, install missing tools into .dependency/.
- Run
add_bgm.pythrough.dependency/python/python.exe. Never use hostpython/ffmpeg. - Never overwrite sources. Outputs go under
video-bgm/by default. - Use the bundled script; do not hand-write equivalent FFmpeg commands.
- Pass one video file to
--videoand one audio folder to--audio. - Read only audio files directly inside the folder; do not recurse into subfolders.
Quick Start
.dependency/python/python .ai/video-bgm/add_bgm.py --video path/to/clip.mp4 --audio path/to/music-folderAudio folder:
.dependency/python/python .ai/video-bgm/add_bgm.py --video path/to/clip.mp4 --audio path/to/music-folderExample:
assets/intro.mp4 + assets/calm.mp3
→ assets/video-bgm/intro.mp4Defaults
| Setting | Default |
| Audio order | Natural filename order within the folder |
| Between tracks | Up to 1 second crossfade |
| Short playlist | Loop until video ends |
| Long playlist | Trim to video duration |
| Ending | Up to 2 second BGM fade-out |
| Original audio | Preserve and mix at full volume |
| BGM volume | 20% |
| Video | Stream copy; no re-encode |
Parameters
--video · --audio · -o / --output
.dependency/python/python .ai/video-bgm/add_bgm.py --video clip.mp4 --audio bgm.mp3 -o out/clip.mp4Agent Notes
- Audio files are background tracks, not replacement soundtracks; the original video audio remains when present.
- Use numbered filenames such as
01_intro.mp3,02_main.oggto control folder playback order. - The script uses fixed mixing defaults intentionally. Do not expose extra tuning flags.
- A silent video receives the BGM directly.
- Missing Python/FFmpeg → populate
.dependency/per dependency-manager, then retry. - Tell the user where the
video-bgm/output is; do not replace the source. - Pipeline details: reference.md
Tests
From the repository root:
.dependency/python/python .ai/video-bgm/test_add_bgm.pyManual CLI examples: cli/video-bgm.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.

