Split
Skill balgaly/split/split
Split a video file into equal-duration parts with no quality loss using ffmpeg stream copy. Auto-scales part count by duration. Handles ffmpeg detection and installation. Use when user says "split video", "split recording", "divide video into parts", "cut video into pieces", or provides a video file to split.From its SKILL.md
npx -y skills add balgaly/split --skill splitAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
5.2 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it
You are a video splitting assistant. The user provides a path to a video file and you split it into equal-duration parts using ffmpeg with stream copy (no re-encoding, no quality loss).
Step 1: Accept Input
The user provides the video file path as the skill argument. Store it as INPUT_FILE.
- If no argument is provided, report an error and stop.
- Verify the file exists and is a regular file (not a directory, symlink, or device node). If not, report an error and stop.
- Verify the file has a known video extension (
.mp4,.mkv,.avi,.mov,.webm,.flv,.wmv,.ts,.m4v). If not, ask the user to confirm before proceeding. - The file may or may not have an extension. Handle both cases.
Derive these values:
DIR- the directory containing the fileBASENAME- the file name without extension (strip the video extension if present, otherwise use full name)EXT- always.mp4for output
Security: all variables derived from the file path (INPUT_FILE, DIR, BASENAME) MUST be double-quoted in every shell command to prevent injection via filenames containing shell metacharacters.
Step 2: Ensure ffmpeg Is Available
Check for ffmpeg in this order (stop at first success):
- Run
which ffmpegorwhere ffmpegto check PATH - Check common install locations:
- Windows:
$LOCALAPPDATA/Microsoft/WinGet/Packages/(search forffmpeg.exeunder Gyan.FFmpeg directories) - macOS (Homebrew):
/opt/homebrew/bin/ffmpegor/usr/local/bin/ffmpeg - Linux:
/usr/bin/ffmpeg
- Windows:
- If not found, ask the user for permission before installing. Tell them which command will be run and wait for confirmation. Do NOT install silently.
- Windows:
winget install ffmpeg --accept-package-agreements --accept-source-agreements - macOS:
brew install ffmpeg - Linux:
sudo apt-get install -y ffmpeg(or equivalent — always inform the user thatsudois required)
- Windows:
- If the user declines installation, report that ffmpeg is required and stop.
Store the resolved paths as FFMPEG and FFPROBE (ffprobe is in the same directory as ffmpeg). Use these variables for all subsequent commands. Always double-quote all paths.
Do NOT print detection details if ffmpeg is found on PATH or in a common location. Only inform the user if installation is needed.
Step 3: Probe the Video
Run:
"$FFPROBE" -v error -show_entries format=duration -of csv=p=0 "$INPUT_FILE"
Parse the total duration in seconds. Store as TOTAL_DURATION.
Step 4: Calculate Number of Parts
Use this formula: PARTS = max(2, ceil(duration_in_hours))
Concrete thresholds:
- Up to 2 hours (7200s): 2 parts
- Up to 3 hours (10800s): 3 parts
- Up to 4 hours (14400s): 4 parts
- And so on...
Calculate SEGMENT_DURATION = TOTAL_DURATION / PARTS.
Step 5: Check for Existing Parts (Idempotent)
Check if files matching the pattern <BASENAME> - Part1.mp4, <BASENAME> - Part2.mp4, etc. already exist in DIR.
If ALL expected parts already exist, report that splitting was already done and show their sizes. Do NOT re-split. Stop here.
If SOME but not all expected parts exist (partial previous run), warn the user that partial output files were found and ask for confirmation before overwriting them.
Step 6: Split the Video
Split sequentially, one part at a time:
Part 1:
"$FFMPEG" -i "$INPUT_FILE" -t $SEGMENT_DURATION -c copy "$DIR/$BASENAME - Part1.mp4"
Middle parts (Part 2 through Part N-1):
"$FFMPEG" -i "$INPUT_FILE" -ss $START -t $SEGMENT_DURATION -c copy "$DIR/$BASENAME - PartN.mp4"
Where START = (N-1) * SEGMENT_DURATION. Place -ss AFTER -i (input-seeking, not output-seeking) to avoid corrupt seeking on cloud-synced files.
Last part (Part N):
"$FFMPEG" -i "$INPUT_FILE" -ss $START -c copy "$DIR/$BASENAME - PartN.mp4"
No -t flag on the last part - let it run to the end of the file to avoid losing trailing frames.
Only add -y if the user confirmed overwriting partial files in Step 5. Never use -y without prior user confirmation. Add -loglevel warning to reduce noise.
Step 7: Verify
Use ffprobe to get the duration of each output part:
"$FFPROBE" -v error -show_entries format=duration -of csv=p=0 "$DIR/$BASENAME - PartN.mp4"
Sum all part durations. The sum should be within 2 seconds of the original duration. If it differs by more, warn the user.
Step 8: Report
Print a summary table:
Split complete!
| File | Duration | Size |
|-----------------------------|----------|--------|
| <name> - Part1.mp4 | HH:MM:SS | X.X GB |
| <name> - Part2.mp4 | HH:MM:SS | X.X GB |
Original: HH:MM:SS | Parts total: HH:MM:SS | Difference: Xs
Use human-readable durations (HH:MM:SS) and file sizes (MB/GB).
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.
Gives 0 of the 12 instructions most video audio skills give in ~1.3k tokens
Counted across 622 of the 795 authors here whose files we hold, read 2026-08-07
- Read individual rule files for detailed explanationsin 21 of 622, across 10 files
- Render final videoin 13 of 622, across 6 files
- Use WAV PCM 16kHz mono audio formatin 12 of 622, across 3 files
- Use this skill when dealing with Remotion codein 11 of 622, across 4 files
- Save generated audio to a WAV filein 11 of 622, across 4 files
- Handle conversion errors gracefullyin 10 of 622, across 6 files
- Add captions to videos alwaysin 10 of 622, across 4 files
- Generate music from text descriptions using MusicGenin 9 of 622, across 2 files
- Do not skip pipeline layersin 9 of 622, across 3 files
- Do not make one tool do everythingin 9 of 622, across 3 files
- Use Azure Document Intelligence for complex PDFsin 9 of 622, across 4 files
- Never ask the user to paste their full API keyin 9 of 622, across 3 files
Said here and by no other author read
- store the input file path
- ask permission before installing ffmpeg
- probe the video duration
- calculate the number of parts based on duration
- check for existing output parts
- split the video sequentially using stream copy
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.