/video-editing:cut-segmentfrom video-editing
Extracts precise time-range segments from a video using ffmpeg. Supports lossless stream-copy or frame-accurate re-encode, multiple segments, and optional stitching.
Ships in video-editing. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Extract precise time ranges from a video. Replaces the legacy cut-video-segment command.
| Field | Default |
|---|---|
| Source | required |
| Segments | required: one or more start..end ranges (e.g. 00:01:30..00:03:45) or a JSON array [{start, end, label?}, ...] |
| Output dir | default: same dir as source (or <project>/exports/ when run inside a project) |
| Mode | copy (lossless, stream-copy) — precise (re-encode for frame-accurate cuts) |
| Stitch | no (one file per segment) — yes (concatenate all segments into a single output) |
SRC="$(realpath "$INPUT")"
DUR=$(ffprobe -v error -show_entries format=duration -of default=nw=1:nk=1 "$SRC")
to_seconds() {
awk -F: '{
n = NF
if (n == 3) print $1*3600 + $2*60 + $3
else if (n == 2) print $1*60 + $2
else print $1
}' <<<"$1"
}
For each segment: convert start/end to seconds; reject if start >= end, if start < 0, or if end > DUR. Report which segments were rejected and abort.
copy (default)Stream-copy each segment. Fast, lossless, but cuts land on the nearest keyframe (typically within 1–2s of the requested mark).
i=0
for seg in "${SEGMENTS[@]}"; do
read s e <<<"$seg"
OUT="$OUTDIR/$(basename "${SRC%.*}")_seg_$(printf '%02d' $i)${EXT}"
ffmpeg -y -ss "$s" -to "$e" -i "$SRC" -c copy -avoid_negative_ts make_zero "$OUT"
i=$((i+1))
done
-ss before -i enables fast seek; combined with -c copy this is the lossless path.
preciseFrame-accurate cuts via re-encode. -ss goes after -i to force decode-side seek.
ffmpeg -y -i "$SRC" -ss "$s" -to "$e" \
-c:v libx264 -crf 18 -preset medium \
-c:a aac -b:a 192k \
"$OUT"
If a render profile name was supplied (from render-profiles.json), build the encoder args from that profile instead.
If STITCH=yes:
LIST=$(mktemp)
for f in "${SEGMENT_OUTPUTS[@]}"; do printf "file '%s'\n" "$f" >> "$LIST"; done
ffmpeg -y -f concat -safe 0 -i "$LIST" -c copy "$OUTDIR/$(basename "${SRC%.*}")_stitched${EXT}"
If the segments were produced via precise mode they share encoder params and concat-copy works. For copy mode + stitch, fall back to a re-encode through render-from-library if stream-copy concat fails.
For each output:
ffprobe -v error -show_entries format=duration,size -of default=nw=1 "$OUT"
Compare actual duration to requested (end - start). In copy mode, mention the keyframe-snap drift if it's >0.5s.
Print a table of segment outputs with their durations and sizes. Offer follow-ups (burn-graphics to overlay a label on each, render-from-library to stitch in a richer way, audio-analysis per segment).
_seg_00, _seg_01, …); supply a label per segment in the JSON form to get human-readable names instead.00:00:00..-00:00:N (use ffprobe duration) before validation.merge-videos command's job), use render-from-library instead.add-watermark command's job), use burn-graphics instead.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
video-editing@danielrosehill is listed by danielrosehill/claude-code-plugins — review the source before installing
npx claudepluginhub danielrosehill/claude-code-plugins --plugin video-editing41 skills in this plugin
/agentic-editRun an agentic / LLM-driven cut-down on a long video — "make a 60-second highlight reel of this hour-long stream", "cut the boring parts from this lecture", "find the best moments in this footage". Wraps `video-use` (browser-use) by default; falls back to `VideoAgent` (HKU) for research-grade understanding. Both come from the shared uv venv set up by `deps-setup`. Outputs a cut-list (timestamps + reasons) and an optional rendered preview./audio-analysisExtract audio from a video (or analyze a standalone audio file) and report loudness — integrated LUFS, true peak (dBTP), loudness range — against a target like YouTube (-14 LUFS) or broadcast (-23 LUFS). Use when the user says "check loudness", "is this normalized", "extract the audio", "audio analysis", or "what LUFS is this". Read-only on the source — does not normalize./