SuperAPI AI Directory

space-video-transcript

Writing & research

View repository

Updated 10-16 08:01

About this skill

Video Link Subtitle Extraction

Extract subtitles immediately after receiving a supported platform link. Deliver the subtitles first, then ask whether to download the source file; do not download the full video before the user confirms.

Locate Skill

SVT_HOME="$(
  for dir in \
    "$HOME/.codex/skills/space-video-transcript" \
    "$HOME/.agents/skills/space-video-transcript" \
    "$HOME/.claude/skills/space-video-transcript" \
    "$(pwd)/video-Skills/space-video-transcript" \
    "$(pwd)/space-video-transcript"; do
    [ -f "$dir/SKILL.md" ] && printf '%s\n' "$dir" && break
  done
)"

If SVT_HOME is empty, first have the user provide the Skill path.

Workflow

  1. Extract the URL from the user message; supports YouTube, Xiaoyuzhou single episodes, Bilibili, Douyin, and Xiaohongshu videos.
  2. On first use or when the environment is abnormal, run a health check:
bash "$SVT_HOME/scripts/run.sh" doctor
  1. Extract subtitles immediately, without first asking whether to download:
bash "$SVT_HOME/scripts/run.sh" transcribe \
  "<URL>" --output-dir "<输出目录>"

The default output directory is video-transcripts/under the current directory. The script prioritizes obtaining existing platform subtitles; when there are no subtitles, it automatically extracts audio and selects ASR in the order Groq → 本地 Whisper → agent-reach .

  1. Read the last line of the script SPACE_VIDEO_TRANSCRIPT_RESULT=...:

    • Show the user the subtitle file path, source platform, and whether platform subtitles or ASR were used.
    • When the user requests to view the full text, read the Markdown file and display it; for long transcripts, a summary and path may be provided first.
    • Then you must ask:字幕已提取。是否同时下载原视频?(小宇宙将下载原音频)
  2. Run only after the user explicitly answers "yes/download":

bash "$SVT_HOME/scripts/run.sh" download \
  "<同一 URL>" --output-dir "<输出目录>/media"

If the platform requires a logged-in state, first explain the reason, then have the user log in themselves in the browser; after obtaining permission, you may add --cookies-from-browser chrome. Do not request or echo cookies.

Output

  • *_transcript.md: A readable transcript with source, language, and timestamps.
  • *_subtitles.srt: Generated when a reliable timeline exists.
  • media/: Save the original video only after user confirmation; for Xiaoyuzhou, save the original audio.

Language and Proofreading

  • Chinese subtitles are delivered directly.
  • When there are only English subtitles and the user requests a Chinese transcript, translate with the current Agent, preserve timestamps, and do not change facts.
  • When proper nouns are obviously wrong, first list low-confidence corrections; do not silently rewrite the original meaning.
  • When finished subtitles need further spoken-language sentence segmentation, ASS styling, or burning in, hand off to space-video-subtitle。

Failure Handling

  • YouTube/Bilibili without subtitles: automatically use ASR; do not end directly.
  • Douyin/Xiaohongshu scraping failure: prompt the user to first open or log in to the corresponding platform in Chrome, then with permission retry using the browser login state.
  • Xiaoyuzhou only accepts /episode/ single episode pages; for program homepages, ask the user to send the single episode link instead.
  • No available ASR: explain the available options—configure GROQ_API_KEY, install openai-whisper, or configure agent-reach transcribe。
  • Does not support DRM, paid, or content you do not have permission to access, and does not bypass CAPTCHAs, permission checks, or platform restrictions.

For platform differences and dependency notes, see references/platforms.md。