SuperAPI AI Directory

video-to-text

Design & creation

View repository

Updated 10-15 20:33

About this skill

Video-to-Text Video to text

Turn videos into copyable, searchable text. Supports Douyin share links (metadata, no login required) and local video files (speech transcription).

Trigger conditions

Use this skill when the user sends the following:

  • Douyin share link, requesting "convert to text", "extract the copy", "break down the video"
  • Local video file (.mp4/.mov), requesting "speech to text", "subtitles"

Usage steps

1. Douyin share link → metadata

python3 scripts/vtt.py "https://v.douyin.com/xxxx/"
  • Output metadata (title/author/likes/tags)
  • Note: share links currently only extract metadata—for speech transcription, ask the user to save the video and use the local file route (step 2)

2. Local video file → speech transcription

python3 scripts/vtt.py 本地视频.mp4
  • Automatically extract audio, faster-whisper transcription (Chinese)
  • Save the transcribed text as <输入名>_transcript.txt and print timestamped segments

Dependencies (installed on first use)

pip3 install faster-whisper        # 转写需要(首次会下载 tiny 模型 ~75MB)
# macOS 自带 avconvert;Linux 需 ffmpeg
# 抖音 SSR 解析零依赖(curl + 标准库)

Known pitfalls

  • duration_ms=0 false negative: SSR metadata duration may be 0, but it is actually a video. If the metadata shows 0 seconds and there is a download URL, download and verify first; do not directly judge it as an image post.
  • play_addr URL expired: the video URL parsed from SSR may 404; in this case, fall back to cookies or ask the user to provide the file.
  • whisper transcription is slow: on an Intel Mac, a 3-minute video takes about 5 minutes; transcription must add language='zh' otherwise automatic detection takes 1-2 extra minutes.
  • Image content: when duration=0 and the downloaded file is <1MB, it is an image post (no audio); output only metadata, do not fabricate content.