video-content-analyzer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Video Content Analyzer

视频内容分析工具

Analyze short-form videos with Gemini AI to extract hooks, content structure, delivery style, and CTA strategies.
借助Gemini AI分析短视频,提取钩子、内容结构、呈现风格和CTA策略。

Prerequisites

前置要求

  • GEMINI_API_KEY
    environment variable
  • google-genai
    and
    requests
    Python packages
  • GEMINI_API_KEY
    环境变量
  • google-genai
    requests
    Python 包

Usage

使用方法

bash
python3 .claude/skills/video-content-analyzer/scripts/analyze_videos.py \
  --input outliers.json \
  --output video-analysis.json \
  --platform instagram \
  --max-videos 5
bash
python3 .claude/skills/video-content-analyzer/scripts/analyze_videos.py \
  --input outliers.json \
  --output video-analysis.json \
  --platform instagram \
  --max-videos 5

Parameters

参数说明

ArgDescription
--input
,
-i
Input JSON file with outlier posts (required)
--output
,
-o
Output JSON file for results (required)
--platform
,
-p
Platform:
instagram
,
tiktok
, or
youtube
(default: instagram)
--max-videos
,
-n
Max videos to analyze (default: 5)
参数说明
--input
,
-i
包含异常值帖子的输入JSON文件(必填)
--output
,
-o
用于保存结果的输出JSON文件(必填)
--platform
,
-p
平台:
instagram
tiktok
youtube
(默认值:instagram)
--max-videos
,
-n
要分析的最大视频数量(默认值:5)

Input Format

输入格式

Accepts outlier JSON from platform-specific research skills. Handles both formats:
  • Direct list:
    [{post1}, {post2}, ...]
  • Wrapped:
    {"outliers": [{post1}, {post2}, ...]}
The script automatically maps platform-specific fields:
PlatformVideo URL FieldsCaptionUsername
Instagram
videoUrl
caption
ownerUsername
TikTok
videoUrl
,
video_url
,
webVideoUrl
text
,
desc
authorUsername
YouTube
videoUrl
,
url
title
channelTitle
TikTok Note: The Apify TikTok Scraper returns
webVideoUrl
(the TikTok page URL) rather than a direct video download URL. Gemini will attempt to analyze from this page URL.
接受来自平台特定研究工具的异常值JSON,支持以下两种格式:
  • 直接列表:
    [{post1}, {post2}, ...]
  • 包裹格式:
    {"outliers": [{post1}, {post2}, ...]}
脚本会自动映射平台特定字段:
平台视频URL字段标题/描述用户名
Instagram
videoUrl
caption
ownerUsername
TikTok
videoUrl
,
video_url
,
webVideoUrl
text
,
desc
authorUsername
YouTube
videoUrl
,
url
title
channelTitle
TikTok 注意事项:Apify TikTok 爬虫返回的是
webVideoUrl
(TikTok页面URL),而非直接的视频下载URL。Gemini会尝试通过该页面URL进行分析。

Output

输出格式

Returns JSON array with analysis for each video:
json
[
  {
    "post_id": "ABC123",
    "username": "creator",
    "url": "https://...",
    "platform": "instagram",
    "likes": 50000,
    "comments": 1200,
    "views": 500000,
    "analysis": {
      "hook": {
        "technique": "pattern-interrupt",
        "opening_line": "Stop scrolling if you...",
        "attention_grab": "Creates urgency and targets specific audience",
        "replicable_formula": "Stop scrolling if you [pain point]"
      },
      "content_structure": {
        "format": "problem-solution",
        "sections": [...],
        "pacing": "fast",
        "retention_techniques": ["pattern interrupts", "text overlays"]
      },
      "delivery_style": {
        "speaking": "direct-to-camera",
        "energy": "high-energy",
        "text_overlays": true,
        "visual_style": "quick cuts with b-roll"
      },
      "cta_strategy": {
        "type": "follow",
        "cta_text": "Follow for more tips",
        "placement": "end"
      },
      "why_it_works": "..."
    }
  }
]
返回包含每个视频分析结果的JSON数组:
json
[
  {
    "post_id": "ABC123",
    "username": "creator",
    "url": "https://...",
    "platform": "instagram",
    "likes": 50000,
    "comments": 1200,
    "views": 500000,
    "analysis": {
      "hook": {
        "technique": "pattern-interrupt",
        "opening_line": "Stop scrolling if you...",
        "attention_grab": "Creates urgency and targets specific audience",
        "replicable_formula": "Stop scrolling if you [pain point]"
      },
      "content_structure": {
        "format": "problem-solution",
        "sections": [...],
        "pacing": "fast",
        "retention_techniques": ["pattern interrupts", "text overlays"]
      },
      "delivery_style": {
        "speaking": "direct-to-camera",
        "energy": "high-energy",
        "text_overlays": true,
        "visual_style": "quick cuts with b-roll"
      },
      "cta_strategy": {
        "type": "follow",
        "cta_text": "Follow for more tips",
        "placement": "end"
      },
      "why_it_works": "..."
    }
  }
]

Hook Techniques

钩子技巧

The analyzer identifies these hook types:
  • pattern-interrupt
    - Breaks expected patterns
  • question
    - Opens with engaging question
  • bold-claim
    - Makes surprising statement
  • story-tease
    - Hints at compelling narrative
  • visual-shock
    - Striking visual opening
  • curiosity-gap
    - Creates information gap
  • direct-address
    - Speaks to specific audience
  • controversial-take
    - Polarizing opinion
  • relatable-pain
    - Targets common struggle
  • transformation-preview
    - Shows before/after
分析工具可识别以下钩子类型:
  • pattern-interrupt
    - 打破常规模式
  • question
    - 以引人入胜的问题开场
  • bold-claim
    - 做出惊人陈述
  • story-tease
    - 暗示引人入胜的叙事
  • visual-shock
    - 震撼的视觉开场
  • curiosity-gap
    - 制造信息差
  • direct-address
    - 针对特定受众发言
  • controversial-take
    - 有争议的观点
  • relatable-pain
    - 瞄准普遍痛点
  • transformation-preview
    - 展示前后对比

Content Formats

内容格式

  • problem-solution
    - Present problem, offer fix
  • listicle
    - Numbered tips/items
  • story
    - Narrative arc
  • tutorial
    - Step-by-step how-to
  • before-after
    - Transformation reveal
  • day-in-life
    - Lifestyle content
  • reaction
    - Response to other content
  • hot-take
    - Opinion piece
  • tool-demo
    - Product/tool showcase
  • problem-solution
    - 提出问题,提供解决方案
  • listicle
    - 编号式技巧/条目
  • story
    - 叙事结构
  • tutorial
    - 分步教程
  • before-after
    - 前后对比展示
  • day-in-life
    - 生活日常内容
  • reaction
    - 对其他内容的回应
  • hot-take
    - 观点类内容
  • tool-demo
    - 产品/工具展示