skills/video-clipper/SKILL.md
Create video clips from chapter timestamps using ffmpeg. Use when given a video file and timestamps/chapters to split into separate clips.
npx skillsauth add jeffvincent/claude-config Video ClipperInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This Skill uses ffmpeg to create video clips from a source video file. It supports two modes:
Supports multiple video formats (MP4, MOV, AVI, MKV) and offers both fast stream copy mode and re-encode mode for consistent quality.
Use this Skill when:
Do NOT use this Skill for:
For Multi-Chapter Mode:
00:00:00 - Chapter Name00:05:30 - Another ChapterHH:MM:SS - Chapter NameMM:SS - Chapter Name (for videos under 1 hour)For Single Snippet Mode:
55s to 2m35s (natural language)1:30 to 5:45 (MM:SS format)00:01:30 to 00:05:45 (HH:MM:SS format)For Multi-Chapter Mode:
01-Chapter_Name.mp4 (numbered, spaces replaced with underscores)For Single Snippet Mode:
[video_name]_[start]-[end].mp4 or custom filenameFirst, check if ffmpeg is installed:
which ffmpeg && ffmpeg -version
If not installed, provide installation instructions:
brew install ffmpegsudo apt-get install ffmpegsudo yum install ffmpegAsk user to install ffmpeg before proceeding if missing.
Check the user's request to determine which mode to use:
Single Snippet Mode indicators:
Multi-Chapter Mode indicators:
If Single Snippet Mode detected, skip to Step 2a: Single Snippet Workflow below. If Multi-Chapter Mode detected, continue to Step 2b: Multi-Chapter Workflow below. If unclear, ask user: "Would you like to create (1) a single clip from a time range, or (2) multiple clips from chapter timestamps?"
For creating one clip from a time range:
Get video file path:
ls -lh [filepath]Parse time range:
55s to 2m35s → convert to seconds: 55 to 1551:30 to 5:45 → convert to seconds: 90 to 34500:01:30 to 00:05:45 → already in HH:MM:SS formatXs (seconds): 55s = 55 secondsXm or XmYs (minutes): 2m35s = 155 seconds, 5m = 300 secondsXhYm or XhYmZs (hours): 1h30m = 5400 secondsMM:SS: 1:30 = 90 secondsHH:MM:SS: 00:01:30 = 90 secondsGet output filename:
[video_name]_[start]-[end].mp4customer-call_00-55_02-35.mp4Get encoding preference:
Convert times to HH:MM:SS format for ffmpeg:
def seconds_to_timestamp(seconds):
h = seconds // 3600
m = (seconds % 3600) // 60
s = seconds % 60
return f"{h:02d}:{m:02d}:{s:02d}"
Generate ffmpeg command:
ffmpeg -i [video] -ss [start] -to [end] -c copy -avoid_negative_ts 1 "[output]"ffmpeg -i [video] -ss [start] -to [end] -c:v libx264 -preset medium -crf 23 -c:a aac -b:a 128k "[output]"Execute command:
Report results:
# Video Clip Created
**Source:** [video_path]
**Time Range:** [start] to [end] ([duration])
**Output:** [output_path]
**Size:** [file_size]
**Encoding:** [copy/encode]
**Command used:**
```bash
[ffmpeg command]
Skip to Step 9 (Quality Checks)
For creating multiple clips from chapter timestamps:
(Continue with existing workflow below...)
Check what information is provided. If missing, prompt for:
Video file path:
ls -lh [filepath]Chapter timestamps:
00:00:00 - Introduction
00:05:30 - Main Topic
00:15:45 - Q&A
(Tip: If you have a video transcript, try the Video Transcript Analyzer skill first to generate timestamps)"Output directory:
[video_directory]/[video_name]_clips/Encoding mode:
Parse timestamp format:
import re
from datetime import datetime, timedelta
def parse_timestamp(ts_str):
"""Convert HH:MM:SS or MM:SS to seconds"""
parts = ts_str.strip().split(':')
if len(parts) == 3: # HH:MM:SS
h, m, s = map(int, parts)
return h * 3600 + m * 60 + s
elif len(parts) == 2: # MM:SS
m, s = map(int, parts)
return m * 60 + s
else:
raise ValueError(f"Invalid timestamp format: {ts_str}")
def parse_chapter_line(line):
"""Parse '00:05:30 - Chapter Name' format"""
match = re.match(r'(\d{1,2}:\d{2}:\d{2}|\d{1,2}:\d{2})\s*-\s*(.+)', line.strip())
if match:
timestamp, name = match.groups()
return parse_timestamp(timestamp), name.strip()
return None
Validate timestamps:
Get video duration:
ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 [video_file]
Calculate end times:
Create safe filenames from chapter names:
import re
def sanitize_filename(name):
"""Convert chapter name to safe filename"""
# Remove or replace special characters
name = re.sub(r'[<>:"/\\|?*]', '', name)
# Replace spaces with underscores
name = name.replace(' ', '_')
# Replace multiple underscores with single
name = re.sub(r'_+', '_', name)
# Remove leading/trailing underscores
name = name.strip('_')
# Limit length to 100 chars
if len(name) > 100:
name = name[:100]
return name
Generate filenames:
{number:02d}-{sanitized_name}.{extension}01-Introduction.mp4, 02-Main_Topic.mp4mkdir -p [output_directory]
Show user where clips will be saved.
For "copy" mode (fast, no re-encode):
ffmpeg -i [input_video] -ss [start_time] -to [end_time] -c copy -avoid_negative_ts 1 "[output_file]"
For "encode" mode (slower, precise):
ffmpeg -i [input_video] -ss [start_time] -to [end_time] -c:v libx264 -preset medium -crf 23 -c:a aac -b:a 128k "[output_file]"
Key parameters:
-ss [start_time]: Start time in HH:MM:SS format-to [end_time]: End time in HH:MM:SS format-c copy: Stream copy (no re-encode)-c:v libx264: Video codec for encoding-preset medium: Encoding speed/quality balance-crf 23: Quality level (18-28, lower is better)-c:a aac: Audio codec-avoid_negative_ts 1: Fix timestamp issues in copy modeShow execution plan:
Creating [N] clips from [video_name]:
1. [00:00:00 - 00:05:30] → 01-Introduction.mp4
2. [00:05:30 - 00:15:45] → 02-Main_Topic.mp4
...
Execute commands sequentially:
For parallel execution (optional, if user wants speed):
Check each output file:
ls -lh [output_directory]/*.mp4
Get clip durations:
for file in [output_directory]/*.mp4; do
ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$file"
done
Generate summary report:
# Video Clipping Complete
## Source Video
- File: [path]
- Duration: [HH:MM:SS]
- Size: [size]
## Created Clips
| # | Clip Name | Duration | Size | Time Range |
|---|-----------|----------|------|------------|
| 1 | 01-Introduction.mp4 | 05:30 | 15.2 MB | 00:00:00 - 00:05:30 |
| 2 | 02-Main_Topic.mp4 | 10:15 | 28.4 MB | 00:05:30 - 00:15:45 |
## Summary
- Total clips created: [N]
- Total size: [total_size]
- Output location: [directory]
- Encoding mode: [copy/encode]
## Warnings/Errors
[List any issues encountered]
## Commands Used
```bash
[Show all ffmpeg commands for reference]
Before finalizing:
If using "copy" mode, warn user:
Note: Copy mode may result in clips that don't start exactly at the specified timestamp due to keyframe positions. If precise cuts are needed, re-run with "encode" mode.
Common errors and solutions:
ffmpeg not found:
command not found: ffmpegInvalid timestamp:
Timestamp beyond video duration:
File not found:
Permission denied:
Codec errors in copy mode:
-avoid_negative_ts 1Overlapping timestamps:
User says: "Create a clip from 55s to 2m35s"
User provides: /Users/alice/videos/customer-call.mp4
Workflow:
customer-call_00-55_02-35.mp4ffmpeg -i /Users/alice/videos/customer-call.mp4 -ss 00:00:55 -to 00:02:35 -c copy -avoid_negative_ts 1 "customer-call_00-55_02-35.mp4"
# Video Clip Created
**Source:** /Users/alice/videos/customer-call.mp4
**Time Range:** 00:00:55 to 00:02:35 (1m 40s)
**Output:** /Users/alice/videos/customer-call_00-55_02-35.mp4
**Size:** 8.2 MB
**Encoding:** copy
Output file:
/Users/alice/videos/customer-call_00-55_02-35.mp4 (8.2 MB, 1m 40s)
User provides:
Video: /Users/alice/videos/customer-call.mp4
Chapters:
00:00:00 - Introduction
00:02:57 - Memberships & Registration
00:09:41 - Lists vs Views
00:15:30 - API Limitations
Workflow:
/Users/alice/videos/customer-call_clips/Output files:
/Users/alice/videos/customer-call_clips/
01-Introduction.mp4 (15.2 MB, 02:57)
02-Memberships_Registration.mp4 (28.4 MB, 06:44)
03-Lists_vs_Views.mp4 (24.1 MB, 05:49)
04-API_Limitations.mp4 (12.8 MB, 03:15)
User says: "I just ran Video Transcript Analyzer on my interview. Can you create clips from those chapters?"
Workflow:
00:02:57 - Memberships & Registration Management
00:09:41 - Lists vs Views Disconnect
00:15:30 - API Limitations
00:20:15 - Workflow Automation Issues
User provides:
Video: /home/user/videos/tutorial.mp4
Chapters:
0:00 - Intro
5:30 - Setup
12:45 - Demo
18:20 - Q&A
Workflow:
File Access:
Command Execution:
Privacy:
See resources/ folder for:
This skill is part of the video processing workflow:
┌─────────────────────┐
│ wistia-uploader │ → Upload video, get transcript
└──────────┬──────────┘
│
▼
┌─────────────────────────────┐
│ video-transcript-analyzer │ → Analyze transcript, get timestamps
└──────────┬──────────────────┘
│
▼
┌─────────────────────┐
│ video-clipper │ ← YOU ARE HERE
│ (create clips) │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ wistia-uploader │ → (Optional) Upload clips to Wistia
└─────────────────────┘
Preceding skill: video-transcript-analyzer - Use this first to generate chapter timestamps from a transcript
Following skill: wistia-uploader - Optionally upload the created clips to Wistia for hosting
tools
Render a video clip with captions overlaid, using the Remotion captioner at `/Users/jvincent/Projects/remotion-captioner/`. Use when user provides a video file and wants to add captions/subtitles, mentions "caption this video", "add captions", "burn in subtitles", or provides a video + SRT file pair.
development
Upload video files to Wistia projects using the Data API. Use when user wants to upload videos to their Wistia account for hosting, transcription, or sharing.
development
Transcribe voice memos to text using Whisper. Use when user provides audio/video files (.m4a, .mp3, .mov, etc.) and asks to transcribe them into text and SRT format with timestamps.
testing
# Voice Authenticity Reviewer ## Purpose Review any written content for alignment with authentic speaking and writing voice using analyzed patterns from 7 meeting transcripts and strategic memos. ## When to Use This Skill - Before sharing strategic memos with leadership - Before sending important emails - When drafting presentation scripts - When reviewing documentation for external sharing - As part of Writing /produce-memo workflow (Step 6) - Anytime voice authenticity verification is needed