Communitygithub.com

运动音效设计

为运动视频和 Reels 设计并混录与事件同步的音效:音乐选曲与节拍同步、每个视觉事件一个 SFX、音高变化、频段独立电平、微闪避以及 -13 LUFS 母带处理,内置 SFX 合成器和混音器。

运动音效设计 是什么?

该技能为 AI 代理(如 Claude Code、Cursor、Codex)提供了一套完整的运动视频音效设计与混音工作流程。它通过一个 Python 脚本(`sfx.py`)实现合成、混音和封装三大核心功能:自动生成 12 种 UI 音效(每类 3 种变体),根据 JSON 提示列表精准放置音效并应用 -13 LUFS 母带处理,以及最终将音频混入视频。技能定义了严密的规则:音乐与视频帧对齐(节拍锁定)、每个视觉事件对应唯一音效类型、随机音高微调避免重复感、对音乐进行指定频段的微闪避(-8 dB, 60 ms)而非全频段压缩,并确保最终输出达到平台响度标准(-13 LUFS)。它支持 Windows、macOS、Linux 平台,依赖 Python 3、numpy、scipy 和 ffmpeg,特别适合为社交媒体 Reels、宣传片、UI 演示等快速生成专业级音效。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/qiyascc/ai-skills/tree/HEAD/skills/motion-sound-design

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

运动音效设计 是做什么的?

风格规则: 撰写任何内容(回复、规格、字幕、文件)时,永远不要使用长破折号或短破折号。请改用逗号、冒号、句号、括号或普通连字符。

音效是让运动视频显得高级的一半因素。默认输出通常没有声音,或者只是随意粘贴一首音乐。此技能让每个视觉事件都听得到,保持音乐在下方干净,并母带至平台响度。它附带一个工具,可合成干净的 UI 音效库(无需下载),并将提示列表混音成母带 WAV 文件。

请用用户的语言回复。

0. 本技能包含的文件

文件使用时机
scripts/sfx.py构建音效库、混音提示列表、将音频封装到视频中
assets/cues.example.json创建提示列表的起始点

scripts/sfx.py 需要 Python 3 以及 numpy 和 scipy(运行 pip install numpy scipy,仅当系统 Python 拒绝时才添加 --break-system-packages)和 ffmpeg 用于 mix 和 mux 命令。请在此技能文件夹内运行:

  • python3 scripts/sfx.py synth sfx_lib → 生成 12 种音效类型 × 3 种变体:tick, click, key, pop, whoosh, swish, thud, chime, shine, squelch, snip, shutter(无需 ffmpeg)
  • python3 scripts/sfx.py mix cues.json mix.wav → 放置提示,应用以下所有规则,进行母带处理
  • python3 scripts/sfx.py mux video.mp4 mix.wav final.mp4

真实采样优于合成音效:如果用户拥有音效包(Epidemic, Artlist, freesound CC0),将文件放入音效库文件夹,命名为 TYPE_anything.wav(例如 whoosh_soft.wav),脚本会自动使用它们。

1. 音乐

  • 根据影片的情感和能量选择音乐,而非潮流。UI/技术类平静场景:使用柔和极简环境音,无骤降,无重低音。宣传片:使用节奏感强的电子音乐 120-140 BPM。高能量场景:150-160 BPM。
  • 将剪辑锁定到音轨:记下 BPM,选择一个起始偏移量,使得第 0 拍落在第 0 帧,并将影片最大的视觉变化点放在音轨的骤降/乐句变化处。
  • 音乐高通滤波至约 55 Hz(避免手机扬声器的次声轰鸣);除非有助于叙事,否则不要使用扫频滤波。
  • 透视音效: 当摄像机进入某个物体内部(房间、设备、水下)时,切掉底鼓和贝斯,仅保留高频部分(“隔墙听到的效果”);退出时恢复低频,并在关键瞬间达到全频段。
  • 许可:商业发布需要授权音乐(平台商业库或付费库)。切勿建议盗取音频。
  • 如果用户想根据情绪选择特定曲目,请使用 reels-music-picker(如果可用)。

2. 每个视觉事件一个音效

将每个视觉事件映射到一种音效类型:

视觉事件音效
首帧 / 标志闪光shine(柔和,前 12 帧内不要硬音效)
物体跳跃/飞行/镜头甩动whoosh(长)或 swish(短)
着陆、落入槽位thud(柔和,无次声)
卡片/横幅滑入swish + click
按钮按下、切换开关、行折叠click
数字、里程表滚轮、计数器tick(每个落地数字)
打字key(快速打字时每 2-4 个字母一次)
图标/徽章弹跳、对勾pop / snip / “标记笔划”(snip)
液体扩散、墨滴合并squelch
快门、光圈、截屏shutter
成功、最终锁定chime

