video-trimming

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Video Trimming

视频修剪

Trim, cut, and split videos using each::sense. This skill enables precise video editing operations including segment extraction, scene detection, silence removal, and batch processing for social media optimization.
借助each::sense完成视频的修剪、剪切与拆分操作。该技能支持精准的视频编辑操作,包括片段提取、场景检测、静音部分移除以及针对社交媒体优化的批量处理。

Features

功能特性

  • Precise Trimming: Cut videos to exact timestamps or durations
  • Segment Extraction: Extract specific portions from the middle of videos
  • Intro/Outro Removal: Clean up videos by removing unwanted beginnings or endings
  • Video Splitting: Divide long videos into multiple shorter clips
  • Highlight Extraction: Pull out key moments from longer content
  • Silence Removal: Automatically detect and remove dead air or silent portions
  • Scene Detection: Smart cuts based on visual scene changes
  • Social Media Optimization: Trim to platform-specific lengths (15s, 30s, 60s)
  • Loop-Friendly Edits: Create seamless loops for social media
  • Batch Processing: Process multiple videos with consistent trimming rules
  • 精准修剪:按精确的时间戳或时长裁剪视频
  • 片段提取:从视频中间提取特定部分
  • 片头片尾移除:清理视频,去除多余的开头或结尾部分
  • 视频拆分:将长视频分割为多个较短的片段
  • 高光片段提取:从长内容中提取关键片段
  • 静音部分移除:自动检测并去除无声或静音片段
  • 场景检测:基于视觉场景变化进行智能裁剪
  • 社交媒体优化:按平台特定时长(15秒、30秒、60秒)修剪视频
  • 循环友好编辑:为社交媒体创建无缝循环视频
  • 批量处理:使用统一的修剪规则处理多个视频

Quick Start

快速开始

bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Trim this video to the first 30 seconds",
    "mode": "max",
    "video_urls": ["https://example.com/my-video.mp4"]
  }'
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Trim this video to the first 30 seconds",
    "mode": "max",
    "video_urls": ["https://example.com/my-video.mp4"]
  }'

Trimming Operations Reference

修剪操作参考

OperationDescriptionExample Use Case
Duration TrimCut to specific length from startSocial media clips
Timestamp TrimExtract between start/end timesInterview segments
Intro RemovalRemove first N secondsClean up recordings
Outro RemovalRemove last N secondsRemove end cards
Segment ExtractionPull middle portionHighlight reels
Scene SplitDivide by visual changesChapter creation
Silence RemovalCut silent portionsPodcast editing
Batch TrimProcess multiple videosContent repurposing
操作类型描述示例场景
时长修剪从开头裁剪至特定长度社交媒体短视频制作
时间戳修剪提取起始与结束时间之间的片段采访片段提取
片头移除移除前N秒内容清理录制视频
片尾移除移除最后N秒内容去除结尾卡片
片段提取提取中间部分高光片段合集制作
场景拆分按视觉变化分割视频章节创建
静音移除裁剪静音片段播客编辑
批量修剪处理多个视频内容复用

Use Case Examples

场景示例

1. Trim Video to Specific Duration

1. 按特定时长修剪视频

Trim a video to a specific length from the beginning.
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Trim this video to exactly 60 seconds, keeping the first minute only",
    "mode": "max",
    "video_urls": ["https://example.com/full-video.mp4"]
  }'
从视频开头裁剪至指定长度。
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Trim this video to exactly 60 seconds, keeping the first minute only",
    "mode": "max",
    "video_urls": ["https://example.com/full-video.mp4"]
  }'

2. Cut Segment from Middle

2. 提取视频中间片段

Extract a specific portion from the middle of a video using timestamps.
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Cut out the segment from 1:30 to 2:45 of this video. I want just that middle portion as a standalone clip.",
    "mode": "max",
    "video_urls": ["https://example.com/interview.mp4"]
  }'
使用时间戳从视频中间提取特定部分。
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Cut out the segment from 1:30 to 2:45 of this video. I want just that middle portion as a standalone clip.",
    "mode": "max",
    "video_urls": ["https://example.com/interview.mp4"]
  }'

3. Remove Intro and Outro

3. 移除片头与片尾

