返回顶部
v

video-ad-analyzer视频广告分析器

Extract and analyze content from video ads using Gemini Vision AI. Supports frame extraction, OCR text detection, audio transcription, and AI-powered scene analysis. Use when analyzing video creative content, extracting text overlays, or generating scene-by-scene descriptions.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
1,668
下载量
免费
免费
1
收藏
概述
安装方式
版本历史

video-ad-analyzer

视频广告分析器

使用Google Gemini Vision实现AI驱动的视频内容提取。

该技能的功能

  • - 帧提取:通过场景变化检测实现智能采样
  • OCR文本检测:使用EasyOCR提取文本叠加层
  • 音频转录:通过Google Cloud Speech将语音转换为文本
  • AI场景分析:使用Gemini Vision描述每个场景
  • 原生视频分析:针对较长内容的直接视频理解
  • 缩略图生成:从第一帧自动生成缩略图

设置

1. 环境变量

bash

Gemini Vision必需


GOOGLEAPPLICATIONCREDENTIALS=/path/to/service-account.json

音频转录必需

(同一服务账户需启用Speech-to-Text API)

2. 依赖项

bash
pip install opencv-python pillow easyocr ffmpeg-python google-cloud-speech vertexai google-api-python-client

还需在系统上安装ffmpeg和ffprobe。

使用方法

基础视频分析

python
from scripts.video_extractor import VideoExtractor
from scripts.models import ExtractedVideoContent
import vertexai
from vertexai.generative_models import GenerativeModel

初始化Vertex AI

vertexai.init(project=your-project-id, location=us-central1) gemini_model = GenerativeModel(gemini-1.5-flash)

创建提取器

extractor = VideoExtractor(geminimodel=geminimodel)

分析视频

result = extractor.extract_content(/path/to/video.mp4)

print(f时长: {result.duration}秒)
print(f场景数: {len(result.scene_timeline)})
print(f文本叠加层数: {len(result.text_timeline)})
print(f转录文本: {result.transcript[:200]}...)

仅提取帧

python
frames, timestamps, texttimeline, scenetimeline, thumbnail = extractor.extractsmartframes(
/path/to/video.mp4,
scene_interval=2, # 每2秒检查场景变化
text_interval=0.5 # 每0.5秒检查文本
)

分析图像

python

也适用于图像


result = extractor.extract_content(/path/to/image.jpg)
print(result.scene_timeline[0][description])

输出结构

python
ExtractedVideoContent(
video_path=/path/to/video.mp4,
duration=30.5,
transcript=这是我们发现的内容...,
text_timeline=[
{at: 0.0, text: [立即下载]},
{at: 5.5, text: [今日五折优惠]}
],
scene_timeline=[
{timestamp: 0.0, description: 女性正在使用手机应用...},
{timestamp: 2.0, description: 产品展示,包含功能特点...}
],
thumbnailurl=/static/thumbnails/videothumb.jpg,
extraction_complete=True
)

关键特性

特性描述
场景检测基于直方图的变化检测(阈值=65)
OCR置信度
分层阈值(高0.5,低0.3) | | AI校对 | Gemini清理OCR错误 | | 来源协调 | 智能合并OCR + Vision文本 | | 原生视频 | 针对<20MB文件的直接Gemini分析 |

提示词

通过编辑prompts/文件夹中的提示词来自定义AI行为:

  • - sceneanalysis.md - 帧分析提示词
  • scenereconciliation.md - 场景丰富提示词

常见问题解答

  • - 这个视频广告中出现了哪些文本?
  • 描述这个创意中的每个场景
  • 旁白说了什么?
  • 从这个广告中提取行动号召

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 meta-video-ad-analyzer-1776364708 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 meta-video-ad-analyzer-1776364708 技能

通过命令行安装

skillhub install meta-video-ad-analyzer-1776364708

下载

⬇ 下载 video-ad-analyzer v1.0.0(免费)

文件大小: 14.66 KB | 发布时间: 2026-4-17 14:28

v1.0.0 最新 2026-4-17 14:28
Initial release of Video Ad Analyzer — AI-powered tool for extracting and analyzing video ad content.

- Extracts frames with scene change detection for efficient analysis.
- Detects and extracts text overlays using OCR.
- Transcribes audio to text using Google Cloud Speech.
- Analyzes and describes each scene with Gemini Vision AI.
- Generates thumbnails and supports both video and image inputs.
- Provides outputs including timeline of scenes, detected texts, full transcript, and auto-thumbnail.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部