Install
openclaw skills install video-dubWindows-first video localization pipeline for downloading, transcribing, translating, dubbing, and retiming YouTube or Bilibili videos.
openclaw skills install video-dubUse this skill when a user wants to turn a source video into a localized dubbed video with aligned subtitles.
This skill bundles the complete video_pipeline, so the pipeline code is included with the skill installation.
Primary workflow:
The main controller is video_pipeline/scripts/quick_deliver.py.
| Variable | Required | Description |
|---|---|---|
DEEPSEEK_API_KEY | Yes* | DeepSeek API key for translation. *Required if using default translation path. |
YTDLP_COOKIES_FILE | No | Path to YouTube cookies.txt for reliable downloads |
NODE_OPTIONS | No | Set to --max-old-space-size=4096 if YouTube shows JavaScript challenges |
| Provider | Env Variable | Required |
|---|---|---|
| Edge TTS (default) | TTS_PROVIDER=edge | No |
| VolcEngine | TTS_PROVIDER=volcengine + API key | No |
| Azure | TTS_PROVIDER=azure + API key | No |
| Windows SAPI | TTS_PROVIDER=windows_sapi | No |
The default translation uses DeepSeek API. To use a different provider, edit video_pipeline/scripts/services/deepseek_translator.py and replace the base URL with your preferred API (e.g., OpenAI, Anthropic, Grok, etc.). The translation interface is standardized, so any LLM API that supports chat completions can be substituted.
pip install -r video_pipeline/requirements.txt
Key packages: yt-dlp, openai-whisper, torch, ffmpeg-python, edge-tts
smalledge (no API key needed)zh-CN-YunjianNeural0.05s*_zh_retimed_v4_final.srtFor reverse localization, reasonable English voice: en-US-GuyNeural
The enrichment stage automatically applies a local glossary before translation.
Use it to normalize:
Recommended format:
{
"terms": [
{ "canonical": "Kyiv" },
{
"canonical": "Armed Forces of the Russian Federation",
"aliases": [
"armed force of the Russian Federation",
"Amodovvoso-Durasian Federation"
],
"min_similarity": 0.72
}
]
}
Rules:
canonical is required.aliases is optional.aliases is omitted, the canonical term still participates in fuzzy matching.min_similarity is optional.# Install dependencies first
pip install -r video_pipeline/requirements.txt
# Set required environment variables
$env:DEEPSEEK_API_KEY="your_deepseek_api_key" # Required for translation
# Optional: for reliable YouTube downloads
$env:YTDLP_COOKIES_FILE="path\to\youtube_cookies.txt"
$env:NODE_OPTIONS="--max-old-space-size=4096"
# Run the pipeline
cd <skill_root>\video_pipeline
python .\scripts\quick_deliver.py "https://www.youtube.com/watch?v=VIDEO_ID"
To rebuild an already processed video:
python .\scripts\quick_deliver.py "https://www.youtube.com/watch?v=VIDEO_ID" --refresh-tts
After a successful forward run:
video_pipeline/data/output/*_zh_retimed_v4.mp4 - final dubbed videovideo_pipeline/data/subtitles/*_zh_retimed_v4_final.srt - final subtitle fileOptional outputs:
video_pipeline/data/output/*_zh_male.mp4video_pipeline/data/subtitles/*_zh.srtvideo_pipeline/data/subtitles/*_zh_retimed_v4.srtvideo_pipeline/data/structured/*.jsonvideo_pipeline/data/state/debug/*_en_blocks.jsonWhen an agent runs this skill:
DEEPSEEK_API_KEY for translation)quick_deliver.py from the video_pipeline subdirectoryThis skill uses common patterns that may trigger automated security scanners:
subprocess: Used to call ffmpeg, ffprobe, and yt-dlp for video processing. These are legitimate system utilities.os.getenv("DEEPSEEK_API_KEY"): API key is read from environment variables only, never hardcoded.decode(): Audio/video data is decoded for processing, not for malicious purposes.These are standard practices for video processing pipelines and do not indicate any malicious behavior. The code does not:
If your security scanner blocks this skill, you can verify by reviewing the source code in video_pipeline/scripts/.
This skill is published with the pipeline code bundled in the video_pipeline/ subdirectory.
The bundle excludes generated outputs and caches (data/raw/, data/audio/, data/tts/, data/output/, data/state/, etc.).
To rebuild the release bundle from source:
.\scripts\package_release.ps1 -SourceRoot "D:\video_pipeline" -DestinationRoot "<skill_destination>"