Clean up a video by removing unwanted intro and outro sections.
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Remove the first 10 seconds (intro) and last 15 seconds (outro) from this video. Keep only the main content in the middle.",
    "mode": "max",
    "video_urls": ["https://example.com/youtube-video.mp4"]
  }'
清理视频,去除多余的片头和片尾部分。
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Remove the first 10 seconds (intro) and last 15 seconds (outro) from this video. Keep only the main content in the middle.",
    "mode": "max",
    "video_urls": ["https://example.com/youtube-video.mp4"]
  }'

4. Split Video into Multiple Clips

4. 将视频拆分为多个片段

Divide a long video into several shorter segments.
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Split this 5-minute video into five 1-minute clips. Each clip should be a separate output.",
    "mode": "max",
    "video_urls": ["https://example.com/long-video.mp4"]
  }'
将长视频分割为多个较短的片段。
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Split this 5-minute video into five 1-minute clips. Each clip should be a separate output.",
    "mode": "max",
    "video_urls": ["https://example.com/long-video.mp4"]
  }'

5. Extract Highlight Moments

5. 提取高光片段

Pull out the best moments from a longer video.
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Extract the most engaging or action-packed moments from this video. Create a highlight reel of the best 30 seconds.",
    "mode": "max",
    "video_urls": ["https://example.com/sports-footage.mp4"]
  }'
从长视频中提取最精彩的片段。
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Extract the most engaging or action-packed moments from this video. Create a highlight reel of the best 30 seconds.",
    "mode": "max",
    "video_urls": ["https://example.com/sports-footage.mp4"]
  }'

6. Remove Silence and Dead Air

6. 移除静音片段

Automatically detect and remove silent portions from a video.
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Remove all silent portions and dead air from this video. Cut out any segments where there is no speaking or significant audio for more than 2 seconds.",
    "mode": "max",
    "video_urls": ["https://example.com/podcast-recording.mp4"]
  }'
自动检测并移除视频中的静音部分。
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Remove all silent portions and dead air from this video. Cut out any segments where there is no speaking or significant audio for more than 2 seconds.",
    "mode": "max",
    "video_urls": ["https://example.com/podcast-recording.mp4"]
  }'

7. Smart Scene Detection Cut

7. 智能场景检测裁剪

Use AI to detect scene changes and split the video accordingly.
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Analyze this video and split it into separate clips based on scene changes. Each time the visual scene changes significantly, create a new clip.",
    "mode": "max",
    "video_urls": ["https://example.com/multi-scene-video.mp4"]
  }'
使用AI检测场景变化并相应地拆分视频。
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Analyze this video and split it into separate clips based on scene changes. Each time the visual scene changes significantly, create a new clip.",
    "mode": "max",
    "video_urls": ["https://example.com/multi-scene-video.mp4"]
  }'

8. Batch Trim Multiple Videos

8. 批量修剪多个视频

Process multiple videos with the same trimming rules using session continuity.
bash
undefined
使用会话连续性,用相同的修剪规则处理多个视频。
bash
undefined

First video

第一个视频

curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Trim this video to 30 seconds from the start. We will process multiple videos with the same rule.", "session_id": "batch-trim-001", "mode": "eco", "video_urls": ["https://example.com/video1.mp4"] }'
curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Trim this video to 30 seconds from the start. We will process multiple videos with the same rule.", "session_id": "batch-trim-001", "mode": "eco", "video_urls": ["https://example.com/video1.mp4"] }'

Second video (same session)

第二个视频(同一会话)

curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Apply the same 30-second trim to this video", "session_id": "batch-trim-001", "mode": "eco", "video_urls": ["https://example.com/video2.mp4"] }'
curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Apply the same 30-second trim to this video", "session_id": "batch-trim-001", "mode": "eco", "video_urls": ["https://example.com/video2.mp4"] }'

Third video (same session)

第三个视频(同一会话)

curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "And the same for this one", "session_id": "batch-trim-001", "mode": "eco", "video_urls": ["https://example.com/video3.mp4"] }'
undefined
curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "And the same for this one", "session_id": "batch-trim-001", "mode": "eco", "video_urls": ["https://example.com/video3.mp4"] }'
undefined

9. Trim to Social Media Length

