# Ecommerce Video Highlights

> 从电商视频（直播回放/种草视频）中 AI 分析并提取适合挂车的精彩片段。使用 ffmpeg 抽帧 + Whisper 音频转写 + AI 视觉分析的三阶段 pipeline。

- **Type:** Skill
- **Install:** `agentstack add skill-yehyakin-hermes-skills-ecommerce-video-highlights`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [yehyakin](https://agentstack.voostack.com/s/yehyakin)
- **Installs:** 0
- **Category:** [Content & Media](https://agentstack.voostack.com/c/content-and-media)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [yehyakin](https://github.com/yehyakin)
- **Source:** https://github.com/yehyakin/hermes-skills/tree/main/ecommerce-video-highlights

## Install

```sh
agentstack add skill-yehyakin-hermes-skills-ecommerce-video-highlights
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 电商视频精彩片段 AI 提取

从长视频（直播回放/种草视频）中识别适合**挂车**的高价值片段。

## Pipeline 三阶段

### 阶段 1：提取帧图片
```bash
# 每分钟1帧，分辨率降到960px方便分析
ffmpeg -i "input.mp4" \
    -vf "fps=1/60,scale=540:960" \
    -q:v 5 "frame_%06d.jpg"
```
- **采样频率**：每60秒1帧是平衡点（太长会漏片段，太短分析量太大）
- **分辨率**：保留原始比例，降为960px宽足够 AI 分析

### 阶段 2：音频转写（Whisper）
```python
import whisper
model = whisper.load_model('base')
result = model.transcribe('audio.wav', language='zh', task='translate')
# 保存到 transcript.json
```
- **语言**：中文视频用 `language='zh', task='translate'`
- **后台运行**：3小时音频需要10+分钟，用 `background=true` + `notify_on_complete=true`
- **输出**：`transcript.json` 含 `text`（全文）和 `segments`（带时间戳的句子）

### 阶段 3：AI 视觉分析
- 选每10分钟1帧（约22帧）进行视觉分析
- 用 `vision_analyze` 工具，prompt 要简洁：
  ```
  描述视频画面：场景、人物穿着、产品展示、文字内容、时间戳约XX:XX
  ```
- **商业价值判断维度**：
  1. 是否有产品特写（服装/护肤品等）
  2. 主播讲解姿势 vs 纯展示
  3. 是否有价格/优惠文字
  4. 画面是否清晰、主体是否突出

## 输出格式

推荐片段表：

| 时间 | 场景类型 | 商业价值 | 理由 |
|------|----------|----------|------|
| 01:41 | 产品特写 | ⭐⭐⭐⭐⭐ | 手持服装展示，可看清材质 |
| 03:22 | 搭配讲解 | ⭐⭐⭐⭐ | 全身穿搭演示 |

## 步骤 4：完成后自动存入 neirong-fuoli 素材库 ⭐

**必须执行，不得跳过。**

分析完成后，将以下内容写入：

```
~/content-fuoli/
├── 03-素材库/爆款话术库/
│   └── YYYYMMDD-{竞品名}-{片段名}.md
├── 06-竞品监控/竞品分析/
│   └── YYYYMMDD-{竞品名}-高光分析.md
└── 04-数据复盘/content_data_table.md（追加记录）
```

**分析报告文件模板：**
```markdown
# {竞品名} 视频高光分析
**原始视频**：{标题/链接}
**视频时长**：{X}分钟
**分析时间**：{日期}
**推荐片段数**：{N}个

---

## 片段清单

| 时间 | 场景类型 | 商业价值 | 理由 |
|------|----------|----------|------|
| ... | ... | ... | ... |

---

## 话术亮点摘录

{从Transcript中提取的关键话术，3-5条}

---

## 标签
#竞品 #高光分析 #{竞品名} #电商 #服装
```

**飞书通知用户：**
```
🎯 竞品视频分析完成

**竞品**：{竞品名}
**推荐片段**：{N}个
**高价值片段**：{X}个（⭐⭐⭐⭐以上）

💾 已存入 content-fuoli 竞品监控目录
📋 发布清单：{路径}
```

---

## 工具依赖

| 工具 | 安装方式 |
|------|----------|
| ffmpeg | `brew install ffmpeg` |
| whisper | `pip3 install openai-whisper` |

---

## 踩坑记录（2026-04-25 实测）

### 竞品视频实测（218分钟，5.7GB）
- **帧提取**：219帧，4分24秒（符合预期）
- **Whisper CPU**：3小时38分音频，跑了30分钟仍未完成 → CPU模式极慢，建议GPU或接受更长等待
- **AI画面分析**：每10分钟取1帧共22帧，约30分钟分析完毕
- **实测结论**：男装竖屏穿搭视频，手持产品 + 讲解场景商业价值最高

### 商业价值判断标准（实测验证）
| 画面特征 | 商业价值 | 实例 |
|----------|----------|------|
| 手持产品特写 | ⭐⭐⭐⭐⭐ | 灰色上衣手持展示 |
| 换装+搭配讲解 | ⭐⭐⭐⭐ | 围巾系法演示 |
| 拉链/面料细节 | ⭐⭐⭐⭐ | 外套拉链特写 |
| 手势讲解 | ⭐⭐⭐⭐ | 手部动作强调 |
| 纯静态对话 | ⭐⭐ | 坐姿说话无产品 |
| 扭头/模糊 | ⭐⭐ | 人物不在C位 |

---

## 注意事项

- **Whisper CPU 极慢**：3h+ 音频需 30-50 分钟，GPU 版可加速 10x+
- 竖屏视频（9:16）通常是直播回放或抖音内容
- **帧采样策略**：每10分钟取1帧是商业视频的平衡点（太密token浪费，太疏会漏片段）
- 男装/女装/护肤品是主流电商类型，分析 prompt 可针对性调整

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [yehyakin](https://github.com/yehyakin)
- **Source:** [yehyakin/hermes-skills](https://github.com/yehyakin/hermes-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-yehyakin-hermes-skills-ecommerce-video-highlights
- Seller: https://agentstack.voostack.com/s/yehyakin
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
