@aedev-tools/splitit
v1.0.2
Published
Split and slice videos into pieces with fixed steps or random cuts
Downloads
47
Maintainers
Readme
splitit
A fast, easy-to-use CLI tool for splitting and slicing videos into pieces.
Features
- Fixed Step Mode: Split video into equal-length segments
- Random Cuts Mode: Split video into N random parts
- Interactive & CLI Modes: Choose guided experience or command-line flags
- Smart Encoding: Uses fast copy mode by default, falls back to re-encoding when needed
- Cross-platform: Works on macOS, Linux, and Windows
Installation
npm install -g splititThen install ffmpeg (required dependency):
# macOS
brew install ffmpeg
# Ubuntu/Debian
sudo apt-get install ffmpeg
# Other systems: https://ffmpeg.org/download.htmlUsage
Interactive Mode
Simply run splitit and follow the prompts:
splitit
splitit split video.mp4Command-Line Mode
Use flags to specify options directly:
Fixed step splitting:
splitit split video.mp4 --mode fixed --step 60
splitit split video.mp4 -m fixed -s 60Random cuts:
splitit split video.mp4 --mode random --parts 5
splitit split video.mp4 -m random -p 5Custom output directory:
splitit split video.mp4 -m fixed -s 60 --output ./outputHelp
splitit --help
splitit split --helpOptions
split command
Options:
--mode, -m <mode> fixed|random (interactive if not provided)
--step, -s <seconds> Step size in seconds or HH:MM:SS (fixed mode)
--parts, -p <number> Number of parts (random mode)
--output, -o <dir> Output directory (default: splitit_<filename>/)
--help, -h Show helpExamples
Split a video every 30 seconds
splitit split myvideo.mp4 --mode fixed --step 30
# Creates: splitit_myvideo/myvideo_part_001.mp4, myvideo_part_002.mp4, etc.Split a video into 5 random parts
splitit split myvideo.mp4 --mode random --parts 5Interactive mode
$ splitit split podcast.mp4
? Choose split mode: (Use arrow keys)
❯ Fixed steps (e.g., every 60s)
Random cuts
? Enter step size (seconds or HH:MM:SS): 5:00
✓ Created podcast_part_001.mp4
✓ Created podcast_part_002.mp4
...
Done. Parts saved to: splitit_podcastOutput
- Output Directory:
splitit_<original_filename>/(in same directory as input) - File Names:
<filename>_part_001.<ext>,<filename>_part_002.<ext>, etc. - Format: Original codec preserved for quality
Time Format
Step size accepts multiple formats:
- Seconds:
60,30.5 - MM:SS:
1:30,5:00 - HH:MM:SS:
01:30:00,00:05:30
Development
git clone <repo>
cd splitit-cli
npm install
npm run build
npm run devLicense
MIT
