Codex skill and standalone scripts for turning YouTube or local foreign-language videos into:
概览
Codex skill and standalone scripts for turning YouTube or local foreign-language videos into:
README
video-Zebra-china
Codex skill and standalone scripts for turning YouTube or local foreign-language videos into:
- Simplified Chinese subtitles
- Mandarin dubbing
- final MP4 exports with burned-in subtitles
The current pipeline uses:
yt-dlpfor YouTube downloadfaster-whisperfor local ASR- Volcengine
TranslateTextfor subtitle translation - Volc TTS
openspeech.bytedance.com/api/v3/tts/unidirectionalfor Mandarin dubbing ffmpegfor audio mixing and final export
Repository Layout
SKILL.md: Codex skill entryscripts/localize_video.py: end-to-end pipelinescripts/run_localize_video.sh: launcher that prefers.venvand falls back topython3references/runtime-requirements.md: setup notes and troubleshootingagents/openai.yaml: skill metadata
Quick Start
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
brew install ffmpeg yt-dlp
Set credentials:
export VOLCENGINE_ACCESS_KEY="AK..."
export VOLCENGINE_SECRET_KEY="SK..."
export VOLCENGINE_REGION="cn-north-1"
export VOLCENGINE_TTS_API_KEY="your-tts-api-key"
export VOLCENGINE_TTS_RESOURCE_ID="volc.service_type.10029"
Run with a YouTube URL:
scripts/run_localize_video.sh \
--input "https://www.youtube.com/watch?v=..." \
--workdir ./runs/demo
If YouTube blocks anonymous download, reuse browser cookies:
scripts/run_localize_video.sh \
--input "https://www.youtube.com/watch?v=..." \
--workdir ./runs/demo \
--cookies-from-browser edge
Run with a local file:
scripts/run_localize_video.sh \
--input /path/to/video.mp4 \
--workdir ./runs/local-video \
--voice zh_male_beijingxiaoye_emo_v2_mars_bigtts
Outputs
The pipeline writes these files into the selected work directory:
source.*audio.wavtranscript.jsontranslated_segments.jsonsubtitles.zh.srtdub_track.wavfinal_audio.wavfinal.mp4
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add jiayuqi7813/video-zebra-china