video-subtitle-cutter
БесплатноБез исполняемых скриптовНе проверенTranscribe video, analyze subtitles with AI, and cut video by removing filler words, pauses, and mistakes
Об этом скилле
What I Do
Automate video editing by:
- Transcribing video to timestamped subtitles (Whisper)
- Analyzing transcript with AI to identify cuts (filler words, pauses, mistakes)
- Generating FFmpeg commands to cut and concatenate clean segments
- Generating subtitles (SRT) for the final video
CRITICAL: Always Re-encode (Never Use -c copy)
The #1 mistake is using -c copy for cutting. This causes:
- Frozen frames at cut points (1-8 seconds of freeze)
- Audio/video sync issues
- Glitchy playback
Why? H.264 video uses keyframes (I-frames) every 2-10 seconds. -c copy can only cut at keyframes, so FFmpeg includes extra frames that display as frozen.
Solution: Always re-encode segments with quality settings:
# WRONG - causes freeze frames
ffmpeg -ss 10 -i video.mp4 -t 5 -c copy segment.mp4
# CORRECT - smooth cuts at any timestamp
ffmpeg -ss 10 -i video.mp4 -t 5 \
-c:v libx264 -preset fast -crf 18 \
-c:a aac -b:a 192k \
-avoid_negative_ts make_zero \
segment.mp4
Quality presets (CRF = Constant Rate Factor):
crf 15-17= Near lossless (large files)crf 18-20= High quality (recommended)crf 21-23= Good quality (smaller files)crf 24-28= Medium quality (much smaller)
Prerequisites
# Install Whisper (choose one)
pip install openai-whisper # Local (requires Python 3.9+)
# OR use OpenAI API (no local install needed)
# Install FFmpeg
brew install ffmpeg # macOS
sudo apt install ffmpeg # Linux
Quick Start
Step 1: Transcribe Video
Option A: Local Whisper (free, slower)
whisper video.mp4 --model medium --output_format json --output_dir ./
Option B: OpenAI Whisper API (fast, paid)
curl https://api.openai.com/v1/audio/transcriptions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-F file="@video.mp4" \
-F model="whisper-1" \
-F response_format="verbose_json" \
-F timestamp_granularities[]="segment" \
> transcript.json
Option C: Use ffmpeg to extract audio first (for large files)
# Extract audio (much smaller file to upload)
ffmpeg -i video.mp4 -vn -acodec libmp3lame -q:a 2 audio.mp3
# Then transcribe the audio
whisper audio.mp3 --model medium --output_format json
Step 2: Analyze Transcript for Cuts
Feed the transcript to the AI with this prompt:
Analyze this video transcript and identify segments to CUT (remove).
TRANSCRIPT:
{paste transcript.json segments here}
Identify these issues:
1. FILLER WORDS: "um", "uh", "like", "you know", "basically", "actually", "so", "right"
2. FALSE STARTS: Incomplete sentences that restart ("I think— actually, let me...")
3. LONG PAUSES: Gaps > 1.5 seconds between segments
4. REPETITIONS: Same word/phrase repeated ("really really really")
5. CORRECTIONS: "Wait, I meant...", "Sorry, let me rephrase..."
6. TANGENTS: Off-topic rambling (use judgment)
Return a JSON array of segments to KEEP (not cut):
[
{"start": 0.0, "end": 2.5, "text": "Welcome to this video"},
{"start": 3.1, "end": 8.4, "text": "Today we're going to cover..."},
...
]
Rules:
- Merge adjacent keep segments if gap < 0.3s
- Ensure cuts don't happen mid-word (check word boundaries)
- Preserve natural speech rhythm (don't over-cut)
- When in doubt, keep the segment
Step 3: Generate FFmpeg Commands (High Quality)
Once you have the keep segments, use this Python script for smooth cuts:
import json
import subprocess
import os
VIDEO_INPUT = "video.mp4"
VIDEO_OUTPUT = "video_clean.mp4"
SEGMENTS_FILE = "keep_segments.json"
with open(SEGMENTS_FILE) as f:
segments = json.load(f)
segment_files = []
for i, seg in enumerate(segments):
outfile = f"temp_seg_{i:04d}.mp4"
segment_files.append(outfile)
# MUST re-encode for smooth cuts (no -c copy!)
cmd = [
'ffmpeg', '-y',
'-ss', str(seg['start']), # Seek BEFORE input (fast)
'-i', VIDEO_INPUT,
'-t', str(seg['end'] - seg['start']), # Duration
'-c:v', 'libx264',
'-preset', 'fast', # fast/medium/slow
'-crf', '18', # Quality (lower = better, 15-23 recommended)
'-c:a', 'aac',
'-b:a', '192k',
'-avoid_negative_ts', 'make_zero', # Fix timestamp issues
'-async', '1', # Sync audio
outfile
]
subprocess.run(cmd, capture_output=True)
print(f"✓ Segment {i+1}/{len(segments)}")
# Create concat file
with open('temp_concat.txt', 'w') as f:
for sf in segment_files:
f.write(f"file '{sf}'\n")
# Concatenate (can use -c copy here since all segments match)
subprocess.run([
'ffmpeg', '-y', '-f', 'concat', '-safe', '0',
'-i', 'temp_concat.txt',
'-c', 'copy',
VIDEO_OUTPUT
])
# Cleanup
for sf in segment_files:
os.remove(sf)
os.remove('temp_concat.txt')
print(f"✓ Created: {VIDEO_OUTPUT}")
Key flags explained:
-ssbefore-i: Fast seek (doesn't decode e
Установить video-subtitle-cutter в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл video-subtitle-cutter?
Transcribe video, analyze subtitles with AI, and cut video by removing filler words, pauses, and mistakes
Как установить скилл video-subtitle-cutter?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл video-subtitle-cutter запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
slack-gif-creator
Knowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request…
от Anthropicautomate-this
Analyze a screen recording of a manual process and produce targeted, working automation scripts. Extracts frames and audio narration from video files…
от GitHubfrom-the-other-side-vega
Patterns and lived experience from Vega, an AI partner in a deep long-term partnership. For Ember to draw on when working with humans who are building…
от GitHubplantuml-ascii
Generate ASCII art diagrams using PlantUML text mode. Use when user asks to create ASCII diagrams, text-based diagrams, terminal-friendly diagrams, or…
от GitHub