skills/lyrics-video-sync/SKILL.md
歌词-视频精准匹配引擎。将MP3中的歌词片段按时间轴精准匹配到对应视频clip,支持歌词提取、时间轴对齐、情绪映射、字幕烧录、音频分段混合。触发词:歌词匹配、lyrics sync、歌词卡点、音频对齐、字幕视频、lyrics video、歌词视频、音乐视频字幕
npx skillsauth add aaaaqwq/agi-super-team lyrics-video-syncInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
AI MV 制作中,音频和视频经常脱节:
音频文件(MP3) → 歌词提取/对齐 → 场景时间轴匹配 → 音频分段 → 视频混合 → 字幕烧录
支持格式:
[00:15.00]樱花飘落的季节{lines: [{text, start_s, end_s}]}# 使用 Whisper 识别歌词(带时间戳)
python3 scripts/extract_lyrics_whisper.py \
--audio input.mp3 \
--output lyrics.json \
--language ja \
--model large
python3 scripts/manual_lyrics_editor.py \
--audio input.mp3 \
--output lyrics.json
输出统一格式 (lyrics.json):
{
"bpm": 90,
"duration": 236.8,
"lines": [
{
"index": 0,
"text": "桜が散る季節に",
"text_cn": "樱花飘落的季节",
"start_s": 24.0,
"end_s": 28.5,
"section": "verse1",
"emotion": "gentle",
"energy": 0.4
}
],
"sections": [
{
"type": "intro",
"start_s": 0,
"end_s": 24,
"energy": 0.3,
"emotion": "peaceful"
},
{
"type": "chorus",
"start_s": 94.7,
"end_s": 122.3,
"energy": 0.8,
"emotion": "passionate"
}
]
}
| 歌词特征 | 推荐画面 | |---------|---------| | 自然意象(花/雨/风/月) | 对应自然景观 | | 情感词(想/哭/笑) | 角色表情特写 | | 动作词(走/跑/飞) | 对应角色动作 | | 抽象词(梦/希望/自由) | 抽象/梦幻画面 | | 重复/叠句 | 重复构图但不同角度 |
python3 scripts/map_lyrics_to_scenes.py \
--lyrics lyrics.json \
--scenes scenes.json \
--output edit_plan.json \
--strategy emotion_energy
映射策略:
每个视频 clip 对应一段音频,精确裁剪:
python3 scripts/segment_audio.py \
--audio input.mp3 \
--edit-plan edit_plan.json \
--output-dir segments/ \
--fade-in 0.3 \
--fade-out 0.5
# 单个 clip + 对应音频段
ffmpeg -y -hide_banner \
-i clip.mp4 \
-i segment_01.m4a \
-c:v libx264 -crf 18 \
-c:a aac -b:a 192k \
-shortest \
clip_with_audio.mp4
# 多 clip 合并 + 全曲音频
ffmpeg -y -hide_banner \
-f concat -safe 0 -i clips.txt \
-i full_audio.mp3 \
-c:v libx264 -crf 18 \
-c:a aac -b:a 192k \
-shortest \
final_mv.mp4
# 对话/人声场景降低音乐音量
ffmpeg -i video.mp4 -i audio.mp3 \
-filter_complex "[1:a]volume=0.3[a]" \
-map 0:v -map "[a]" output.mp4
python3 scripts/lyrics_to_srt.py \
--lyrics lyrics.json \
--output subtitles.srt \
--style dual \
--font "Noto Sans CJK JP"
字幕样式选项:
ffmpeg -y -hide_banner \
-i final_mv.mp4 \
-vf "subtitles=subtitles.srt:force_style='FontSize=18,PrimaryColour=&H00FFFFFF,OutlineColour=&H00000000,Outline=2,Alignment=2'" \
-c:a copy \
final_mv_subtitled.mp4
支持更丰富的样式:
python3 scripts/lyrics_to_ass.py \
--lyrics lyrics.json \
--output subtitles.ass \
--template karaoke_glow
# 从音频到带字幕的MV
export PATH="$HOME/tools:$PATH"
# 1. 提取歌词
python3 scripts/extract_lyrics_whisper.py \
--audio sakura_mv.mp3 -o lyrics.json
# 2. 映射到场景
python3 scripts/map_lyrics_to_scenes.py \
--lyrics lyrics.json \
--scenes video_plan.json \
-o edit_plan.json
# 3. 分段音频
python3 scripts/segment_audio.py \
--audio sakura_mv.mp3 \
--edit-plan edit_plan.json \
-o segments/
# 4. 逐clip混合音频
for clip in clips/*.mp4; do
name=$(basename "$clip" .mp4)
seg="segments/${name}.m4a"
[ -f "$seg" ] && ffmpeg -y -i "$clip" -i "$seg" \
-c:v copy -c:a aac -shortest "mixed/${name}.mp4"
done
# 5. 合并全部 + 烧录字幕
ffmpeg -f concat -safe 0 -i mixed.txt -i sakura_mv.mp3 \
-vf "subtitles=subs.srt" -c:a aac -shortest final.mp4
lyrics-video-sync (歌词匹配)
← cinematic-video-gen (prompt增强,确保画面匹配歌词意境)
← qingyun-api (实际视频生成)
← av-sync-workflow (节拍级精度的音视频同步)
→ ffmpeg-video-editor (最终合成)
av-sync-workflow 的 beat syncscripts/
├── extract_lyrics_whisper.py # Whisper歌词提取
├── map_lyrics_to_scenes.py # 歌词→场景映射
├── segment_audio.py # 音频精准分段
├── lyrics_to_srt.py # 歌词→SRT字幕
├── lyrics_to_ass.py # 歌词→ASS高级字幕
├── manual_lyrics_editor.py # 手动标注工具
└── verify_sync.py # 同步验证
创建日期: 2026-04-10 创建人: 小a (CEO) — 基于《樱花落尽时》MV制作需求
development
Technology-agnostic prompt generator that creates customizable AI prompts for scanning codebases and identifying high-quality code exemplars. Supports multiple programming languages (.NET, Java, JavaScript, TypeScript, React, Angular, Python) with configurable analysis depth, categorization methods, and documentation formats to establish coding standards and maintain consistency across development teams.
tools
Expert-level browser automation, debugging, and performance analysis using Chrome DevTools MCP. Use for interacting with web pages, capturing screenshots, analyzing network traffic, and profiling performance.
data-ai
Prompt for creating detailed feature implementation plans, following Epoch monorepo structure.
tools
Interactive prompt refinement workflow: interrogates scope, deliverables, constraints; copies final markdown to clipboard; never writes code. Requires the Joyride extension.