File | Date | Author | Commit |
---|---|---|---|
flatpak | 2021-11-16 |
![]() |
[4a06be] set ~/Videos/mpv as target for video cutter |
mpv-video-cutter-linux | 2021-11-15 |
![]() |
[bdd525] S key show osd Left trim: 00:00 |
README.md | 2021-12-11 |
![]() |
[330dda] Update README.md |
lua script to extract single or multiple segments of video into a single file, this is fast without re-encoding.
Patch to work with multiple video segments/cuts. Thanks @gabin22
OSD message for enhancements. OSD displays messages! Thanks @rushmj
Flatpak support (with default directory to ~/Videos/mpv-cut/) thanks to yours truly :-)
Copy the 3 files cutter.lua
and c_concat.sh
and c_concat2.sh
present in mpv-video-cutter-linux
directory to ~/.config/mpv/scripts/
directory
cd /tmp
git clone https://github.com/fastrizwaan/mpv-video-cutter-linux.git
mkdir -p ~/.config/mpv/scripts
cp mpv-video-cutter-linux/mpv-video-cutter-linux/* ~/.config/mpv/scripts
chmod 0755 ~/.config/mpv/scripts/c_concat.sh
chmod 0755 ~/.config/mpv/scripts/c_concat2.sh
cd /tmp
git clone https://github.com/fastrizwaan/mpv-video-cutter-linux.git
mkdir -p ~/.var/app/io.mpv.Mpv/config/mpv/scripts/
cp mpv-video-cutter-linux/flatpak/* ~/.var/app/io.mpv.Mpv/config/mpv/scripts/
chmod 0755 ~/.var/app/io.mpv.Mpv/config/mpv/scripts/c_concat.sh
chmod 0755 ~/.var/app/io.mpv.Mpv/config/mpv/scripts/c_concat2.sh
Before using it,mpv and ffmpeg should be installed.support mac os x and linux,if you want it supports windows,you can write CMD instead of Bash Shell.
it can cut video and concat automatically
put c_concat.sh , cutter.lua into ~/.config/mpv/scripts/,then use shell:mpv path/file open the movie
press c will confirm a left trim,then press c you will confirm a right trim,left and right trim ensure one segment,you can continue do this,at last press key o,the video will be cut and concatenated in the video's dir automatically.
this script uses the FFmpeg to finish the job,and is lossless cutting,the cut video will not lose quality.
also you can bind your own hot key to the event.
I have defined some event you can bind it in the ~/.config/mpv/input.conf,for example:Ctrl+s script-binding set_fromStart
here are them:
In fact,I should also add some more function like GUI editor?