mcpField
V
video-highlight-extraction

video-highlight-extraction

github.com/eachlabs创意与媒体44346 次安装今天更新
代码仓库

关于 video-highlight-extraction

video-highlight-extraction 是一项使用 each::sense 分析长视频并提取精彩片段的技能,面向处理游戏、体育、播客、会议及活动影像的创作者和团队。

主要功能

  1. 01识别视频中的精彩时刻
  2. 02提取游戏和体育片段
  3. 03筛选播客和网络研讨会内容
  4. 04总结会议决策与行动项
  5. 05生成预告片和集锦

适用场景

  1. 01从播客制作便于分享的片段
  2. 02剪辑体育比赛集锦
  3. 03将会议决策整理成回顾
  4. 04为视频预告片挑选关键场景

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/eachlabs/skills --skill video-highlight-extraction

安装后在 Claude Code 中输入/video-highlight-extraction确认已加载。

附带文件references/SSE-EVENTS.md

详细介绍

视频精彩片段提取

使用 each::sense 从长视频内容中提取最佳时刻和精彩片段。此技能可智能分析视频,识别并提取精彩片段、动作场面、情绪高潮和关键时刻。

功能

  • 智能检测:通过 AI 分析找出最引人入胜的时刻
  • 游戏精彩片段:提取击杀、胜利、逆风翻盘和史诗级时刻
  • 体育片段:捕捉进球、达阵、扣篮和关键比赛场面
  • 播客时刻:找出值得引用的片段和适合传播的内容
  • 网络研讨会摘要:提取要点和可执行的见解
  • 会议精彩片段:总结决策、行动项和关键讨论
  • 活动精彩片段:演唱会高潮、婚礼时刻、旅行探险
  • 预告片生成:从完整内容中自动生成预告片

快速开始

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Extract the 5 best highlight moments from this gaming video, focus on action sequences and wins"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/gameplay-session.mp4"]
  }'

精彩片段类型与使用场景

内容类型关注重点输出格式
游戏击杀、胜利、失误、反应短片段(15-60s)
体育得分、比赛场面、庆祝精彩集锦(30-90s)
播客引言、见解、辩论片段合集(30-120s)
网络研讨会要点、演示、问答摘要片段(60-180s)
会议决策、行动项精简回顾(2-5min)
演唱会高潮、观众时刻精华合集
婚礼仪式、反应、演讲精彩集锦
旅行风景、活动探险蒙太奇

使用场景示例

1. 从长视频中提取最佳时刻
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Analyze this 2-hour video and extract the top 10 most engaging moments. Look for emotional peaks, funny moments, and visually impressive scenes. Create individual clips of 30-60 seconds each."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/long-form-content.mp4"]
  }'
2. 游戏精彩片段检测
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Extract gaming highlights from this Valorant stream. Find all clutch rounds, ace plays, and epic kills. Create a highlight reel with smooth transitions between clips."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/valorant-stream.mp4"]
  }'
3. 体育精彩片段提取
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a sports highlight reel from this football game. Extract all touchdowns, big plays, interceptions, and celebration moments. Include 2 seconds before and after each key moment for context."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/football-game.mp4"]
  }'
4. 播客最佳片段
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Find the most shareable clips from this podcast episode. Look for controversial takes, insightful moments, funny exchanges, and quotable statements. Extract 5-8 clips optimized for social media (under 60 seconds each)."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/podcast-episode.mp4"]
  }'
5. 网络研讨会关键时刻
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Extract key moments from this 90-minute webinar. Identify main talking points, important demonstrations, audience questions, and actionable takeaways. Create a 5-minute summary highlight reel."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/webinar-recording.mp4"]
  }'
6. 会议精彩片段
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a meeting highlight summary from this team call. Extract all decisions made, action items assigned, key discussion points, and any important announcements. Condense into a 3-minute recap video."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "eco",
    "video_urls": ["https://example.com/team-meeting.mp4"]
  }'
