Translate Chinese short videos into English subtitles with English voiceover for English learning. TRIGGERS ON: any video URL from Douyin/TikTok/Bilibili/抖音 combined with translation-related words (翻译, translate, 英文, English, 字幕, subtitles, 配音, dubbing, 学英语, learn English). Key patterns: '翻译一下' + video link, '翻译这个视频', 'translate this video', video link + '翻译/translate'. Also triggers on: 抖音视频翻译, 配英文字幕, 英文配音, Chinese to English video translation, 把视频翻译成英文, 帮我翻译, v.douyin.com + 翻译. When user shares a Chinese short video platform link (v.douyin.com, douyin.com, tiktok.com, bilibili.com, b23.tv) and mentions ANY form of translation, this skill applies. Outputs: original video + translated video with burned-in English subtitles and English TTS audio track.
Transform Chinese short videos (Douyin, TikTok, Bilibili, etc.) into English learning materials by:
When the user:
URL patterns that indicate Chinese short videos:
v.douyin.com/*, douyin.com/*tiktok.com/*bilibili.com/*, b23.tv/*Key rule: If the user shares a link from any of the above platforms and mentions translation in ANY form, use this skill — not video-summarizer.
All output is saved to output/<video-title>/ in the workspace:
output/<video-title>/
├── original.mp4 # Original video (copied/downloaded)
└── translated.mp4 # English subtitles + English voiceover
Intermediate files (audio, SRT files, TTS clips) are created in a system temp directory (mktemp -d). Do NOT manually delete them — macOS automatically cleans /tmp periodically (~3 days). Keeping temp files allows quick iteration (re-translate, adjust TTS, etc.) without re-running expensive steps like transcription.
bash "$SKILL_DIR/scripts/install_deps.sh"
This checks and installs: yt-dlp, ffmpeg, uv (Python package manager).
If the user provides a URL:
# Create output directory
mkdir -p "output/<video-title>"
# Download with yt-dlp
yt-dlp -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" \
--merge-output-format mp4 \
-o "output/<video-title>/original.mp4" \
"<video-url>"
If the user provides a local file:
cp "<local-video-path>" "output/<video-title>/original.mp4"
First, extract audio from the video:
TMPDIR=$(mktemp -d)
ffmpeg -y -i "output/<video-title>/original.mp4" -vn -acodec pcm_s16le -ar 16000 -ac 1 "$TMPDIR/audio.wav"
Then run the transcription script:
uv run "$SKILL_DIR/scripts/parallel_transcribe.py" \
--input "$TMPDIR/audio.wav" \
--output "$TMPDIR/chinese.srt" \
--model small \
--language zh
This outputs a Chinese SRT file with timestamps.
This step is performed by the Agent (you), NOT by a script.
Read the Chinese SRT file and translate each subtitle entry to English. Follow the guidelines in $SKILL_DIR/references/translation-guidelines.md.
Key rules:
Example transformation:
Input (chinese.srt):
1