К основному содержанию
скилл CX Codex

background-music — скилл для Claude Code: музыка в видео и установка

Скилл background-music для Claude Code подбирает фоновую музыку и задаёт автоматическое приглушение под речь в видео на Remotion. Запускается, когда в задании включена музыка или нужно добавить её к ролику.

MIT ★ 147 обновлён 2026-11-13

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add notivn/AIEVv2 --skill background-music -a claude-code
Открыть на GitHub

Что делает background-music

Скилл выбирает один трек из assets/music/, размечает интервалы речи по временным меткам расшифровки и записывает настройки в meta.json. Remotion зацикливает трек, делает плавное появление и затухание, а во время речи снижает громкость музыки.

Файл копируется в каталог проекта, а не подключается напрямую из общей библиотеки. Для настройки нужны библиотека assets/music/ и временные метки речи; если библиотека пуста, скилл предлагает пропустить музыку. Перед финалом инструкция требует прослушать черновой рендер в начале, середине и конце. ffmpeg нужен только для дополнительного измерения громкости.

Какие задачи решает

  • подобрать трек по настроению видео
  • разметить интервалы речи для приглушения музыки
  • записать уровни музыки и путь к файлу в meta.json
  • проверить громкость музыки в черновом ролике

Примеры запросов агенту

  • Добавь фоновую музыку к видео и настрой приглушение под речь.
  • Подбери трек из assets/music/ для этого ролика и заполни audio.music в meta.json.
  • Проверь черновой рендер: музыка не должна перекрывать голос.

Как установить background-music

1Через Skills CLI (Vercel)

npx skills add notivn/AIEVv2 --skill background-music -a claude-code

2Вручную: положить файлы

~/.claude/skills/background-music/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/background-music/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о background-music

Как установить background-music в Claude Code?

Выполни npx skills add notivn/AIEVv2 --skill background-music -a claude-code. Файл скилла находится по пути ~/.claude/skills/background-music/SKILL.md.

Что делает background-music?

Скилл выбирает трек из assets/music/, размечает речь для автоматического приглушения музыки и задаёт параметры в meta.json.

Что нужно для работы background-music?

Нужны библиотека треков assets/music/, временные метки речи и проект с Remotion. ffmpeg понадобится только для дополнительного измерения громкости.

Исходный текст

SKILL.md · MIT
---
name: background-music
description: Pick background music from the assets/music/ library and configure auto-ducking (music dips automatically under speech) via meta.json audio.music for the Remotion assembly layer. Read when the brief/edit prompt has a "Nhạc nền" (background music) section set to auto, or when the user asks to add/adjust background music on a video.
---

# Background Music - music bed + auto-ducking

Background music is played by Remotion in the assembly layer (the `MusicTrack` component): the track loops, fades in over 0.5s at the start of the video, fades out over 1s at the end, and **auto-ducks** (smooth 0.4s volume dip) around every speech segment. Claude's job is to pick the track + generate the speech ranges + declare `audio.music` correctly in `meta.json` - everything else is deterministic inside Remotion.

## 1. Pick a track by mood

- Read `assets/music/library.json` - each entry has `file`, `tags` (mood: nang-luong, chill, cam-hung, cang-thang, vui-ve...), `durationMs`, `description`.
- Pick **ONE** track whose mood matches the video content (motivational video -> nang-luong/cam-hung; slow explainer -> chill...).
- A track shorter than the video is fine - `MusicTrack` loops it automatically, no need to concatenate files with ffmpeg.

## 2. Generate speech ranges from the transcript

Speech ranges = the segments that DO contain speech (in seconds, on the already-cut composition timeline) - these are the moments the music gets ducked.

1. Take the word timestamps from the transcript (already remapped if autoCut ran).
2. Merge adjacent words into one continuous range.
3. **Merge two ranges if the gap between them is < 0.6s** - a short breath between two sentences is not worth having the music swell back up and drop again.
4. Result: `[[startSec, endSec], ...]` - usually just a few ranges for a talking-head video (silent intro, body, outro).

## 3. Volume levels

| Context | volume | Notes |
|---|---|---|
| Speech present (`duckVolume`) | **0.10-0.15** | Music sits ~18-20dB below the voice - the voice is ALWAYS clearer than the music |
| No speech (`volume`): intro/outro/pauses | **0.30-0.40** | Music carries the emotion but does not bury the sfx |

Loud / bass-heavy tracks -> take the **lower bound** of both ranges (0.10 / 0.30).

## 4. Declare it in meta.json

**Copy the music file into the project's `assets/`** (same as sfx) so the project stays portable - NEVER point directly at the shared library:

```powershell
Copy-Item "assets/music/<file>" "video-projects/<id>/assets/music/<file>"
```

Then declare it (path relative to the project root):

```json
"audio": {
  "voice": "...",
  "sfx": [...],
  "music": {
    "file": "assets/music/<file>",
    "volume": 0.35,
    "duckVolume": 0.12,
    "speech": [[1.2, 14.8], [16.1, 42.5]]
  }
}
```

