agentleFS
godot-fungodot-fun/godot-agent/.agents/skills/video-bgm/SKILL.md

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

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
  1. Distinctive:

    Add background audio from one folder to a single video.

    line 8
  2. Very specific:

    When this skill applies, read and follow dependency-manager — run scripts as documented, install missing tools into .dependency/.

    line 12
  3. Very specific:

    Run add_bgm.py through .dependency/python/python.exe.

    line 14
  4. Distinctive:

    Use the bundled script; do not hand-write equivalent FFmpeg commands.

    line 16
  5. Distinctive:

    Read only audio files directly inside the folder.

    line 18
  6. Very specific:

    Use numbered filenames such as 01_intro.mp3, 02_main.ogg to control folder playback order.

    line 63

≈ “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.

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

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.py through .dependency/python/python.exe. Never use host python / 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 --video and 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-folder

Audio folder:

.dependency/python/python .ai/video-bgm/add_bgm.py --video path/to/clip.mp4 --audio path/to/music-folder

Example:

assets/intro.mp4 + assets/calm.mp3
  → assets/video-bgm/intro.mp4

Defaults

SettingDefault
Audio orderNatural filename order within the folder
Between tracksUp to 1 second crossfade
Short playlistLoop until video ends
Long playlistTrim to video duration
EndingUp to 2 second BGM fade-out
Original audioPreserve and mix at full volume
BGM volume20%
VideoStream 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.mp4

Agent Notes

  1. Audio files are background tracks, not replacement soundtracks; the original video audio remains when present.
  2. Use numbered filenames such as 01_intro.mp3, 02_main.ogg to control folder playback order.
  3. The script uses fixed mixing defaults intentionally. Do not expose extra tuning flags.
  4. A silent video receives the BGM directly.
  5. Missing Python/FFmpeg → populate .dependency/ per dependency-manager, then retry.
  6. Tell the user where the video-bgm/ output is; do not replace the source.
  7. Pipeline details: reference.md

Tests

From the repository root:

.dependency/python/python .ai/video-bgm/test_add_bgm.py

Manual CLI examples: cli/video-bgm.md

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.