9. 按社交媒体平台时长修剪

Optimize videos for specific social media platform requirements.
bash
undefined
针对特定社交媒体平台的要求优化视频。
bash
undefined

Instagram Reels / TikTok (15 seconds)

Instagram Reels / TikTok(15秒)

curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Trim this video to exactly 15 seconds for Instagram Reels. Pick the most engaging 15-second segment.", "mode": "max", "video_urls": ["https://example.com/content.mp4"] }'
curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Trim this video to exactly 15 seconds for Instagram Reels. Pick the most engaging 15-second segment.", "mode": "max", "video_urls": ["https://example.com/content.mp4"] }'

YouTube Shorts (30 seconds)

YouTube Shorts(30秒)

curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Create a 30-second clip optimized for YouTube Shorts from this video. Focus on the hook at the start.", "mode": "max", "video_urls": ["https://example.com/content.mp4"] }'
curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Create a 30-second clip optimized for YouTube Shorts from this video. Focus on the hook at the start.", "mode": "max", "video_urls": ["https://example.com/content.mp4"] }'

Standard social clip (60 seconds)

标准社交媒体片段(60秒)

curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Trim to 60 seconds maximum for Twitter/X. Keep the most important content.", "mode": "max", "video_urls": ["https://example.com/content.mp4"] }'
undefined
curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Trim to 60 seconds maximum for Twitter/X. Keep the most important content.", "mode": "max", "video_urls": ["https://example.com/content.mp4"] }'
undefined

10. Loop-Friendly Trim

10. 循环友好型修剪

Create seamlessly looping video clips for social media.
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Trim this video to create a seamless loop. Find a segment where the end flows naturally back to the beginning, ideally 5-10 seconds long for a satisfying social media loop.",
    "mode": "max",
    "video_urls": ["https://example.com/loopable-content.mp4"]
  }'
为社交媒体创建无缝循环的视频片段。
bash
curl -X POST https://sense.eachlabs.run/chat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "message": "Trim this video to create a seamless loop. Find a segment where the end flows naturally back to the beginning, ideally 5-10 seconds long for a satisfying social media loop.",
    "mode": "max",
    "video_urls": ["https://example.com/loopable-content.mp4"]
  }'

Best Practices

最佳实践

Trimming Tips

修剪技巧

  • Be specific: Provide exact timestamps (MM:SS or HH:MM:SS) when possible
  • Describe content: If you do not know timestamps, describe what you want ("the part where they shake hands")
  • Buffer time: Allow small buffers around cuts to avoid abrupt transitions
  • Check audio: Ensure cuts do not happen mid-sentence or mid-note
  • 明确具体:尽可能提供精确的时间戳(MM:SS或HH:MM:SS)
  • 描述内容:如果不知道时间戳,描述你想要的部分(如“他们握手的片段”)
  • 预留缓冲:在裁剪点周围预留少量缓冲时间,避免过渡突兀
  • 检查音频:确保裁剪不会发生在句子中间或音符中途

Performance Optimization

性能优化

  • Use
    eco
    mode
    for batch processing or quick iterations
  • Use
    max
    mode
    for final exports and quality-critical content
  • Process shorter videos first to verify settings before batch operations
  • 批量处理或快速迭代时使用
    eco
    模式
  • 最终导出和对质量要求高的内容使用
    max
    模式
  • 批量操作前先处理较短的视频,验证设置是否正确

Social Media Guidelines

社交媒体指南

PlatformRecommended LengthNotes
TikTok15-60 secondsHook in first 3 seconds
Instagram Reels15-30 seconds90 seconds max
YouTube Shorts30-60 secondsUnder 60 seconds required
Twitter/X30-60 seconds2:20 max for standard accounts
LinkedIn30-90 secondsProfessional context
平台推荐时长注意事项
TikTok15-60秒前3秒需有吸睛内容
Instagram Reels15-30秒最长90秒
YouTube Shorts30-60秒必须少于60秒
Twitter/X30-60秒普通账号最长2分20秒
LinkedIn30-90秒需符合专业场景

Prompt Tips for Video Trimming

视频修剪提示词技巧

