/vault-video:bili-talk-repackfrom vault-video
把一支 B 站讲解视频做成中文课件、可播放口播网页和 MP4。用户给 b23.tv、bilibili.com 或 BV 链接,并要求下载、总结、做 PPT、做口播或导出视频时使用。原片可以是英文。不用于:只要视频文件;只要逐字稿;YouTube、抖音或其他站点;已经有成片只做剪辑。
Ships in vault-video. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
一支讲解视频变成三件东西:16 页以内的中文课件、可拖动播放的口播网页、1920×1080 的 MP4。
事实只来自原片逐字稿。口播是压缩重讲,不是逐句翻译,也不是另写一篇。讲者的估计、自述和转述,交付里要标明口径。
| 项 | 怎么定 |
|---|---|
| 原片 | BV 号、标题、时长、语言 |
| 口播 | 中文字数 ÷ 5.0 字/秒。edge-tts 云扬实测 5.04 字/秒 |
| 成片 | 口播 + 1.4 秒开场 + 每段间 0.55 秒 + 2.6 秒收尾 |
时长和预估差过 20%,先改稿,不加速语音。字段和分区见 references/timing.md、references/layout.md。
scripts/fetch_bili.py,参数是 URL 和 -o source/。它走公开接口,不需要登录。返回没有 DASH 流,就是登录墙,停下来说明。av 与 faster-whisper 版本可能不兼容,decode_audio 会因 metadata_errors 崩溃。用 ffmpeg 解成 16 kHz float32 数组再送识别。脚本是 scripts/transcribe_chunks.py。段号 × 115,拼成 transcript_clean.txt。专名对照上下文校正,并在口径表里记下 ASR 原写法。10 到 14 段,每段 70 到 120 个汉字。写入口播稿文档,附章节、分镜和事实口径。
语音用 scripts/tts_edge.py,参数是项目目录,默认 zh-CN-YunyangNeural。MiniMax 接口不在当前工具里时不要空等。合成后用真实时长排时间轴。
先用 scripts/check_timeline.py 校验 assets/sample-timeline.json。scripts/build_audio.py 读取 seconds 字段,铺一条 numpy 和弦,人声在场时把铺底压到 0.55。节奏固定:开场 1.4 秒,间隔 0.55 秒,收尾 2.6 秒。
index.html、motion.js、timeline.js 放在 reel/。
renderAt(t) 幂等。不用 Math.random、Date.now、requestAnimationFrame 或 CSS 动画决定画面。translate(-50%,-50%)。getTotalLength()。需要路径长度时,改用宽度、位移这些不依赖测量的写法。white-space: pre-wrap。删除线放在字的下方,不能穿过字形。播放条只在预览时出现。截图前给 body 加 capture,把它隐藏。
本机 Python 版 Playwright 的驱动可能是空的。先设 NODE_PATH 为 npm root -g,脚本再从已安装的 ms-playwright\chromium-* 选择浏览器。scripts/shot.mjs 和 scripts/render_video.mjs 走全局 Playwright,浏览器用 %LOCALAPPDATA%\ms-playwright 里已安装的 Chromium。import 用 createRequire,Windows 不接受 ESM 直接加载盘符路径。
先抽每段中间一帧看字有没有溢出、线有没有切字、对比够不够。再跑整片。7728 帧量级中途可能无报错停止。恢复步骤见 references/render-recovery.md。
合成:
ffmpeg -y -framerate 30 -i reel/frames/f_%05d.png -i reel/audio/final.wav -c:v libx264 -crf 18 -pix_fmt yuv420p -c:a aac -b:a 192k -shortest reel/out/final.mp4
成片核对时长、分辨率、帧率、音轨,以及开场、中段、结尾三个画面。确认后删除 reel/frames,单帧 PNG 约 7 GB。
PptxGenJS,16 页以内,和成片同一套纸色、墨色、朱红。pptx.layout 用自定义 13.333×7.5。颜色不带 #。文本需要对齐时 margin: 0。每页备注写原片时间和口径。
混音和页数规则见 references/audio-deck.md。生成后用 scripts/render_pptx.py 把每页画成 PNG。重点看卡片里的字是否换行溢出、大数字是否压到正文。
$env:NODE_PATH = (npm root -g) 后再 require('pptxgenjs')。
<slug>/
source/source.mp4 source.m4a source.meta.json
source/transcript/transcript_clean.txt
reel/index.html motion.js timeline.js
reel/audio/final.wav reel/out/final.mp4
ppt/<name>.pptx ppt/qa/slide-*.png
01-口播稿与分镜.md
告诉用户三个路径、成片时长和分辨率、口播实测字速,以及口径表里哪些数字是讲者自述。网页双击可播,但依赖旁边的 timeline.js 和音频,不是单文件。
按这个顺序停下来,不要跳到下一个产物:
source.meta.json 有 BV、时长和字节数;音视频都能被 ffmpeg 读到。transcript_clean.txt 的时间戳跨过全部音频,专名经过人工校正。scripts/check_timeline.py 对成片 timeline.json 返回 0。公开接口没有目标清晰度时,交付里写明实际清晰度,不反复请求同一接口。
| 现象 | 原因 | 处理 |
|---|---|---|
| 转写像拼音 | 中文 Paraformer 听英文 | 换 faster-whisper |
| 进程退出码 -1,无 traceback | large-v3 并行内存不足 | small.en,一次一段 |
metadata_errors TypeError | av 与 faster-whisper 版本不匹配 | ffmpeg 解数组 |
| Playwright 找不到 cli.js | Python 包的 driver 是空的 | 全局 npm Playwright |
截图永远等不到 __ready | 隐藏 SVG 上取路径长度抛错 | 不依赖测量 |
| 删除线穿过文字 | 线的 y 落在字号中间 | 移到字框下沿 |
assets/sample-timeline.json (opens in a new tab)references/audio-deck.md (opens in a new tab)references/layout.md (opens in a new tab)references/measured-run.md (opens in a new tab)references/render-recovery.md (opens in a new tab)references/timing.md (opens in a new tab)scripts/build_audio.py (opens in a new tab)scripts/check_package.py (opens in a new tab)scripts/check_timeline.py (opens in a new tab)scripts/fetch_bili.py (opens in a new tab)scripts/render_pptx.py (opens in a new tab)scripts/render_video.mjs (opens in a new tab)scripts/shot.mjs (opens in a new tab)scripts/transcribe_chunks.py (opens in a new tab)scripts/tts_edge.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub yhyu13/agentskillsvault --plugin vault-video26 skills in this plugin
/3d-ultra-realistic-waterBuild an ultra-realistic open ocean in Three.js with a deep-water Gerstner spectrum shaded per pixel from analytic derivatives, each wave faded at its own pixel footprint, plus Fresnel sky-cube and planar reflections, subsurface light through the crests, HDR sun glitter, Jacobian lace foam, a Kelvin wake, hull foam, buoyancy queries and aerial perspective into the sky's horizon haze. Use for seas, oceans, sunset or daylight water, sun glitter paths, ship or boat scenes, wakes, coastal flyovers and any 3D scene with a moving camera and a water horizon. Includes the approved water from Pirate Ship Sunset as a reusable module and demo./3d-underwater-god-raysAdd volumetric underwater god rays to a Three.js scene, marching one drifting swell field along every view ray at half resolution so the light shafts converge on the sun, parallax with the camera and carry rippling caustic streaks, with a shimmering surface underside, a sun that wobbles through the ripples, and the same light dappling fish as they swim through the beams. Use for underwater scenes, oceans seen from below, aquariums, reefs, kelp forests, diving and shipwreck scenes, schools of fish, sunbeams or light shafts through water, caustics, "rays of light shining through the ocean", or watery ripples on a background. Includes a reusable module and the Blue Hour sardine-school demo./3d-wood-lighting-scorecardLight carved wood in a dark room in three.js, with procedural grain and pores, one warm key through a window, soft shadows that touch, light shafts, background rays and dust, then score the render out of 10 on an anchored rubric with a runnable headless scorecard and iterate until each item reaches the target. Use for oiled timber, kumiko, joinery and workshop scenes; wood that reads flat, plastic or washed out; volumetrics that lift the blacks; "score this out of 10"; or "get the lighting to 8"./anidoodleCode-drawn stills, drawing timelapses, films, explainers and interactive web animations in 32 styles, with composed scores. Matches a reference style, keeps characters consistent, teaches drawing. Deterministic, no generated assets./article-prompts-to-skillsConvert an article, tutorial, or prompt pack into focused reusable AgentSkills, one independent capability per skill, with portable instructions, example prompts, working demos, preview screenshots, validation, gallery updates, and a narrow commit. Use when the user asks to turn an article's prompts, tutorial sections, design patterns, interactions, or workflow ideas into complete skills rather than leaving them as prose./aura-asset-imagesAura Assets (aura.build) imagery only. Use when you need high-quality stock-style images from Aura Assets (aura.build/assets) similar to Unsplash for design mockups and marketing: backgrounds, abstract wallpapers, architecture, portraits, and headshots. Includes a workflow for searching by tag on aura.build/assets and returns 5 real image URLs per category plus practical guidance for using different resolutions and aspect ratios. Not for Unsplash - use unsplash-asset-images.