this is a great idea, but i can't get it to work for some reason.
terminal output:
`Can't load unknown script: /home/user/.config/mpv/scripts/c_concat.sh
Resuming playback. This behavior can be disabled with --no-resume-playback.
(+) Video --vid=1 (*) (h264 1280x720 30.000fps)
(+) Audio --aid=1 --alang=eng (*) (aac 2ch 44100Hz)
[auto_profiles] Applying auto profile: focus-lost
AO: [pulse] 44100Hz stereo 2ch float
VO: [gpu] 1280x720 yuv420p
[auto_profiles] Restoring profile: focus-lost
[cutter] count:1
[cutter] [left trim is cut]:79.333333333333
[cutter] count:2
[cutter] [right trim is cut]:90.766666666667
[cutter] time pairs:79.333333333333,90.766666666667
[cutter] video_path:in.mp4
[cutter] _video_path:in.mp4
[cutter] shell:echo "79.333333333333,90.766666666667"> ~/.config/mpv/scripts/time_pairs.txt
/home/user/Downloads
[cutter] shell:~/.config/mpv/scripts/c_concat.sh ~/.config/mpv/scripts/time_pairs.txt "in.mp4" in.mp4
file name:in.mp4
dirpath:in.mp4
path:in.mp4
f:/home/user/.config/mpv/scripts
cp mode
run.sh has generated
OK!
srcipt_dir:/home/user/.config/mpv/scripts
Saving state.
Exiting... (Quit)
output of mpv:
[user@user-pc ~]$ cd Downloads/ && mpv in.mp4 > error.txt; kate error.txt; rm error.txt; exit
AV: 00:01:19 / 00:11:34 (11%) x1.97 A-V: 0.000 Dropped: 3
AV: 00:01:19 / 00:11:34 (11%) x1.97 A-V: 0.000 Dropped: 3
AV: 00:01:30 / 00:11:34 (13%) x1.97 A-V: 0.000 Dropped: 3
AV: 00:01:31 / 00:11:34 (13%) x1.97 A-V: 0.000 Dropped: 3
AV: 00:01:31 / 00:11:34 (13%) x1.97 A-V: 0.000 Dropped: 3
/home/user/.config/mpv/scripts/c_concat.sh: line 45: bc: command not found
/home/user/.config/mpv/scripts/run.sh: line 1: cd: in.mp4: Not a directory
ffmpeg version n5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 12.1.0 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-opencl --enable-opengl --enable-shared --enable-version3 --enable-vulkan --host-cflags='"-fPIC"'
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'in.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2022-10-10T08:11:18.000000Z
Duration: 00:11:34.60, start: 0.000000, bitrate: 797 kb/s
Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 664 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
Metadata:
creation_time : 2022-10-10T08:11:18.000000Z
handler_name : ISO Media file produced by Google Inc. Created on: 10/10/2022.
vendor_id : [0][0][0][0]
Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
creation_time : 2022-10-10T08:11:18.000000Z
handler_name : ISO Media file produced by Google Inc. Created on: 10/10/2022.
vendor_id : [0][0][0][0]
Invalid duration specification for t: -c
cp: cannot stat '.cut_video/clip0.mp4': No such file or directory
AV: 00:01:36 / 00:11:34 (14%) x1.97 A-V: 0.000 Dropped: 4
i'm using:
NAME="Manjaro-ARM" ID="manjaro-arm" ID_LIKE="manjaro arch" PRETTY_NAME="Manjaro ARM" ANSI_COLOR="1;32" HOME_URL="https://www.manjaro.org/" SUPPORT_URL="https://forum.manjaro.org/c/arm/" LOGO=manjarolinux
mpv.conf just for good measure, not that it should matter:
force-window=yes osd-font-size=39 write-filename-in-watch-later-config save-position-on-quit fullscreen no-input-cursor speed=1.97 native-keyrepeat volume-max=160 [focus-lost] profile-cond=get('current-tracks/video/image') == false and not focused profile-restore=copy pause
/home/user/.config/mpv/scripts/run.sh output by your script:
cd "/home/user/Downloads" mkdir .cut_video ffmpeg -f concat -i .cut_video/concat.txt -c copy "date "+%Y%m%d%H%M_%S"_cut_in.mp4" rm -rf .cut_video echo OK! echo srcipt_dir:/home/user/.config/mpv/scripts
this is a great idea, but i can't get it to work for some reason.
terminal output:
output of mpv:
i'm using:
NAME="Manjaro-ARM" ID="manjaro-arm" ID_LIKE="manjaro arch" PRETTY_NAME="Manjaro ARM" ANSI_COLOR="1;32" HOME_URL="https://www.manjaro.org/" SUPPORT_URL="https://forum.manjaro.org/c/arm/" LOGO=manjarolinux
mpv.conf just for good measure, not that it should matter:force-window=yes osd-font-size=39 write-filename-in-watch-later-config save-position-on-quit fullscreen no-input-cursor speed=1.97 native-keyrepeat volume-max=160 [focus-lost] profile-cond=get('current-tracks/video/image') == false and not focused profile-restore=copy pause
/home/user/.config/mpv/scripts/run.sh output by your script:
cd "/home/user/Downloads" mkdir .cut_video ffmpeg -f concat -i .cut_video/concat.txt -c copy "
date "+%Y%m%d%H%M_%S"_cut_in.mp4" rm -rf .cut_video echo OK! echo srcipt_dir:/home/user/.config/mpv/scripts