When requesting video trims, include these details:
  1. Exact timing: "from 0:45 to 1:30" or "first 30 seconds"
  2. Content reference: "the interview segment" or "when the product demo starts"
  3. Output requirements: "keep audio" or "I need 3 separate clips"
  4. Platform target: "for Instagram Reels" or "YouTube Shorts optimized"
  5. Quality preference: Use
    mode: "max"
    for finals,
    mode: "eco"
    for drafts
请求视频修剪时,请包含以下细节:
  1. 精确时间:“从0:45到1:30”或“前30秒”
  2. 内容参考:“采访片段”或“产品演示开始的部分”
  3. 输出要求:“保留音频”或“我需要3个独立片段”
  4. 目标平台:“用于Instagram Reels”或“适配YouTube Shorts”
  5. 质量偏好:最终版本使用
    mode: "max"
    ,草稿使用
    mode: "eco"

Example Prompt Structure

提示词结构示例

"[Action] this video [timing/selection criteria].
[Additional requirements like output format, platform, etc.]"
Examples:
  • "Trim this video to 30 seconds starting at 1:00"
  • "Extract three 15-second highlights from different parts of this video"
  • "Remove the first 5 seconds and last 10 seconds"
"[操作] 这段视频 [时间/选择条件]。
[额外要求,如输出格式、平台等]"
示例:
  • “将这段视频从1:00开始修剪30秒”
  • “从这段视频的不同部分提取3个15秒的高光片段”
  • “移除前5秒和最后10秒”

Mode Selection

模式选择

"Do you want fast & cheap, or high quality?"
ModeBest ForSpeedQuality
max
Final exports, client deliverables, quality-criticalSlowerHighest
eco
Quick previews, batch processing, draft iterationsFasterGood
“你想要快速低成本,还是高质量?”
模式适用场景速度质量
max
最终导出、客户交付品、对质量要求高的内容较慢最高
eco
快速预览、批量处理、草稿迭代较快良好

Multi-Turn Editing Session

多轮编辑会话

Use
session_id
to iterate on video edits:
bash
undefined
使用
session_id
进行视频编辑的迭代操作:
bash
undefined

Initial trim

初始修剪

curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Trim this video to the segment from 0:30 to 1:30", "session_id": "edit-session-001", "video_urls": ["https://example.com/raw-footage.mp4"] }'
curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Trim this video to the segment from 0:30 to 1:30", "session_id": "edit-session-001", "video_urls": ["https://example.com/raw-footage.mp4"] }'

Adjust the trim

调整修剪范围

curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Actually, extend the end by 10 more seconds to include the conclusion", "session_id": "edit-session-001" }'
curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Actually, extend the end by 10 more seconds to include the conclusion", "session_id": "edit-session-001" }'

Request additional version

请求其他版本

curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Create a shorter 15-second version of this same segment for Instagram", "session_id": "edit-session-001" }'
undefined
curl -X POST https://sense.eachlabs.run/chat
-H "Content-Type: application/json"
-H "X-API-Key: $EACHLABS_API_KEY"
-H "Accept: text/event-stream"
-d '{ "message": "Create a shorter 15-second version of this same segment for Instagram", "session_id": "edit-session-001" }'
undefined

Error Handling

错误处理

ErrorCauseSolution
Failed to create prediction: HTTP 422
Insufficient balanceTop up at eachlabs.ai
TimeoutLong video processingSet client timeout to minimum 10 minutes
Invalid timestampTimestamp exceeds video lengthVerify video duration first
Unsupported formatVideo codec not supportedConvert to MP4/H.264 first
错误原因解决方案
Failed to create prediction: HTTP 422
余额不足前往eachlabs.ai进行充值
超时视频处理时间过长将客户端超时设置为至少10分钟
无效时间戳时间戳超出视频时长先验证视频时长
不支持的格式视频编码不支持先转换为MP4/H.264格式

Related Skills

相关技能

  • each-sense
    - Core API documentation
  • video-generation
    - Create videos from scratch
  • video-editing
    - Advanced video editing operations
  • video-to-video
    - Transform and style transfer videos
  • each-sense
    - 核心API文档
  • video-generation
    - 从零开始创建视频
  • video-editing
    - 高级视频编辑操作
  • video-to-video
    - 视频风格转换与变换