A Claude Code skill that repurposes YouTube videos for Bilibili with bilingual (EN/ZH) hardcoded subtitles.
Compatible with Claude Code, OpenClaw, Hermes Agent, Pi (pi-mono), and indexed by SkillsMP.
YouTube → yt-dlp → whisper → validate → translate → merge → ffmpeg → publish_info → Bilibili
| Step | Tool | Output |
|---|---|---|
| Download | yt-dlp |
.mp4 |
| Transcribe | whisper |
_{lang}.srt |
| Validate/Fix | srt_utils.py |
_{lang}.srt (fixed) |
| Translate | AI | _zh.srt |
| Merge | srt_utils.py |
_bilingual.srt |
| Burn | ffmpeg |
_bilingual.mp4 |
| Publish Info | AI | publish_info.md |
/yt2bb https://www.youtube.com/watch?v=VIDEO_ID
git clone https://github.com/Agents365-ai/yt2bb.git ~/.claude/skills/yt2bbgit clone https://github.com/Agents365-ai/yt2bb.git ~/.openclaw/skills/yt2bbgit clone https://github.com/Agents365-ai/yt2bb.git ~/.hermes/skills/media/yt2bbgit clone https://github.com/Agents365-ai/yt2bb.git ~/.pi/agent/skills/yt2bb- Python 3
- ffmpeg
- yt-dlp
- openai-whisper
- YouTube account logged in via Chrome browser (yt-dlp extracts cookies automatically)
# Detect platform and recommend whisper backend + model
python3 srt_utils.py check-whisper
# Merge EN and ZH subtitles
python3 srt_utils.py merge en.srt zh.srt output.srt
# Validate timing issues
python3 srt_utils.py validate input.srt
# Lint against Netflix Timed Text Style Guide (CPS, duration, line length, gaps)
python3 srt_utils.py lint bilingual.srt
# Fix timing overlaps
python3 srt_utils.py fix input.srt output.srt
# Convert to styled ASS (presets: netflix, clean, glow)
# Presets stay bottom-aligned and scale with resolution
# `netflix` = broadcast-grade: white text, thin outline, soft shadow, no box
python3 srt_utils.py to_ass bilingual.srt bilingual.ass --preset netflix
python3 srt_utils.py to_ass bilingual.srt bilingual.ass --style-file custom.ass
# Generate slug from title
python3 srt_utils.py slugify "Video Title"All subcommands support --format json for structured agent-friendly output. merge and to_ass support --dry-run to validate inputs without writing files.
All three presets rendered on the same 1920×1080 background, so you can compare typography, layout, and contrast at a glance.
To regenerate these images after changing a preset, run:
bash docs/presets/render_previews.shThe script renders each preset against a neutral gradient background using the committed docs/presets/sample.srt fixture and writes docs/presets/{preset}.png.
MIT License
If this project helps you, consider supporting the author:
WeChat Pay |
Alipay |
Buy Me a Coffee |
探索未至之境





