mpv-clipper is a Lua script for mpv that lets you quickly create clips from videos directly in the player.
It is lossless by default (using copy mode), but also supports quality presets (high, medium, fast, tiny) and a custom mode for advanced control.
You can cycle between presets with a single key (q).
Windows
%APPDATA%/mpv/
macOS / Linux
~/.config/mpv/
- Create a
scripts/folder inside your mpv config directory if it doesn't exist. - Save
mpv-clipper.luainto thescripts/folder. - (Optional) Create a
mpv-clipper.conffile in the main mpv config directory to override settings.
Final structure:
~/.config/mpv/
├── scripts/
│ └── mpv-clipper.lua
└── mpv-clipper.conf (optional)
Make sure FFmpeg is installed and available in your system PATH.
Test with:
ffmpeg -version- Load a video in
mpv - Seek to the desired start time
- Press
cto mark the start - Seek to the desired end time
- Press
vto mark the end - Press
bto create the clip
- Press
qto cycle through:
copy→high→medium→fast→tiny→custom→ back tocopy
copy mode = lossless passthrough (no re-encoding).
Other presets re-encode with different CRF, preset speed, and audio bitrates.
custom mode uses only what you define in mpv-clipper.conf.
| Key Combination | Description |
|---|---|
c |
Set start point |
v |
Set end point |
b |
Create clip |
q |
Cycle quality mode |
Create or edit mpv-clipper.conf in your mpv config folder.
# Output directory for clips (leave empty for same folder as source)
output_dir="/home/user/clips"
# Default codecs ("copy" = lossless passthrough)
video_codec="copy"
audio_codec="copy"
# Container format (auto=same as input)
container="auto"
# Audio bitrate (used if audio is re-encoded)
audio_bitrate="192k"
# Optional CRF & preset (only used if re-encoding video)
crf=""
preset=""
# Optional scaling (e.g., "1280:-1")
scale=""
# Clip filename suffix
clip_suffix="-clip"
# OSD duration in ms
osd_duration=1500
# Show debug logs in console
show_logs=false
# Default quality mode
# Options: copy, high, medium, fast, tiny, custom
quality="copy"| Mode | Video Codec | CRF | Preset | Audio Codec | Audio Bitrate |
|---|---|---|---|---|---|
| copy | copy | — | — | copy | — |
| high | libx264 | 18 | slower | aac | 192k |
| medium | libx264 | 20 | medium | aac | 128k |
| fast | libx264 | 23 | fast | aac | 96k |
| tiny | libx264 | 28 | ultrafast | aac | 64k |
| custom | user-set | — | — | user-set | — |
1. mpv video.mp4
2. Press `c` at 00:05:10
3. Press `v` at 00:06:30
4. Press `b` → Outputs lossless clip in same format as source
1. Press `q` until "medium" appears in OSD
2. Set start/end with `c` and `v`
3. Press `b` → Outputs re-encoded clip (CRF 20, medium preset, 128k audio)
- Ensure
mpv-clipper.luais inscripts/ - Verify mpv is reading from correct config directory
- Press
~to open console and check for[mpv-clipper]messages
- FFmpeg not found? Install and add to
PATH - Output directory not writable? Adjust
output_dir - Network streams may not be supported
- Check for conflicts in other scripts
- Edit bindings directly in Lua file if needed
- Test with
mpv --input-test