Install
openclaw skills install @syanchen7/video-downloader-enhancedDownload videos and extract original post captions, audio transcripts, and metadata from video platform links. Use when the user provides Douyin, Bilibili, WeChat Channels, Xiaohongshu, or YouTube links and asks to save the original video, capture the post text/caption, transcribe the spoken in-video script/copy, archive source material, or prepare video material for downstream analysis or skill creation. Douyin is implemented with an H5 primary route and yt-dlp fallback; Bilibili, YouTube, and Xiaohongshu are implemented through yt-dlp; WeChat Channels is not implemented yet and should currently be handled via the WeChat mini program kg百宝箱.
openclaw skills install @syanchen7/video-downloader-enhancedUse this skill to turn a video-platform URL into a local source-material folder containing the video file, post_caption.txt, audio.wav / audio.m4a / audio.mp3, transcript.txt, transcript.srt (whisper.cpp only), and metadata.json.
Terminology:
post_caption.txt: platform publish text, title, description, and hashtags.transcript.txt: spoken in-video script generated from audio ASR.metadata.json: normalized platform metadata plus download and ASR status.Each download creates a folder with a human-readable name:
YY_MM_DD_标题摘要_平台_作者
Example: 26_07_27_AI做PPT零基础终极教程_抖音_木子不写代码
Rules:
YY_MM_DD.#), mentions (@), emoji removed.抖音 / B站 / YouTube / 小红书.未知作者 when unavailable.post_caption.txt, metadata.json, etc.) are not affected.The current implemented providers are Douyin, Bilibili, YouTube, and Xiaohongshu. WeChat Channels is an explicit extension point; do not claim that provider works until its provider module has been implemented and tested. For WeChat Channels links, tell the user to first use the WeChat mini program kg百宝箱 to download the video from the 视频号 link, then continue with local ASR or downstream processing on the downloaded file.
Run the bundled CLI from this skill directory:
python3 scripts/download_video.py "https://v.douyin.com/..." --output-dir ./downloads
For metadata/post-caption extraction without downloading the video:
python3 scripts/download_video.py "https://v.douyin.com/..." --output-dir ./downloads --metadata-only
For download without ASR:
python3 scripts/download_video.py "https://v.douyin.com/..." --output-dir ./downloads --asr none
For Chinese speech with local whisper.cpp (recommended):
python3 scripts/download_video.py "https://v.douyin.com/..." --output-dir ./downloads --asr whisper_cpp --asr-language Chinese
For Chinese speech with cloud ASR:
SILICONFLOW_API_KEY="..." python3 scripts/download_video.py "https://v.douyin.com/..." --output-dir ./downloads --asr siliconflow --asr-language Chinese
To bias ASR toward domain terms or a specific script:
python3 scripts/download_video.py "https://v.douyin.com/..." --output-dir ./downloads --asr-language Chinese --asr-prompt "请使用简体中文转写。关键词:丧尸清道夫、Shotlab、Midjourney、GPT Image、AI生图。"
scripts/download_video.py as the single entrypoint.After a video is downloaded, the CLI extracts audio with ffmpeg and transcribes it. Four backends are available, selected via --asr.
| Backend | Description |
|---|---|
auto (default) | Auto-detect: whisper.cpp > openai-whisper > SiliconFlow |
whisper_cpp | Local whisper.cpp (whisper-cli), fastest on Apple Silicon |
whisper | Local openai-whisper Python CLI |
siliconflow | Cloud API via SiliconFlow SenseVoiceSmall |
none | Skip audio extraction and transcription entirely |
--asr auto PriorityWhen --asr auto (the default) is used, the backend is selected in this order:
WHISPER_CPP_BIN points to an executable file, or whisper-cli is available on PATH, and WHISPER_CPP_MODEL points to an existing model file.whisper CLI is available on PATH.SILICONFLOW_API_KEY is set in the environment.--asr whisper_cpp)The recommended local backend for best performance on Apple Silicon.
Environment variables:
WHISPER_CPP_BIN — optional explicit path to whisper-cli; when unset, search PATHWHISPER_CPP_MODEL — required path to a local GGML model fileexport WHISPER_CPP_BIN="/path/to/whisper-cli"
export WHISPER_CPP_MODEL="/path/to/ggml-large-v3-turbo.bin"
Do not assume a platform-specific default path. No software is installed automatically.
Output artifacts:
audio.wav (16 kHz PCM)transcript.txttranscript.srt (subtitles with timestamps)transcript.whisper_cpp.json (metadata)The model is always the file path, not a model name — --asr-model is ignored for whisper_cpp.
--asr whisper)Output artifacts:
audio.m4atranscript.txttranscript.srttranscript.whisper.json--asr siliconflow)Requires SILICONFLOW_API_KEY. Calls https://api.siliconflow.cn/v1/audio/transcriptions.
Output artifacts:
audio.mp3transcript.txttranscript.siliconflow.jsonSiliconFlow does not currently provide an SRT file; srt_path is returned as null.
Every ASR result includes status, backend, model, language, audio_path,
transcript_path, srt_path, raw_json_path, and error. A selected backend
that fails returns status: failed; auto does not silently retry another
backend after transcription has started.
--asr-language — Language for transcription, e.g. Chinese, zh, English, auto. Default: auto.--asr-model — Model name. Default: auto (whisper.cpp ignores this; openai-whisper defaults to base; SiliconFlow maps to FunAudioLLM/SenseVoiceSmall).--asr-prompt — Initial prompt passed to the ASR engine. Use it to request Simplified Chinese output and provide domain terms.--asr-max-seconds — Debug limit: transcribe only the first N seconds of audio.The Douyin provider uses the H5 share page as the primary route. It follows the share URL, parses the server-rendered window._ROUTER_DATA, extracts the original post text and video resource ID, then downloads through the non-playwm endpoint.
If the H5 route fails, or if metadata extraction succeeds but direct media download fails, use yt-dlp as a fallback. The fallback first tries a normal yt-dlp download, then retries with Chrome cookies.
Important behavior:
aweme/v1/play/ endpoint over the share-page playwm endpoint.yt-dlp as a backup route, not the primary Douyin route.post_caption.txt.metadata.json.--metadata-only for fast tests or when the user only needs copy/caption.--no-yt-dlp-fallback only when debugging the H5 route itself.The Bilibili provider uses yt-dlp as the primary route for both metadata extraction and media download.
Important behavior:
bilibili.com and b23.tv links.post_caption.txt.yt-dlp raw metadata and normalized fields in metadata.json.bv*+ba/b and merge to mp4 when possible.--metadata-only for fast tests or when the user only needs title/description metadata.The YouTube provider uses yt-dlp as the primary route for both metadata extraction and media download.
Important behavior:
youtube.com and youtu.be links.post_caption.txt.yt-dlp raw metadata and normalized fields in metadata.json.bv*+ba/b and merge to mp4 when possible.--remote-components ejs:github or Chrome cookies when the basic route fails.--metadata-only for fast tests or when the user only needs title/description metadata.The Xiaohongshu provider uses a three-tier download fallback:
Metadata extraction is always anonymous — cookies are never triggered just to get author info or metadata.
Important behavior:
xiaohongshu.com, xhslink.com, and xhslink.cn links.post_caption.txt.yt-dlp raw metadata and normalized fields in metadata.json.未知作者 when unavailable.cookies.txt is saved; cookie contents are never logged or included in output.metadata.json records download.method, download.cookie_used, download.direct_url_source, and download.fallback_errors for full traceability.--metadata-only for fast tests or when the user only needs title/note metadata.WeChat Channels is recognized but not implemented yet.
Current finding:
yt-dlp does not support the tested weixin.qq.com/sph/... share link.Temporary workflow:
kg百宝箱.kg百宝箱, paste the 视频号 video link and download the video there.Add new platforms by creating a module under scripts/providers/ and registering it in scripts/providers/__init__.py.
Each provider should expose:
PLATFORM: stable provider namesupports(url: str) -> boolfetch(url: str, output_root: Path, *, metadata_only: bool = False, **options) -> dictOutput folders should include the same artifact contract whenever possible:
metadata.jsonpost_caption.txtaudio.wav / audio.m4a / audio.mp3 and transcript.txt when ASR is enabledtranscript.srt when whisper.cpp ASR is enabledReserved providers:
wechat_channelsWhen a reserved provider is detected but not implemented, say so plainly and do not fabricate a download result.
Download only material the user owns, has permission to download, or can lawfully archive for their intended use. Do not bypass DRM, paid access controls, private permissions, or platform restrictions for unauthorized redistribution.