The smartcut CLI requires an input file path and an output file path as positional arguments. You can define which parts of the video to preserve or remove using the --keep (or -k) and --cut (or -c) options.
Keep segments
Use --keep to specify the time ranges you want to retain. The tool will discard everything else.
smartcut input.mp4 output.mp4 --keep 10,20,40,50
This example keeps the segment from 10s to 20s and the segment from 40s to 50s.
Cut segments
Use --cut to specify the time ranges you want to remove. The tool will keep everything except these segments.
smartcut input.mp4 output.mp4 --cut 30,40,01:00,01:10
This example removes the segment from 30s to 40s and the segment from 1m to 1m10s.
Shorthands and Keywords
- Shorthands:
-k for --keep, -c for --cut. - Start/End Keywords: Use
start (or s) and end (or e) to define boundaries.smartcut input.mp4 output.mp4 -k start,30,01:00,end (Keeps from start to 30s, and from 1m to end).
- Negative Timestamps: Use negative values to count backwards from the end of the file.
smartcut input.mp4 output.mp4 -c "-5,end" (Cuts the last 5 seconds).smartcut input.mp4 output.mp4 -k 10,-10 (Keeps from 10s to 10s before the end).smartcut input.mp4 output.mp4 -k 0,-1:30 (Keeps everything except the last 1m30s).