规则(由混音器自动应用):

  • 每次播放随机音高偏移 ±1 个半音,避免重复听起来机械
  • 2 秒内不得重复同一采样(每类有 3 种变体)
  • 任何 0.25 秒内最多 8 个事件(超出部分丢弃并报告);过于密集会破坏清晰度
  • 小型 UI 音效(tick, click, key, swish, pop, snip)160 Hz 高通滤波
  • SFX 层中无音符、轰鸣声或次声冲击

3. 电平与混音

默认电平相对于同一频段的音乐(已内置到工具中,可通过提示中的 "db" 覆盖): ticks +10.5 dB (4-10 kHz) · clicks +10 · keys +9 (1.5-8 kHz) · swishes +9.5 · hits/thuds +7 · pops +8 · squelch +7 · chime +5。

  • 无泵动侧链压缩。 相反,在每个 tick/click/key 下方,音乐在 2-8 kHz 范围内获得 -8 dB、60 ms 的衰减(微闪避),使得音效穿透力强,同时音乐律动得以延续。
  • 母带:-13 LUFS 集成响度(Reels/TikTok/Shorts),真实峰值 ≤ -1 dBTP,使用前视限幅器避免泵动感。YouTube 长视频使用 -14。sfx.py mix 将限制设置比真实峰值目标低 1 dB,因为 mux 中的 AAC 编码会使峰值升高约 0.6 dB。
  • 配音(如果有)位于上方:音乐背景比语音低 18-25 dB。
  • 在手机扬声器和耳机上检查。

4. cues.json 格式

起始模板位于 assets/cues.example.json。

{
  "duration": 15.0, "lufs": -13, "true_peak": -1.0, "seed": 3,
  "library": "sfx_lib",
  "music": "track.mp3", "music_start": 49.735, "music_gain_db": 0, "music_highpass": 55,
  "duck": {"db": -8, "ms": 60, "band": [2000, 8000], "types": ["tick", "click", "key"]},
  "cues": [
    {"t": 0.05, "type": "shine"},
    {"t": 0.59, "type": "whoosh"},
    {"t": 0.99, "type": "thud"},
    {"t": 3.16, "type": "swish", "db": 12}
  ]
}

路径相对于 JSON 文件的位置。仅使用 SFX 时省略 music。

5. 工作流程

  1. 根据时间规格(motion-story-director),列出每个视觉事件及其精确时间 → 提示列表。如果规格是节拍锁定的,则对齐到节拍网格。
  2. synth 合成音效库(或使用用户的采样)。
  3. mix 混音 → 阅读报告:丢弃的提示表示该时刻密度过高。
  4. 验证响度:ffmpeg -i mix.wav -af ebur128 -f null - 2>&1 | grep "I:"。
  5. mux 与渲染的视频封装;交付最终的 MP4 文件。

对于任何采用以下形式的规格,编写简短的 SOUND 部分:音乐(情绪、BPM、偏移量、高通)→ 事件列表及时间 → 电平 → 母带目标。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

motion-render-pro

Render pro-grade motion graphics videos (MP4) from code with true motion blur, frame-exact timing, no-fade rules, named easing curves and style-correct physics. Use for any animated video, motion graphic, UI animation or promo built in code.

motion-story-director

Turn an idea into a frame-exact, beat-locked motion video spec (hero object, object-handoff transitions, camera language, ban list) and lint any motion prompt for timing, count and density errors.

reels-edit-director

Turn a Reel, TikTok or YouTube Shorts idea, script, voiceover or footage description into a precise, timestamped edit plan and a copy-paste editor brief covering typography, colour-screen breaks, music, sound effects, motion and pacing. Also diagnoses drafts that feel boring, chaotic or lose viewers. Use this whenever someone wants to edit, cut, plan, improve or brief a short vertical video, asks how to make a Reel more engaging, needs subtitles or on-screen text timed, or says things like "my video feels flat", "write a brief for my editor" or "how should I edit this", even if they never say "edit plan".

reels-music-picker

Pick background music for an Instagram Reel, TikTok or YouTube Short by mood rather than genre, then tell the editor exactly where the track's changes land, how loud it sits under the voice, which version to use and whether a business account may use it. Includes beat and bar maths, a loudness checker and licensing guidance. Use this whenever someone asks what song or sound to use for a short video, wants trending audio, needs music that fits a voiceover, asks how to sync cuts to the beat, how loud music should be under talking, or whether they are allowed to use a track on a business account.

相关技能