360 Secure SkillHub
360 安全技能中心

Video Insight

面向 YouTube 与 Bilibili 的视频转录提取工具:输入视频链接或频道 ID,输出包含标题、频道、时长与完整转录的 JSON,可选调用 LLM 生成摘要、提取关键帧、扫描频道近期视频;支持本地缓存与静默模式,Bilibili 转录依赖 ffmpeg 与 faster-whisper。

huuuwnnn-droid
huuuwnnn-droid
热度 33.31
最近更新 2026-05-18 11:44:16
分类:搜索依赖:代码执行 / 读写文件 / 第三方 API / 内部调用大模型应用场景:摘要总结 / 研究 / 数据处理 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add video-insight
Metadata
name
video-insight
description
Cross-platform video transcript extraction and optional AI summarization for YouTube and Bilibili. GPU auto-detect. Transcript-first with opt-in LLM summary.

video-insight

Cross-platform video transcript extraction and optional AI summarization for YouTube and Bilibili.

Description

Extract transcripts, metadata, and optional keyframes from YouTube and Bilibili videos. Outputs structured JSON to stdout. By default, no LLM summarization is performed — the agent receives the full transcript and does its own summarization with full context window.

Supports: macOS, Linux, WSL, Windows VM.

Usage

# Single video — transcript only (default, recommended)
video-insight --url "https://www.youtube.com/watch?v=VIDEO_ID"

# Bilibili video
video-insight --url "https://www.bilibili.com/video/BV1xxxxx"

# With LLM summary (opt-in)
video-insight --url "https://..." --summarize

# Channel scan (recent videos)
video-insight --channel "UC_x5XG1OV2P6uZZ5FSM9Ttw" --hours 24

# Quiet mode (no stderr progress)
video-insight --url "https://..." --quiet

# Force refresh (ignore cache)
video-insight --url "https://..." --no-cache

# Extract keyframes too
video-insight --url "https://..." --frames

Triggers

Summarize video, extract transcript, YouTube summary, Bilibili transcript, video transcript, 视频摘要, 视频总结, B站视频, YouTube视频

Output Schema

{
  "ok": true,
  "data": {
    "video_id": "dQw4w9WgXcQ",
    "platform": "youtube",
    "title": "Video Title",
    "channel": "Channel Name",
    "duration_seconds": 212,
    "transcript": "Full transcript text without truncation...",
    "transcript_with_timestamps": "[0.0-3.2] First segment\n[3.2-6.5] Second...",
    "frames": [{"file": "/tmp/.../frame_001.jpg", "time_sec": 30}],
    "cached": false
  },
  "error": null
}

Cache

Transcripts are permanently cached at ~/.cache/video-insight/{platform}_{video_id}.json. The .json format stores metadata + transcript together for richer cache hits (title, channel, duration, timestamps). Use --no-cache to force re-fetch.

Agent Integration Guide

  1. Default workflow: Call video-insight --url <URL>, receive JSON with full transcript. Use your own LLM context to summarize — you have 128K+ tokens, no need for the script to truncate.

  2. For keyframes: Add --frames flag. Only needed when the user explicitly asks for a visual/image review.

  3. Long videos (2h+): The transcript may be very large. Use map-reduce or chunked summarization.

  4. Bilibili videos require ffmpeg and faster-whisper (installed via setup.sh). YouTube videos typically have captions and are much faster.

  5. Cron/headless: Use --summarize --quiet for automated pipelines.

Setup

cd ~/.openclaw/skills/video-insight && bash setup.sh

Dependencies

Required: yt-dlp, youtube-transcript-api, innertube, ffmpeg (system) Optional: faster-whisper (for Bilibili/captionless videos), requests (for --summarize)