From 1d4ce48f02bcb0d68b2c6d9b80aa09351d5906ae Mon Sep 17 00:00:00 2001 From: Enfff Date: Mon, 21 Jul 2025 14:27:40 +0200 Subject: [PATCH 1/2] Removed annoying startup line --- excerpt.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/excerpt.lua b/excerpt.lua index b925cac..571d0df 100644 --- a/excerpt.lua +++ b/excerpt.lua @@ -237,7 +237,6 @@ function os.capture(cmd, raw) end function excerpt_on_loaded() - mp.osd_message("excerpt: use i and o to set IN and OUT points.", 3) local operating_system = string.lower(os.capture("uname")) installed_gpus = string.lower(os.capture("lspci -k | grep -E 'VGA|3D|Display'")) From 525e6f5b76fc3c6f53884be5ebdda457dd61046e Mon Sep 17 00:00:00 2001 From: Enfff Date: Mon, 21 Jul 2025 14:28:25 +0200 Subject: [PATCH 2/2] Updated README: adding installation, custom keybindings --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 35bb2d3..2701af1 100644 --- a/README.md +++ b/README.md @@ -18,3 +18,26 @@ This fork of the [original project](https://github.com/lvml/mpv-plugin-excerpt) - `pciutils` (needed for auto-selection of GPU encoder) - `cuda` if you're using an NVIDIA GPU or - `intel-vaapi-driver`, `intel-media-driver` or any other appropriate package depending on your model, if you're using an INTEL GPU. See [this page](https://wiki.archlinux.org/title/Hardware_video_acceleration) for more info. + +## Installation + +Move the `.lua` script into the default `scripts` folder, defaults to `~/.config/mpv/scripts`. + +``` bash +mkdir -p ~/.config/mpv/scripts +cd ~/.config/mpv/scripts +git clone https://github.com/morrolinux/mpv-plugin-excerpt-v2 tmp +mv tmp/excerpt.lua excerpt.lua +rm -r tmp +``` + +## Customize Key Bindings + +You can customize the key bindings by editing the `excerpt.lua` file or by adding key bindings to your `input.conf` file. The default ones are: + +| Key | Action | Description | +|----:|-------|-------------| +| `i` | Set IN point | Mark the beginning of the excerpt | +| `o` | Set OUT point | Mark the end of the excerpt | +| `x` | Export excerpt | Extract the video segment using default profile | +| `shift+E` | Export accurate | Extract using accurate encoding profile | \ No newline at end of file