The server stages the file into the Remotion staging directory during assembly - nothing else to do.

## 5. Verify (mandatory before final)

1. Render a draft (assemble-draft) then **listen at 3 points**: start of the video (fade-in + intro level), middle of the video during speech (music must sit clearly under the voice), end of the video (clean fade-out).
2. The only standard: **the voice MUST be clearer than the music at every moment**. If you have to strain to make out the words -> lower `duckVolume`.
3. If in doubt about the levels, measure with `ffmpeg -i <draft.mp4> -af volumedetect -f null NUL` over a speech segment and a non-speech segment, and compare the two mean_volume values.

## Mistakes to avoid

- **Music louder than speech** - `duckVolume` is too high, or the speech ranges are missing a segment. Re-check transcript coverage: every spoken segment must fall inside a range.
- **Forgetting the final fade-out** - `MusicTrack` fades out over 1s based on `durationInFrames`; but if the composition's total duration is computed wrong, the music gets cut off abruptly. Verify the end point when listening to the draft.
- **Music with Vietnamese lyrics** - it fights the speech, the listener's brain cannot separate two layers of words. ONLY use instrumental music.
- **Downloading music from the internet** - FORBIDDEN (copyright). Only use the `assets/music/` library. If the library is empty -> skip background music and state that clearly in the report.

© notivn · MIT · notivn/AIEVv2

Похожие скиллы

Все скиллы по теме «Маркетинг и контент» →
video-to-music sonilo-ai Скилл video-to-music создаёт оригинальную музыку под готовое видео через Sonilo с учётом монтажа и темпа. Трек очищен для коммерческого использования. CX Codex +1 1 500установок ai-music-and-sound social-media-skills Скилл ai-music-and-sound подбирает лицензированную музыку и звуковой дизайн под соцвидео, чтобы ролик не заглушили и не оспорили по Content ID. CX Codex +1 1 200установок bizmuse-music-video BizMuse-AI Скилл bizmuse-music-video генерирует музыкальные видеоролики по готовому аудио и референсным изображениям через официальный CLI BizMuse. CX Codex +1 1установок audiogram iart-ai Скилл audiogram для Claude Code превращает аудиофрагмент в видео с анимированной волной, титрами и обложкой. Он включается для клипов из подкастов, озвучки и музыки. CX Codex +1 1 600установок Sonilo Music & Sound Effects sonilo-ai MCP-сервер Sonilo Music & Sound Effects генерирует лицензированную музыку и звуковые эффекты под тайминги готового видео. Помогает озвучить ролики без ручной подгонки треков под монтажные склейки. CX Codex +1 ★ 53звёзд репо elevenlabs-remotion Maartenlouis Скилл elevenlabs-remotion для Claude Code генерирует озвучку видео и аудиотекста через ElevenLabs. Создаёт озвучку сцен Remotion, повторно генерирует фрагменты и встраивает превью в MP4. CX Codex +1 525установок

Из того же набора15

Весь набор →
skill-authoring Скилл skill-authoring для Claude Code задаёт правила создания и обновления скиллов для AI Edit Video. Он срабатывает, когда просят написать скилл или добавить в него урок после готового видео. CX Codex +1 ★ 147звёзд репо color-grading Скилл color-grading для Claude Code настраивает цветокоррекцию видео в пайплайне AI Edit Video. Включается при обработке HDR- и лог-футажей или по запросу Chỉnh màu. CX Codex +1 ★ 147звёзд репо key-layout Скилл key-layout для Claude Code размещает главную тему видео сверху, а связанные тезисы — над субтитрами. Подключается, когда в брифе включён keyLayoutEnabled или в промпте есть раздел «Bố cục Key: BẬT». CX Codex +1 ★ 147звёзд репо offline-voice Скилл offline-voice для Claude Code объясняет настройку локального движка озвучки VieNeu-TTS и клонирования голоса. Включается при отладке маршрутов /api/tts и озвучки видео. CX Codex +1 ★ 147звёзд репо make-a-video make-a-video — скилл для Claude Code, который ведёт от идеи к готовому MP4 через HyperFrames. Он собирает требования, готовит сценарный план и проверяет видео перед финальным рендером. CX Codex +1 ★ 147звёзд репо auto-cut Скилл auto-cut для Claude Code убирает тишину, оговорки и повторы дублей из видео с говорящей головой до монтажа. Включается по флагу autoCut в брифе или при жалобах на паузы. CX Codex +1 ★ 147звёзд репо ai-illustrations Скилл ai-illustrations для Claude Code добавляет сгенерированные изображения в видеомонтаж. Он включается, когда в задании разрешены AI-иллюстрации или запрошены изображения для видео. CX Codex +1 ★ 147звёзд репо remotion-assemble Скилл remotion-assemble для Claude Code настраивает сборку видео из сцен HyperFrames, футажей, голоса и звуков по файлу meta.json. Инструкции включаются при редактировании кода в каталоге engines/remotion. CX Codex +1 ★ 147звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой