跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
视频与音频

video-downloader

Download 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百宝箱.

kangarooking · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add kangarooking/kangarooking-skills --skill video-downloader

技能说明


name: video-downloader description: Download 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百宝箱.

Video Downloader

Overview

Use this skill to turn a video-platform URL into a local source-material folder containing the video file, post_caption.txt, audio.m4a or audio.mp3, transcript.txt, 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.

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.

Quick Start

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, prefer:

SILICONFLOW_API_KEY="..." python3 scripts/download_video.py "https://v.douyin.com/..." --output-dir ./downloads --asr siliconflow --asr-language Chinese

To bias Whisper 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生图。"

Workflow

  1. Identify the platform from the URL.
  2. Use scripts/download_video.py as the single entrypoint.
  3. Inspect the output folder and report:
    • video path, when downloaded
    • post caption path
    • audio path
    • transcript path
    • metadata path
    • platform, item ID, author, duration, resolution, and any provider caveats

ASR Transcript

After a video is downloaded, the CLI extracts audio with ffmpeg and transcribes it with SiliconFlow SenseVoiceSmall or the local Whisper CLI.

Important behavior:

  • --asr auto is the default. It uses SiliconFlow when SILICONFLOW_API_KEY is set, otherwise local whisper if installed.
  • --asr siliconflow requires SILICONFLOW_API_KEY and calls https://api.siliconflow.cn/v1/audio/transcriptions.
  • --asr whisper requires the local Whisper CLI.
  • --asr none skips audio extraction and transcription.
  • --asr-model defaults to base for Whisper. For SiliconFlow, base or auto maps to FunAudioLLM/SenseVoiceSmall.
  • --asr-language auto lets Whisper detect language. Use Chinese for Chinese videos when quality matters.
  • --asr-prompt passes an initial prompt to Whisper. Use it to request Simplified Chinese and provide domain terms.
  • base is good for quick validation but may produce obvious Chinese homophone errors. Use small or medium for deliverable transcripts.
  • SiliconFlow writes audio.mp3, transcript.txt, and transcript.siliconflow.json.
  • Whisper writes audio.m4a, transcript.txt, and transcript.whisper.json.

Douyin Provider

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:

  • Prefer the non-watermark aweme/v1/play/ endpoint over the share-page playwm endpoint.
  • Treat yt-dlp as a backup route, not the primary Douyin route.
  • Store the original Douyin publish text in post_caption.txt.
  • Store raw and normalized metadata in metadata.json.
  • Use --metadata-only for fast tests or when the user only needs copy/caption.
  • Use --no-yt-dlp-fallback only when debugging the H5 route itself.

Bilibili Provider

The Bilibili provider uses yt-dlp as the primary route for both metadata extraction and media download.

Important behavior:

  • Support bilibili.com and b23.tv links.
  • Store the Bilibili title plus description in post_caption.txt.
  • Store yt-dlp raw metadata and normalized fields in metadata.json.
  • Download with bv*+ba/b and merge to mp4 when possible.
  • Retry with Chrome cookies when anonymous metadata extraction or download fails.
  • Use --metadata-only for fast tests or when the user only needs title/description metadata.

YouTube Provider

The YouTube provider uses yt-dlp as the primary route for both metadata extraction and media download.

Important behavior:

  • Support youtube.com and youtu.be links.
  • Store the YouTube title plus description in post_caption.txt.
  • Store yt-dlp raw metadata and normalized fields in metadata.json.
  • Download with bv*+ba/b and merge to mp4 when possible.
  • Use local Node as the yt-dlp JavaScript runtime when
阅读完整来源 ↗