7. 演唱会最佳时刻
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Extract the best moments from this concert recording. Find crowd singalongs, guitar solos, drum fills, artist interactions with crowd, and emotional peaks. Create a 4-minute highlight compilation with the most energetic parts."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/concert-full.mp4"]
  }'
8. 旅行视频精彩片段
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a travel highlight reel from my vacation footage. Extract the most scenic views, exciting activities, local food experiences, and memorable moments. Make a 2-minute shareable video with dynamic pacing."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/vacation-footage.mp4"]
  }'
9. 婚礼精彩集锦
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a wedding highlight reel from the full ceremony and reception footage. Extract the vows, first kiss, first dance, cake cutting, bouquet toss, speeches with emotional reactions, and candid guest moments. Create a 5-minute cinematic highlight video."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/wedding-full.mp4"]
  }'
10. 从电影自动生成预告片
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Generate a 2-minute trailer from this feature film. Select the most dramatic moments, action sequences, emotional beats, and visually stunning shots. Build tension with the pacing - start slow, build to climax. Avoid major spoilers but hint at the story."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/feature-film.mp4"]
  }'

模式选择

处理前询问用户:

“您想要速度快、成本低,还是质量高?”

模式最适合速度质量
max最终精彩集锦、客户交付内容、预告片剪辑较慢最高
eco快速预览、会议回顾、内部审阅较快良好

多轮精彩片段优化

使用 session_id 迭代优化提取的精彩片段:

# Initial extraction
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Extract highlights from this gaming stream, focus on the best plays"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "highlight-project-001",
    "video_urls": ["https://example.com/stream.mp4"]
  }'

# Refine selection
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Remove the third clip and find more moments with team fights"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "highlight-project-001"
  }'

# Adjust timing
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Make each clip shorter, around 15-20 seconds, and add transitions between them"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "highlight-project-001"
  }'

针对平台优化的片段

生成针对不同平台优化的精彩片段:

# YouTube Shorts / TikTok (vertical 9:16)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Extract viral-worthy moments and format them as vertical 9:16 clips for TikTok/YouTube Shorts. Each clip should be 15-30 seconds with a strong hook in the first 2 seconds."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/content.mp4"]
  }'

# Twitter/X (square 1:1)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create square 1:1 highlight clips optimized for Twitter. Under 2 minutes each, punchy and shareable."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/content.mp4"]
  }'

精彩片段检测参数

自定义 AI 的查找目标:

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Extract highlights with the following criteria: prioritize moments with high audio energy (cheering, music peaks), visual motion (fast action, camera movement), and emotional expressions (laughter, surprise). Skip any slow or static segments. Create 8 clips of 20-40 seconds each."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "video_urls": ["https://example.com/event-footage.mp4"]
  }'

错误处理

错误原因解决方案
Failed to create prediction: HTTP 422余额不足在 eachlabs.ai 充值
Video too long超出处理限制拆分为更短的片段
Unsupported format不支持视频编码格式转换为 MP4 H.264
超时长视频处理将客户端超时设为至少 10 分钟

**重要:**长视频的精彩片段提取可能需要较长时间。请务必将 HTTP 客户端超时设为至少 10 分钟,以免连接过早断开。

最佳实践

输入视频
  • 格式:MP4 搭配 H.264 编码效果最佳
  • 质量:更高的分辨率有助于更准确地检测精彩时刻
  • 长度:对于超过 2 小时的视频,可考虑分段处理
提示词技巧
  • 指定所需的精彩片段数量
  • 描述要查找的时刻类型
  • 说明期望的片段长度
  • 指明输出格式要求(宽高比、时长)
输出优化
  • 使用 max 模式生成最终交付内容
  • 使用 eco 模式快速预览和迭代
  • 利用 session_id 进行多轮优化

相关技能

  • each-sense - 核心 API 文档
  • video-generation - 生成新的视频内容
  • video-edit - 编辑和修改现有视频

评论

支持 Markdown