Compare commits

..

No commits in common. "main" and "v8.4" have entirely different histories.
main ... v8.4

60 changed files with 408 additions and 1396 deletions

108
Makefile
View File

@ -91,33 +91,33 @@ compile:
cp -rf wrapper/ks-vob-wrapper build
cp -rf wrapper/ks-av1-wrapper build
cp -rf wrapper/ks-av1s-wrapper build
shc -rS -f build/ks-avi -o build/ks-avi.out
shc -rS -f build/ks-crop -o build/ks-crop.out
shc -rS -f build/ks-mix -o build/ks-mix.out
shc -rS -f build/ks-mp3 -o build/ks-mp3.out
shc -rS -f build/ks-mp3-album -o build/ks-mp3-album.out
shc -rS -f build/ks-mp4 -o build/ks-mp4.out
shc -rS -f build/ks-mp4k -o build/ks-mp4k.out
shc -rS -f build/ks-mp4s -o build/ks-mp4s.out
shc -rS -f build/ks-mp4s-folder -o build/ks-mp4s-folder.out
shc -rS -f build/ks-av1s-folder -o build/ks-av1s-folder.out
shc -rS -f build/ks-oga -o build/ks-oga.out
shc -rS -f build/ks-oga-album -o build/ks-oga-album.out
shc -rS -f build/ks-upa -o build/ks-upa.out
shc -rS -f build/ks-upf -o build/ks-upf.out
shc -rS -f build/ks-upr -o build/ks-upr.out
shc -rS -f build/ks-upv -o build/ks-upv.out
shc -rS -f build/ks-vob -o build/ks-vob.out
shc -rS -f build/ks-av1 -o build/ks-av1.out
shc -rS -f build/ks-av1s -o build/ks-av1s.out
shc -rS -f build/ks-conf -o build/ks-conf.out
shc -rS -f build/ks-avi-wrapper -o build/ks-avi-wrapper.out
shc -rS -f build/ks-mp4k-wrapper -o build/ks-mp4k-wrapper.out
shc -rS -f build/ks-mp4s-wrapper -o build/ks-mp4s-wrapper.out
shc -rS -f build/ks-mp4-wrapper -o build/ks-mp4-wrapper.out
shc -rS -f build/ks-vob-wrapper -o build/ks-vob-wrapper.out
shc -rS -f build/ks-av1-wrapper -o build/ks-av1-wrapper.out
shc -rS -f build/ks-av1s-wrapper -o build/ks-av1s-wrapper.out
shc -f build/ks-avi -o build/ks-avi.out
shc -f build/ks-crop -o build/ks-crop.out
shc -f build/ks-mix -o build/ks-mix.out
shc -f build/ks-mp3 -o build/ks-mp3.out
shc -f build/ks-mp3-album -o build/ks-mp3-album.out
shc -f build/ks-mp4 -o build/ks-mp4.out
shc -f build/ks-mp4k -o build/ks-mp4k.out
shc -f build/ks-mp4s -o build/ks-mp4s.out
shc -f build/ks-mp4s-folder -o build/ks-mp4s-folder.out
shc -f build/ks-av1s-folder -o build/ks-av1s-folder.out
shc -f build/ks-oga -o build/ks-oga.out
shc -f build/ks-oga-album -o build/ks-oga-album.out
shc -f build/ks-upa -o build/ks-upa.out
shc -f build/ks-upf -o build/ks-upf.out
shc -f build/ks-upr -o build/ks-upr.out
shc -f build/ks-upv -o build/ks-upv.out
shc -f build/ks-vob -o build/ks-vob.out
shc -f build/ks-av1 -o build/ks-av1.out
shc -f build/ks-av1s -o build/ks-av1s.out
shc -f build/ks-conf -o build/ks-conf.out
shc -f build/ks-avi-wrapper -o build/ks-avi-wrapper.out
shc -f build/ks-mp4k-wrapper -o build/ks-mp4k-wrapper.out
shc -f build/ks-mp4s-wrapper -o build/ks-mp4s-wrapper.out
shc -f build/ks-mp4-wrapper -o build/ks-mp4-wrapper.out
shc -f build/ks-vob-wrapper -o build/ks-vob-wrapper.out
shc -f build/ks-av1-wrapper -o build/ks-av1-wrapper.out
shc -f build/ks-av1s-wrapper -o build/ks-av1s-wrapper.out
rm -rf build/ks-avi.out
rm -rf build/ks-crop.out
rm -rf build/ks-mix.out
@ -197,33 +197,33 @@ compile:
mv build/ks-vob-wrapper.x.c build/ks-vob-wrapper.c
mv build/ks-av1-wrapper.x.c build/ks-av1-wrapper.c
mv build/ks-av1s-wrapper.x.c build/ks-av1s-wrapper.c
gcc -static build/ks-avi.c -o build/ks-avi
gcc -static build/ks-avi-wrapper.c -o build/ks-avi-wrapper
gcc -static build/ks-crop.c -o build/ks-crop
gcc -static build/ks-mix.c -o build/ks-mix
gcc -static build/ks-mp3-album.c -o build/ks-mp3-album
gcc -static build/ks-mp3.c -o build/ks-mp3
gcc -static build/ks-mp4.c -o build/ks-mp4
gcc -static build/ks-mp4k.c -o build/ks-mp4k
gcc -static build/ks-mp4k-wrapper.c -o build/ks-mp4k-wrapper
gcc -static build/ks-mp4s.c -o build/ks-mp4s
gcc -static build/ks-mp4s-folder.c -o build/ks-mp4s-folder
gcc -static build/ks-av1s-folder.c -o build/ks-av1s-folder
gcc -static build/ks-mp4s-wrapper.c -o build/ks-mp4s-wrapper
gcc -static build/ks-mp4-wrapper.c -o build/ks-mp4-wrapper
gcc -static build/ks-oga-album.c -o build/ks-oga-album
gcc -static build/ks-oga.c -o build/ks-oga
gcc -static build/ks-upa.c -o build/ks-upa
gcc -static build/ks-upf.c -o build/ks-upf
gcc -static build/ks-upr.c -o build/ks-upr
gcc -static build/ks-upv.c -o build/ks-upv
gcc -static build/ks-vob.c -o build/ks-vob
gcc -static build/ks-av1.c -o build/ks-av1
gcc -static build/ks-av1s.c -o build/ks-av1s
gcc -static build/ks-conf.c -o build/ks-conf
gcc -static build/ks-vob-wrapper.c -o build/ks-vob-wrapper
gcc -static build/ks-av1-wrapper.c -o build/ks-av1-wrapper
gcc -static build/ks-av1s-wrapper.c -o build/ks-av1s-wrapper
gcc build/ks-avi.c -o build/ks-avi
gcc build/ks-avi-wrapper.c -o build/ks-avi-wrapper
gcc build/ks-crop.c -o build/ks-crop
gcc build/ks-mix.c -o build/ks-mix
gcc build/ks-mp3-album.c -o build/ks-mp3-album
gcc build/ks-mp3.c -o build/ks-mp3
gcc build/ks-mp4.c -o build/ks-mp4
gcc build/ks-mp4k.c -o build/ks-mp4k
gcc build/ks-mp4k-wrapper.c -o build/ks-mp4k-wrapper
gcc build/ks-mp4s.c -o build/ks-mp4s
gcc build/ks-mp4s-folder.c -o build/ks-mp4s-folder
gcc build/ks-av1s-folder.c -o build/ks-av1s-folder
gcc build/ks-mp4s-wrapper.c -o build/ks-mp4s-wrapper
gcc build/ks-mp4-wrapper.c -o build/ks-mp4-wrapper
gcc build/ks-oga-album.c -o build/ks-oga-album
gcc build/ks-oga.c -o build/ks-oga
gcc build/ks-upa.c -o build/ks-upa
gcc build/ks-upf.c -o build/ks-upf
gcc build/ks-upr.c -o build/ks-upr
gcc build/ks-upv.c -o build/ks-upv
gcc build/ks-vob.c -o build/ks-vob
gcc build/ks-av1.c -o build/ks-av1
gcc build/ks-av1s.c -o build/ks-av1s
gcc build/ks-conf.c -o build/ks-conf
gcc build/ks-vob-wrapper.c -o build/ks-vob-wrapper
gcc build/ks-av1-wrapper.c -o build/ks-av1-wrapper
gcc build/ks-av1s-wrapper.c -o build/ks-av1s-wrapper
compile-install:
cp -rf build/ks-upv $(PREFIX)/bin/ks-upv

View File

@ -1,343 +0,0 @@
#################################################
# Installing ks-tools (Linux Homebrew) #
#################################################
PREFIX=/home/linuxbrew/.linuxbrew
install:
cp -rf src/ks-upv $(PREFIX)/bin/ks-upv
chmod +x $(PREFIX)/bin/ks-upv
cp -rf src/ks-upa $(PREFIX)/bin/ks-upa
chmod +x $(PREFIX)/bin/ks-upa
cp -rf src/ks-upf $(PREFIX)/bin/ks-upf
chmod +x $(PREFIX)/bin/ks-upf
cp -rf src/ks-upr $(PREFIX)/bin/ks-upr
chmod +x $(PREFIX)/bin/ks-upr
cp -rf src/ks-avi $(PREFIX)/bin/ks-avi
chmod +x $(PREFIX)/bin/ks-avi
cp -rf src/ks-mp4 $(PREFIX)/bin/ks-mp4
chmod +x $(PREFIX)/bin/ks-mp4
cp -rf src/ks-mp4k $(PREFIX)/bin/ks-mp4k
chmod +x $(PREFIX)/bin/ks-mp4k
cp -rf src/ks-mp4s $(PREFIX)/bin/ks-mp4s
chmod +x $(PREFIX)/bin/ks-mp4s
cp -rf src/ks-mp4s-folder $(PREFIX)/bin/ks-mp4s-folder
chmod +x $(PREFIX)/bin/ks-mp4s-folder
cp -rf src/ks-av1s-folder $(PREFIX)/bin/ks-av1s-folder
chmod +x $(PREFIX)/bin/ks-av1s-folder
cp -rf src/ks-vob $(PREFIX)/bin/ks-vob
chmod +x $(PREFIX)/bin/ks-vob
cp -rf src/ks-av1 $(PREFIX)/bin/ks-av1
chmod +x $(PREFIX)/bin/ks-av1
cp -rf src/ks-av1s $(PREFIX)/bin/ks-av1s
chmod +x $(PREFIX)/bin/ks-av1s
cp -rf src/ks-oga $(PREFIX)/bin/ks-oga
chmod +x $(PREFIX)/bin/ks-oga
cp -rf src/ks-mp3 $(PREFIX)/bin/ks-mp3
chmod +x $(PREFIX)/bin/ks-mp3
cp -rf src/ks-oga-album $(PREFIX)/bin/ks-oga-album
chmod +x $(PREFIX)/bin/ks-oga-album
cp -rf src/ks-mp3-album $(PREFIX)/bin/ks-mp3-album
chmod +x $(PREFIX)/bin/ks-mp3-album
cp -rf src/ks-mix $(PREFIX)/bin/ks-mix
chmod +x $(PREFIX)/bin/ks-mix
cp -rf src/ks-crop $(PREFIX)/bin/ks-crop
chmod +x $(PREFIX)/bin/ks-crop
cp -rf src/ks-conf $(PREFIX)/bin/ks-conf
chmod +x $(PREFIX)/bin/ks-conf
cp -rf wrapper/ks-mp4-wrapper $(PREFIX)/bin/ks-mp4-wrapper
chmod +x $(PREFIX)/bin/ks-mp4-wrapper
cp -rf wrapper/ks-mp4k-wrapper $(PREFIX)/bin/ks-mp4k-wrapper
chmod +x $(PREFIX)/bin/ks-mp4k-wrapper
cp -rf wrapper/ks-mp4s-wrapper $(PREFIX)/bin/ks-mp4s-wrapper
chmod +x $(PREFIX)/bin/ks-mp4s-wrapper
cp -rf wrapper/ks-avi-wrapper $(PREFIX)/bin/ks-avi-wrapper
chmod +x $(PREFIX)/bin/ks-avi-wrapper
cp -rf wrapper/ks-vob-wrapper $(PREFIX)/bin/ks-vob-wrapper
chmod +x $(PREFIX)/bin/ks-vob-wrapper
cp -rf wrapper/ks-av1-wrapper $(PREFIX)/bin/ks-av1-wrapper
chmod +x $(PREFIX)/bin/ks-av1-wrapper
cp -rf wrapper/ks-av1s-wrapper $(PREFIX)/bin/ks-av1s-wrapper
chmod +x $(PREFIX)/bin/ks-av1s-wrapper
cp -rf cygwin/cygwin-path $(PREFIX)/bin/cygwin-path
chmod +x $(PREFIX)/bin/cygwin-path
compile:
mkdir -p build/
cp -rf src/ks-avi build
cp -rf src/ks-crop build
cp -rf src/ks-mix build
cp -rf src/ks-mp3 build
cp -rf src/ks-mp3-album build
cp -rf src/ks-mp4 build
cp -rf src/ks-mp4k build
cp -rf src/ks-mp4s build
cp -rf src/ks-mp4s-folder build
cp -rf src/ks-av1s-folder build
cp -rf src/ks-oga build
cp -rf src/ks-oga-album build
cp -rf src/ks-upa build
cp -rf src/ks-upf build
cp -rf src/ks-upr build
cp -rf src/ks-upv build
cp -rf src/ks-vob build
cp -rf src/ks-av1 build
cp -rf src/ks-av1s build
cp -rf src/ks-conf build
cp -rf wrapper/ks-avi-wrapper build
cp -rf wrapper/ks-mp4k-wrapper build
cp -rf wrapper/ks-mp4s-wrapper build
cp -rf wrapper/ks-mp4-wrapper build
cp -rf wrapper/ks-vob-wrapper build
cp -rf wrapper/ks-av1-wrapper build
cp -rf wrapper/ks-av1s-wrapper build
shc -rS -f build/ks-avi -o build/ks-avi.out
shc -rS -f build/ks-crop -o build/ks-crop.out
shc -rS -f build/ks-mix -o build/ks-mix.out
shc -rS -f build/ks-mp3 -o build/ks-mp3.out
shc -rS -f build/ks-mp3-album -o build/ks-mp3-album.out
shc -rS -f build/ks-mp4 -o build/ks-mp4.out
shc -rS -f build/ks-mp4k -o build/ks-mp4k.out
shc -rS -f build/ks-mp4s -o build/ks-mp4s.out
shc -rS -f build/ks-mp4s-folder -o build/ks-mp4s-folder.out
shc -rS -f build/ks-av1s-folder -o build/ks-av1s-folder.out
shc -rS -f build/ks-oga -o build/ks-oga.out
shc -rS -f build/ks-oga-album -o build/ks-oga-album.out
shc -rS -f build/ks-upa -o build/ks-upa.out
shc -rS -f build/ks-upf -o build/ks-upf.out
shc -rS -f build/ks-upr -o build/ks-upr.out
shc -rS -f build/ks-upv -o build/ks-upv.out
shc -rS -f build/ks-vob -o build/ks-vob.out
shc -rS -f build/ks-av1 -o build/ks-av1.out
shc -rS -f build/ks-av1s -o build/ks-av1s.out
shc -rS -f build/ks-conf -o build/ks-conf.out
shc -rS -f build/ks-avi-wrapper -o build/ks-avi-wrapper.out
shc -rS -f build/ks-mp4k-wrapper -o build/ks-mp4k-wrapper.out
shc -rS -f build/ks-mp4s-wrapper -o build/ks-mp4s-wrapper.out
shc -rS -f build/ks-mp4-wrapper -o build/ks-mp4-wrapper.out
shc -rS -f build/ks-vob-wrapper -o build/ks-vob-wrapper.out
shc -rS -f build/ks-av1-wrapper -o build/ks-av1-wrapper.out
shc -rS -f build/ks-av1s-wrapper -o build/ks-av1s-wrapper.out
rm -rf build/ks-avi.out
rm -rf build/ks-crop.out
rm -rf build/ks-mix.out
rm -rf build/ks-mp3.out
rm -rf build/ks-mp3-album.out
rm -rf build/ks-mp4.out
rm -rf build/ks-mp4k.out
rm -rf build/ks-mp4s.out
rm -rf build/ks-mp4s-folder.out
rm -rf build/ks-av1s-folder.out
rm -rf build/ks-oga.out
rm -rf build/ks-oga-album.out
rm -rf build/ks-upa.out
rm -rf build/ks-upf.out
rm -rf build/ks-upr.out
rm -rf build/ks-upv.out
rm -rf build/ks-vob.out
rm -rf build/ks-av1.out
rm -rf build/ks-av1s.out
rm -rf build/ks-conf.out
rm -rf build/ks-avi-wrapper.out
rm -rf build/ks-mp4k-wrapper.out
rm -rf build/ks-mp4s-wrapper.out
rm -rf build/ks-mp4-wrapper.out
rm -rf build/ks-vob-wrapper.out
rm -rf build/ks-av1-wrapper.out
rm -rf build/ks-av1s-wrapper.out
rm -rf build/ks-avi
rm -rf build/ks-crop
rm -rf build/ks-mix
rm -rf build/ks-mp3
rm -rf build/ks-mp3-album
rm -rf build/ks-mp4
rm -rf build/ks-mp4k
rm -rf build/ks-mp4s
rm -rf build/ks-mp4s-folder
rm -rf build/ks-av1s-folder
rm -rf build/ks-oga
rm -rf build/ks-oga-album
rm -rf build/ks-upa
rm -rf build/ks-upf
rm -rf build/ks-upr
rm -rf build/ks-upv
rm -rf build/ks-vob
rm -rf build/ks-conf
rm -rf build/ks-avi-wrapper
rm -rf build/ks-mp4k-wrapper
rm -rf build/ks-mp4s-wrapper
rm -rf build/ks-mp4-wrapper
rm -rf build/ks-vob-wrapper
rm -rf build/ks-av1-wrapper
rm -rf build/ks-av1s-wrapper
mv build/ks-avi.x.c build/ks-avi.c
mv build/ks-crop.x.c build/ks-crop.c
mv build/ks-mix.x.c build/ks-mix.c
mv build/ks-mp3.x.c build/ks-mp3.c
mv build/ks-mp3-album.x.c build/ks-mp3-album.c
mv build/ks-mp4.x.c build/ks-mp4.c
mv build/ks-mp4k.x.c build/ks-mp4k.c
mv build/ks-mp4s.x.c build/ks-mp4s.c
mv build/ks-mp4s-folder.x.c build/ks-mp4s-folder.c
mv build/ks-av1s-folder.x.c build/ks-av1s-folder.c
mv build/ks-oga.x.c build/ks-oga.c
mv build/ks-oga-album.x.c build/ks-oga-album.c
mv build/ks-upa.x.c build/ks-upa.c
mv build/ks-upf.x.c build/ks-upf.c
mv build/ks-upr.x.c build/ks-upr.c
mv build/ks-upv.x.c build/ks-upv.c
mv build/ks-vob.x.c build/ks-vob.c
mv build/ks-av1.x.c build/ks-av1.c
mv build/ks-av1s.x.c build/ks-av1s.c
mv build/ks-conf.x.c build/ks-conf.c
mv build/ks-avi-wrapper.x.c build/ks-avi-wrapper.c
mv build/ks-mp4k-wrapper.x.c build/ks-mp4k-wrapper.c
mv build/ks-mp4s-wrapper.x.c build/ks-mp4s-wrapper.c
mv build/ks-mp4-wrapper.x.c build/ks-mp4-wrapper.c
mv build/ks-vob-wrapper.x.c build/ks-vob-wrapper.c
mv build/ks-av1-wrapper.x.c build/ks-av1-wrapper.c
mv build/ks-av1s-wrapper.x.c build/ks-av1s-wrapper.c
gcc -static build/ks-avi.c -o build/ks-avi
gcc -static build/ks-avi-wrapper.c -o build/ks-avi-wrapper
gcc -static build/ks-crop.c -o build/ks-crop
gcc -static build/ks-mix.c -o build/ks-mix
gcc -static build/ks-mp3-album.c -o build/ks-mp3-album
gcc -static build/ks-mp3.c -o build/ks-mp3
gcc -static build/ks-mp4.c -o build/ks-mp4
gcc -static build/ks-mp4k.c -o build/ks-mp4k
gcc -static build/ks-mp4k-wrapper.c -o build/ks-mp4k-wrapper
gcc -static build/ks-mp4s.c -o build/ks-mp4s
gcc -static build/ks-mp4s-folder.c -o build/ks-mp4s-folder
gcc -static build/ks-av1s-folder.c -o build/ks-av1s-folder
gcc -static build/ks-mp4s-wrapper.c -o build/ks-mp4s-wrapper
gcc -static build/ks-mp4-wrapper.c -o build/ks-mp4-wrapper
gcc -static build/ks-oga-album.c -o build/ks-oga-album
gcc -static build/ks-oga.c -o build/ks-oga
gcc -static build/ks-upa.c -o build/ks-upa
gcc -static build/ks-upf.c -o build/ks-upf
gcc -static build/ks-upr.c -o build/ks-upr
gcc -static build/ks-upv.c -o build/ks-upv
gcc -static build/ks-vob.c -o build/ks-vob
gcc -static build/ks-av1.c -o build/ks-av1
gcc -static build/ks-av1s.c -o build/ks-av1s
gcc -static build/ks-conf.c -o build/ks-conf
gcc -static build/ks-vob-wrapper.c -o build/ks-vob-wrapper
gcc -static build/ks-av1-wrapper.c -o build/ks-av1-wrapper
gcc -static build/ks-av1s-wrapper.c -o build/ks-av1s-wrapper
compile-install:
cp -rf build/ks-upv $(PREFIX)/bin/ks-upv
chmod +x $(PREFIX)/bin/ks-upv
cp -rf build/ks-upa $(PREFIX)/bin/ks-upa
chmod +x $(PREFIX)/bin/ks-upa
cp -rf build/ks-upf $(PREFIX)/bin/ks-upf
chmod +x $(PREFIX)/bin/ks-upf
cp -rf build/ks-upr $(PREFIX)/bin/ks-upr
chmod +x $(PREFIX)/bin/ks-upr
cp -rf build/ks-avi $(PREFIX)/bin/ks-avi
chmod +x $(PREFIX)/bin/ks-avi
cp -rf build/ks-mp4 $(PREFIX)/bin/ks-mp4
chmod +x $(PREFIX)/bin/ks-mp4
cp -rf build/ks-mp4k $(PREFIX)/bin/ks-mp4k
chmod +x $(PREFIX)/bin/ks-mp4k
cp -rf build/ks-mp4s $(PREFIX)/bin/ks-mp4s
chmod +x $(PREFIX)/bin/ks-mp4s
cp -rf build/ks-mp4s-folder $(PREFIX)/bin/ks-mp4s-folder
chmod +x $(PREFIX)/bin/ks-mp4s-folder
cp -rf build/ks-av1s-folder $(PREFIX)/bin/ks-av1s-folder
chmod +x $(PREFIX)/bin/ks-av1s-folder
cp -rf build/ks-vob $(PREFIX)/bin/ks-vob
chmod +x $(PREFIX)/bin/ks-vob
cp -rf build/ks-av1 $(PREFIX)/bin/ks-av1
chmod +x $(PREFIX)/bin/ks-av1
cp -rf build/ks-av1s $(PREFIX)/bin/ks-av1s
chmod +x $(PREFIX)/bin/ks-av1s
cp -rf build/ks-oga $(PREFIX)/bin/ks-oga
chmod +x $(PREFIX)/bin/ks-oga
cp -rf build/ks-mp3 $(PREFIX)/bin/ks-mp3
chmod +x $(PREFIX)/bin/ks-mp3
cp -rf build/ks-oga-album $(PREFIX)/bin/ks-oga-album
chmod +x $(PREFIX)/bin/ks-oga-album
cp -rf build/ks-mp3-album $(PREFIX)/bin/ks-mp3-album
chmod +x $(PREFIX)/bin/ks-mp3-album
cp -rf build/ks-mix $(PREFIX)/bin/ks-mix
chmod +x $(PREFIX)/bin/ks-mix
cp -rf build/ks-crop $(PREFIX)/bin/ks-crop
chmod +x $(PREFIX)/bin/ks-crop
cp -rf build/ks-conf $(PREFIX)/bin/ks-conf
chmod +x $(PREFIX)/bin/ks-conf
cp -rf build/ks-mp4-wrapper $(PREFIX)/bin/ks-mp4-wrapper
chmod +x $(PREFIX)/bin/ks-mp4-wrapper
cp -rf build/ks-mp4k-wrapper $(PREFIX)/bin/ks-mp4k-wrapper
chmod +x $(PREFIX)/bin/ks-mp4k-wrapper
cp -rf build/ks-mp4s-wrapper $(PREFIX)/bin/ks-mp4s-wrapper
chmod +x $(PREFIX)/bin/ks-mp4s-wrapper
cp -rf build/ks-avi-wrapper $(PREFIX)/bin/ks-avi-wrapper
chmod +x $(PREFIX)/bin/ks-avi-wrapper
cp -rf build/ks-vob-wrapper $(PREFIX)/bin/ks-vob-wrapper
chmod +x $(PREFIX)/bin/ks-vob-wrapper
cp -rf build/ks-av1-wrapper $(PREFIX)/bin/ks-av1-wrapper
chmod +x $(PREFIX)/bin/ks-av1-wrapper
cp -rf build/ks-av1s-wrapper $(PREFIX)/bin/ks-av1s-wrapper
chmod +x $(PREFIX)/bin/ks-av1s-wrapper
cp -rf cygwin/cygwin-path $(PREFIX)/bin/cygwin-path
chmod +x $(PREFIX)/bin/cygwin-path
compile-clean:
rm -rf build/ks-avi
rm -rf build/ks-crop
rm -rf build/ks-mix
rm -rf build/ks-mp3
rm -rf build/ks-mp3-album
rm -rf build/ks-mp4
rm -rf build/ks-mp4k
rm -rf build/ks-mp4s
rm -rf build/ks-mp4s-folder
rm -rf build/ks-av1s-folder
rm -rf build/ks-oga
rm -rf build/ks-oga-album
rm -rf build/ks-upa
rm -rf build/ks-upf
rm -rf build/ks-upr
rm -rf build/ks-upv
rm -rf build/ks-vob
rm -rf build/ks-av1
rm -rf build/ks-av1s
rm -rf build/ks-conf
rm -rf build/ks-avi-wrapper
rm -rf build/ks-mp4k-wrapper
rm -rf build/ks-mp4s-wrapper
rm -rf build/ks-mp4-wrapper
rm -rf build/ks-vob-wrapper
rm -rf build/ks-av1-wrapper
rm -rf build/ks-av1s-wrapper
uninstall:
rm -rf $(PREFIX)/bin/ks-upv
rm -rf $(PREFIX)/bin/ks-upa
rm -rf $(PREFIX)/bin/ks-upf
rm -rf $(PREFIX)/bin/ks-upr
rm -rf $(PREFIX)/bin/ks-avi
rm -rf $(PREFIX)/bin/ks-mp4
rm -rf $(PREFIX)/bin/ks-mp4k
rm -rf $(PREFIX)/bin/ks-mp4s
rm -rf $(PREFIX)/bin/ks-mp4s-folder
rm -rf $(PREFIX)/bin/ks-av1s-folder
rm -rf $(PREFIX)/bin/ks-vob
rm -rf $(PREFIX)/bin/ks-av1
rm -rf $(PREFIX)/bin/ks-av1s
rm -rf $(PREFIX)/bin/ks-oga
rm -rf $(PREFIX)/bin/ks-oga-album
rm -rf $(PREFIX)/bin/ks-mp3
rm -rf $(PREFIX)/bin/ks-mp3-album
rm -rf $(PREFIX)/bin/ks-mix
rm -rf $(PREFIX)/bin/ks-crop
rm -rf $(PREFIX)/bin/ks-conf
rm -rf $(PREFIX)/bin/ks-mp4-wrapper
rm -rf $(PREFIX)/bin/ks-mp4k-wrapper
rm -rf $(PREFIX)/bin/ks-mp4s-wrapper
rm -rf $(PREFIX)/bin/ks-avi-wrapper
rm -rf $(PREFIX)/bin/ks-vob-wrapper
rm -rf $(PREFIX)/bin/ks-av1-wrapper
rm -rf $(PREFIX)/bin/ks-av1s-wrapper
rm -rf $(PREFIX)/bin/cygwin-path

View File

@ -1,93 +0,0 @@
#################################################
# Installing ks-tools (Linux Homebrew) #
#################################################
PREFIX=/usr/local
install:
cp -rf src/ks-upv $(PREFIX)/bin/ks-upv
chmod +x $(PREFIX)/bin/ks-upv
cp -rf src/ks-upa $(PREFIX)/bin/ks-upa
chmod +x $(PREFIX)/bin/ks-upa
cp -rf src/ks-upf $(PREFIX)/bin/ks-upf
chmod +x $(PREFIX)/bin/ks-upf
cp -rf src/ks-upr $(PREFIX)/bin/ks-upr
chmod +x $(PREFIX)/bin/ks-upr
cp -rf src/ks-avi $(PREFIX)/bin/ks-avi
chmod +x $(PREFIX)/bin/ks-avi
cp -rf src/ks-mp4 $(PREFIX)/bin/ks-mp4
chmod +x $(PREFIX)/bin/ks-mp4
cp -rf src/ks-mp4k $(PREFIX)/bin/ks-mp4k
chmod +x $(PREFIX)/bin/ks-mp4k
cp -rf src/ks-mp4s $(PREFIX)/bin/ks-mp4s
chmod +x $(PREFIX)/bin/ks-mp4s
cp -rf src/ks-mp4s-folder $(PREFIX)/bin/ks-mp4s-folder
chmod +x $(PREFIX)/bin/ks-mp4s-folder
cp -rf src/ks-av1s-folder $(PREFIX)/bin/ks-av1s-folder
chmod +x $(PREFIX)/bin/ks-av1s-folder
cp -rf src/ks-vob $(PREFIX)/bin/ks-vob
chmod +x $(PREFIX)/bin/ks-vob
cp -rf src/ks-av1 $(PREFIX)/bin/ks-av1
chmod +x $(PREFIX)/bin/ks-av1
cp -rf src/ks-av1s $(PREFIX)/bin/ks-av1s
chmod +x $(PREFIX)/bin/ks-av1s
cp -rf src/ks-oga $(PREFIX)/bin/ks-oga
chmod +x $(PREFIX)/bin/ks-oga
cp -rf src/ks-mp3 $(PREFIX)/bin/ks-mp3
chmod +x $(PREFIX)/bin/ks-mp3
cp -rf src/ks-oga-album $(PREFIX)/bin/ks-oga-album
chmod +x $(PREFIX)/bin/ks-oga-album
cp -rf src/ks-mp3-album $(PREFIX)/bin/ks-mp3-album
chmod +x $(PREFIX)/bin/ks-mp3-album
cp -rf src/ks-mix $(PREFIX)/bin/ks-mix
chmod +x $(PREFIX)/bin/ks-mix
cp -rf src/ks-crop $(PREFIX)/bin/ks-crop
chmod +x $(PREFIX)/bin/ks-crop
cp -rf src/ks-conf $(PREFIX)/bin/ks-conf
chmod +x $(PREFIX)/bin/ks-conf
cp -rf wrapper/ks-mp4-wrapper $(PREFIX)/bin/ks-mp4-wrapper
chmod +x $(PREFIX)/bin/ks-mp4-wrapper
cp -rf wrapper/ks-mp4k-wrapper $(PREFIX)/bin/ks-mp4k-wrapper
chmod +x $(PREFIX)/bin/ks-mp4k-wrapper
cp -rf wrapper/ks-mp4s-wrapper $(PREFIX)/bin/ks-mp4s-wrapper
chmod +x $(PREFIX)/bin/ks-mp4s-wrapper
cp -rf wrapper/ks-avi-wrapper $(PREFIX)/bin/ks-avi-wrapper
chmod +x $(PREFIX)/bin/ks-avi-wrapper
cp -rf wrapper/ks-vob-wrapper $(PREFIX)/bin/ks-vob-wrapper
chmod +x $(PREFIX)/bin/ks-vob-wrapper
cp -rf wrapper/ks-av1-wrapper $(PREFIX)/bin/ks-av1-wrapper
chmod +x $(PREFIX)/bin/ks-av1-wrapper
cp -rf wrapper/ks-av1s-wrapper $(PREFIX)/bin/ks-av1s-wrapper
chmod +x $(PREFIX)/bin/ks-av1s-wrapper
cp -rf cygwin/cygwin-path $(PREFIX)/bin/cygwin-path
chmod +x $(PREFIX)/bin/cygwin-path
uninstall:
rm -rf $(PREFIX)/bin/ks-upv
rm -rf $(PREFIX)/bin/ks-upa
rm -rf $(PREFIX)/bin/ks-upf
rm -rf $(PREFIX)/bin/ks-upr
rm -rf $(PREFIX)/bin/ks-avi
rm -rf $(PREFIX)/bin/ks-mp4
rm -rf $(PREFIX)/bin/ks-mp4k
rm -rf $(PREFIX)/bin/ks-mp4s
rm -rf $(PREFIX)/bin/ks-mp4s-folder
rm -rf $(PREFIX)/bin/ks-av1s-folder
rm -rf $(PREFIX)/bin/ks-vob
rm -rf $(PREFIX)/bin/ks-av1
rm -rf $(PREFIX)/bin/ks-av1s
rm -rf $(PREFIX)/bin/ks-oga
rm -rf $(PREFIX)/bin/ks-oga-album
rm -rf $(PREFIX)/bin/ks-mp3
rm -rf $(PREFIX)/bin/ks-mp3-album
rm -rf $(PREFIX)/bin/ks-mix
rm -rf $(PREFIX)/bin/ks-crop
rm -rf $(PREFIX)/bin/ks-conf
rm -rf $(PREFIX)/bin/ks-mp4-wrapper
rm -rf $(PREFIX)/bin/ks-mp4k-wrapper
rm -rf $(PREFIX)/bin/ks-mp4s-wrapper
rm -rf $(PREFIX)/bin/ks-avi-wrapper
rm -rf $(PREFIX)/bin/ks-vob-wrapper
rm -rf $(PREFIX)/bin/ks-av1-wrapper
rm -rf $(PREFIX)/bin/ks-av1s-wrapper
rm -rf $(PREFIX)/bin/cygwin-path

View File

@ -1,93 +0,0 @@
#################################################
# Installing ks-tools (Linux Homebrew) #
#################################################
PREFIX=/opt/homebrew
install:
cp -rf src/ks-upv $(PREFIX)/bin/ks-upv
chmod +x $(PREFIX)/bin/ks-upv
cp -rf src/ks-upa $(PREFIX)/bin/ks-upa
chmod +x $(PREFIX)/bin/ks-upa
cp -rf src/ks-upf $(PREFIX)/bin/ks-upf
chmod +x $(PREFIX)/bin/ks-upf
cp -rf src/ks-upr $(PREFIX)/bin/ks-upr
chmod +x $(PREFIX)/bin/ks-upr
cp -rf src/ks-avi $(PREFIX)/bin/ks-avi
chmod +x $(PREFIX)/bin/ks-avi
cp -rf src/ks-mp4 $(PREFIX)/bin/ks-mp4
chmod +x $(PREFIX)/bin/ks-mp4
cp -rf src/ks-mp4k $(PREFIX)/bin/ks-mp4k
chmod +x $(PREFIX)/bin/ks-mp4k
cp -rf src/ks-mp4s $(PREFIX)/bin/ks-mp4s
chmod +x $(PREFIX)/bin/ks-mp4s
cp -rf src/ks-mp4s-folder $(PREFIX)/bin/ks-mp4s-folder
chmod +x $(PREFIX)/bin/ks-mp4s-folder
cp -rf src/ks-av1s-folder $(PREFIX)/bin/ks-av1s-folder
chmod +x $(PREFIX)/bin/ks-av1s-folder
cp -rf src/ks-vob $(PREFIX)/bin/ks-vob
chmod +x $(PREFIX)/bin/ks-vob
cp -rf src/ks-av1 $(PREFIX)/bin/ks-av1
chmod +x $(PREFIX)/bin/ks-av1
cp -rf src/ks-av1s $(PREFIX)/bin/ks-av1s
chmod +x $(PREFIX)/bin/ks-av1s
cp -rf src/ks-oga $(PREFIX)/bin/ks-oga
chmod +x $(PREFIX)/bin/ks-oga
cp -rf src/ks-mp3 $(PREFIX)/bin/ks-mp3
chmod +x $(PREFIX)/bin/ks-mp3
cp -rf src/ks-oga-album $(PREFIX)/bin/ks-oga-album
chmod +x $(PREFIX)/bin/ks-oga-album
cp -rf src/ks-mp3-album $(PREFIX)/bin/ks-mp3-album
chmod +x $(PREFIX)/bin/ks-mp3-album
cp -rf src/ks-mix $(PREFIX)/bin/ks-mix
chmod +x $(PREFIX)/bin/ks-mix
cp -rf src/ks-crop $(PREFIX)/bin/ks-crop
chmod +x $(PREFIX)/bin/ks-crop
cp -rf src/ks-conf $(PREFIX)/bin/ks-conf
chmod +x $(PREFIX)/bin/ks-conf
cp -rf wrapper/ks-mp4-wrapper $(PREFIX)/bin/ks-mp4-wrapper
chmod +x $(PREFIX)/bin/ks-mp4-wrapper
cp -rf wrapper/ks-mp4k-wrapper $(PREFIX)/bin/ks-mp4k-wrapper
chmod +x $(PREFIX)/bin/ks-mp4k-wrapper
cp -rf wrapper/ks-mp4s-wrapper $(PREFIX)/bin/ks-mp4s-wrapper
chmod +x $(PREFIX)/bin/ks-mp4s-wrapper
cp -rf wrapper/ks-avi-wrapper $(PREFIX)/bin/ks-avi-wrapper
chmod +x $(PREFIX)/bin/ks-avi-wrapper
cp -rf wrapper/ks-vob-wrapper $(PREFIX)/bin/ks-vob-wrapper
chmod +x $(PREFIX)/bin/ks-vob-wrapper
cp -rf wrapper/ks-av1-wrapper $(PREFIX)/bin/ks-av1-wrapper
chmod +x $(PREFIX)/bin/ks-av1-wrapper
cp -rf wrapper/ks-av1s-wrapper $(PREFIX)/bin/ks-av1s-wrapper
chmod +x $(PREFIX)/bin/ks-av1s-wrapper
cp -rf cygwin/cygwin-path $(PREFIX)/bin/cygwin-path
chmod +x $(PREFIX)/bin/cygwin-path
uninstall:
rm -rf $(PREFIX)/bin/ks-upv
rm -rf $(PREFIX)/bin/ks-upa
rm -rf $(PREFIX)/bin/ks-upf
rm -rf $(PREFIX)/bin/ks-upr
rm -rf $(PREFIX)/bin/ks-avi
rm -rf $(PREFIX)/bin/ks-mp4
rm -rf $(PREFIX)/bin/ks-mp4k
rm -rf $(PREFIX)/bin/ks-mp4s
rm -rf $(PREFIX)/bin/ks-mp4s-folder
rm -rf $(PREFIX)/bin/ks-av1s-folder
rm -rf $(PREFIX)/bin/ks-vob
rm -rf $(PREFIX)/bin/ks-av1
rm -rf $(PREFIX)/bin/ks-av1s
rm -rf $(PREFIX)/bin/ks-oga
rm -rf $(PREFIX)/bin/ks-oga-album
rm -rf $(PREFIX)/bin/ks-mp3
rm -rf $(PREFIX)/bin/ks-mp3-album
rm -rf $(PREFIX)/bin/ks-mix
rm -rf $(PREFIX)/bin/ks-crop
rm -rf $(PREFIX)/bin/ks-conf
rm -rf $(PREFIX)/bin/ks-mp4-wrapper
rm -rf $(PREFIX)/bin/ks-mp4k-wrapper
rm -rf $(PREFIX)/bin/ks-mp4s-wrapper
rm -rf $(PREFIX)/bin/ks-avi-wrapper
rm -rf $(PREFIX)/bin/ks-vob-wrapper
rm -rf $(PREFIX)/bin/ks-av1-wrapper
rm -rf $(PREFIX)/bin/ks-av1s-wrapper
rm -rf $(PREFIX)/bin/cygwin-path

106
README.md
View File

@ -4,45 +4,45 @@ ks-tools - Tools for upload, convert and crop/mix video/audio files.
### Documentation:
* `Tools for upload:`
* [ks-upv](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-upv.md) - Upload video file(s) to server with scp or rsync.
* [ks-upa](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-upa.md) - Upload audio file(s) to server with scp or rsync.
* [ks-upf](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-upf.md) - Upload common file(s) to server with scp or rsync.
* [ks-upr](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-upr.md) - Upload recursively file(s) to server with scp or rsync.
* [ks-upv](doc/ks-upv.md) - Upload video file(s) to server with scp or rsync.
* [ks-upa](doc/ks-upa.md) - Upload audio file(s) to server with scp or rsync.
* [ks-upf](doc/ks-upf.md) - Upload common file(s) to server with scp or rsync.
* [ks-upr](doc/ks-upr.md) - Upload recursively file(s) to server with scp or rsync.
* `Tools for convert video:`
* [ks-mp4](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-mp4.md) - Convert video file to compact and efficient MP4 (libx264 + aac).
* [ks-mp4k](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-mp4k.md) - Convert video file to compact and efficient MP4 (4K).
* [ks-mp4s](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-mp4s.md) - Convert video file to compact and efficient MP4 (Series).
* [ks-mp4s-folder](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-mp4s-folder.md) - Convert videos from folder to MP4 format (Series).
* [ks-avi](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-avi.md) - Convert video file to compact and efficient AVI (libxvid + mp3).
* [ks-vob](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-vob.md) - Convert video file to VOB (DVD splitet) format.
* [ks-av1](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-av1.md) - Convert video file to compact and efficient AV1 codec (libsvtav1 + libvorbis).
* [ks-av1s](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-av1s.md) - Convert video file to compact and efficient AV1 codec (Series).
* [ks-av1s-folder](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-av1s-folder.md) - Convert videos from folder to AV1 codec (Series).
* [ks-mp4](doc/ks-mp4.md) - Convert video file to compact and efficient MP4 (libx264 + aac).
* [ks-mp4k](doc/ks-mp4k.md) - Convert video file to compact and efficient MP4 (4K).
* [ks-mp4s](doc/ks-mp4s.md) - Convert video file to compact and efficient MP4 (Series).
* [ks-mp4s-folder](doc/ks-mp4s-folder.md) - Convert videos from folder to MP4 format (Series).
* [ks-avi](doc/ks-avi.md) - Convert video file to compact and efficient AVI (libxvid + mp3).
* [ks-vob](doc/ks-vob.md) - Convert video file to VOB (DVD splitet) format.
* [ks-av1](doc/ks-av1.md) - Convert video file to compact and efficient AV1 codec (libsvtav1 + libvorbis).
* [ks-av1s](doc/ks-av1s.md) - Convert video file to compact and efficient AV1 codec (Series).
* [ks-av1s-folder](doc/ks-av1s-folder.md) - Convert videos from folder to AV1 codec (Series).
* `Tools for convert audio:`
* [ks-oga](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-oga.md) - Convert video/audio file to OGA (OGG Audio) Format.
* [ks-oga-album](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-oga-album.md) - Convert folder album to OGA (OGG Audio) Format.
* [ks-mp3](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-mp3.md) - Convert video/audio file to MP3 Audio Format.
* [ks-mp3-album](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-mp3-album.md) - Convert folder album to MP3 Audio Format.
* [ks-oga](doc/ks-oga.md) - Convert video/audio file to OGA (OGG Audio) Format.
* [ks-oga-album](doc/ks-oga-album.md) - Convert folder album to OGA (OGG Audio) Format.
* [ks-mp3](doc/ks-mp3.md) - Convert video/audio file to MP3 Audio Format.
* [ks-mp3-album](doc/ks-mp3-album.md) - Convert folder album to MP3 Audio Format.
* `Tools for crop/mix video/audio:`
* [ks-mix](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-mix.md) - Extract video/audio and mix video/audio files.
* [ks-crop](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-crop.md) - Crop or change aspect ratio of a video.
* [ks-mix](doc/ks-mix.md) - Extract video/audio and mix video/audio files.
* [ks-crop](doc/ks-crop.md) - Crop or change aspect ratio of a video.
* `Wrappers/Configuration:`
* [ks-mp4-wrapper](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-mp4-wrapper.md) - Wrapper for ks-mp4 to create graphical interfaces.
* [ks-mp4k-wrapper](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-mp4k-wrapper.md) - Wrapper for ks-mp4k to create graphical interfaces.
* [ks-mp4s-wrapper](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-mp4s-wrapper.md) - Wrapper for ks-mp4s to create graphical interfaces.
* [ks-avi-wrapper](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-avi-wrapper.md) - Wrapper for ks-avi to create graphical interfaces.
* [ks-vob-wrapper](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-vob-wrapper.md) - Wrapper for ks-vob to create graphical interfaces.
* [ks-av1-wrapper](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-av1-wrapper.md) - Wrapper for ks-av1 to create graphical interfaces.
* [ks-av1s-wrapper](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-av1s-wrapper.md) - Wrapper for ks-av1s to create graphical interfaces.
* [ks-conf](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-conf.md) - Tool for create and modify all configuration files.
* [ks-mp4-wrapper](doc/ks-mp4-wrapper.md) - Wrapper for ks-mp4 to create graphical interfaces.
* [ks-mp4k-wrapper](doc/ks-mp4k-wrapper.md) - Wrapper for ks-mp4k to create graphical interfaces.
* [ks-mp4s-wrapper](doc/ks-mp4s-wrapper.md) - Wrapper for ks-mp4s to create graphical interfaces.
* [ks-avi-wrapper](doc/ks-avi-wrapper.md) - Wrapper for ks-avi to create graphical interfaces.
* [ks-vob-wrapper](doc/ks-vob-wrapper.md) - Wrapper for ks-vob to create graphical interfaces.
* [ks-av1-wrapper](doc/ks-vob-wrapper.md) - Wrapper for ks-av1 to create graphical interfaces.
* [ks-av1s-wrapper](doc/ks-vob-wrapper.md) - Wrapper for ks-av1s to create graphical interfaces.
* [ks-conf](doc/ks-conf.md) - Tool for create and modify all configuration files.
### Installation:
@ -50,58 +50,48 @@ ks-tools - Tools for upload, convert and crop/mix video/audio files.
* Install dependencies **(for Arch Linux)**:
sudo pacman -Syu git make expect rsync openssh sshpass grep coreutils binutils bc
sudo pacman -Syu git make expect rsync openssh sshpass grep coreutils binutils
* Install dependencies **(for Ubuntu/Debian)**:
sudo apt install git make expect rsync openssh-client openssh-server sshpass grep binutils bc
sudo apt install git make expect rsync openssh-client openssh-server sshpass grep binutils
* Install dependencies **(for Fedora)**:
sudo dnf install git make expect rsync openssh sshpass grep coreutils binutils bc
sudo dnf install git make expect rsync openssh sshpass grep coreutils binutils
* Install dependencies **(for Linux Homebrew)**:
brew install git make expect rsync openssh grep binutils ffmpeg bc
curl -L https://raw.githubusercontent.com/kadwanev/bigboybrew/master/Library/Formula/sshpass.rb > sshpass.rb
brew install sshpass.rb
* Install `ffmpeg` from repository or use the package [ffmpeg-7.0.2-linux-gnu-64bit-build.tar.bz2](https://q3aql.dev/ffmpeg-builds/ffmpeg-7.0.2-linux-gnu-64bit-build.tar.bz2):
* Install `ffmpeg` from repository or use the package [ffmpeg-6.0-linux-gnu-64bit-build2.tar.bz2](https://drive.proton.me/urls/87E226C29C#mcuvbx0p6DLy):
sudo tar jxvf ffmpeg-7.0.2-linux-gnu-64bit-build.tar.bz2 -C /
sudo tar jxvf ffmpeg-6.0-linux-gnu-64bit-build2.tar.bz2 -C /
* Install ks-tools cloning the repository:
git clone https://git.q3aql.dev/q3aql/ks-tools
git clone https://gitlab.com/q3aql/ks-tools
cd ks-tools
sudo make install
* For Linux Homebrew, install with:
make -f Makefile.linuxbrew
* **Windows ([Cygwin](https://www.cygwin.com/)):**
* Install dependencies:
lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
install apt-cyg /bin
apt-cyg install git make expect rsync openssh sshpass grep coreutils binutils bc
apt-cyg install git make expect rsync openssh sshpass grep coreutils binutils
* Download package [ffmpeg-7.0.2-cygwin-64bit-build.tar.gz](https://q3aql.dev/ffmpeg-builds/ffmpeg-7.0.2-cygwin-64bit-build.tar.gz) and install it:
* Download package [ffmpeg-6.0-cygwin-64bit-build2.tar.gz](https://drive.proton.me/urls/87E226C29C#mcuvbx0p6DLy) and install it:
tar zxvf ffmpeg-7.0-cygwin-64bit-build.tar.gz -C /
tar zxvf ffmpeg-6.0-cygwin-64bit-build2.tar.gz -C /
* If you prefer your own ffmpeg build, use this script for build it:
git clone https://git.q3aql.dev/q3aql/ks-tools
git clone https://gitlab.com/q3aql/ks-tools
cd ks-tools/cygwin
chmod +x ffmpeg-build-cygwin64.sh
./ffmpeg-build-cygwin64.sh
* Install ks-tools cloning the repository:
git clone https://git.q3aql.dev/q3aql/ks-tools
git clone https://gitlab.com/q3aql/ks-tools
cd ks-tools
make -f Makefile.Cygwin
@ -109,15 +99,15 @@ ks-tools - Tools for upload, convert and crop/mix video/audio files.
* Install dependencies:
sudo apt install git make expect rsync openssh-client openssh-server sshpass grep binutils bc
sudo apt install git make expect rsync openssh-client openssh-server sshpass grep binutils
* Install `ffmpeg` from the package [ffmpeg-7.0.2-linux-gnu-64bit-build.tar.bz2](https://q3aql.dev/ffmpeg-builds/ffmpeg-7.0.2-linux-gnu-64bit-build.tar.bz2) or from repository:
* Install `ffmpeg` from the package [ffmpeg-6.0-linux-gnu-64bit-build2.tar.bz2](https://drive.proton.me/urls/87E226C29C#mcuvbx0p6DLy) or from repository:
sudo apt install ffmpeg
* Install ks-tools cloning the repository:
git clone https://git.q3aql.dev/q3aql/ks-tools
git clone https://gitlab.com/q3aql/ks-tools
cd ks-tools
sudo make install
@ -125,21 +115,15 @@ ks-tools - Tools for upload, convert and crop/mix video/audio files.
* Install dependencies:
brew install git make expect rsync openssh grep binutils ffmpeg bc
brew install git make expect rsync openssh grep binutils ffmpeg
curl -L https://raw.githubusercontent.com/kadwanev/bigboybrew/master/Library/Formula/sshpass.rb > sshpass.rb
brew install sshpass.rb
* Install ks-tools cloning the repository **(for MacOS Intel)**:
* Install ks-tools cloning the repository:
git clone https://git.q3aql.dev/q3aql/ks-tools
git clone https://gitlab.com/q3aql/ks-tools
cd ks-tools
sudo make -f Makefile.macbrew
* Install ks-tools cloning the repository **(for MacOS ARM)**:
git clone https://git.q3aql.dev/q3aql/ks-tools
cd ks-tools
sudo make -f Makefile.macbrew.arm
sudo make install
### External links:

View File

@ -41,7 +41,6 @@ alias tr="/usr/bin/tr"
alias wc="/usr/bin/wc"
alias x264="/usr/bin/x264"
alias zenity="/usr/bin/zenity"
alias bc="/usr/bin/bc"
alias all-commands='ls /bin | grep ".exe" | cut -d "." -f 1'
# List of alias for drives:

View File

@ -48,5 +48,5 @@ $ ks-av1-wrapper --conv /tmp/video.mkv /tmp/output 0:0 0:1 1280x720 "My video" 2
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -35,7 +35,7 @@ $ ks-av1 </absolute/path/video.mkv> </path/prefix_name>
v_ext="webm"
````
* RECOMMENDED: You can use the [ks-conf](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-conf.md) tool to edit the configuration.
* RECOMMENDED: You can use the [ks-conf](https://gitlab.com/q3aql/ks-tools/blob/main/doc/ks-conf.md) tool to edit the configuration.
### Example of use:
@ -93,5 +93,5 @@ $ ks-av1 </absolute/path/video.mkv> </path/prefix_name>
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -51,5 +51,5 @@ $ ks-av1s-folder </path/folder> [subs]
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -48,5 +48,5 @@ $ ks-av1s-wrapper --conv /tmp/video.mkv /tmp/output 0:0 0:1 720x480 "My video" 2
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -35,7 +35,7 @@ $ ks-av1s </absolute/path/video.mkv> </path/prefix_name>
v_ext="webm"
````
* RECOMMENDED: You can use the [ks-conf](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-conf.md) tool to edit the configuration.
* RECOMMENDED: You can use the [ks-conf](https://gitlab.com/q3aql/ks-tools/blob/main/doc/ks-conf.md) tool to edit the configuration.
### Example of use:
@ -93,5 +93,5 @@ $ ks-av1s </absolute/path/video.mkv> </path/prefix_name>
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -48,5 +48,5 @@ $ ks-avi-wrapper --conv /tmp/video.mkv /tmp/output 0:0 0:1 720x404 "My video" 20
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -37,7 +37,7 @@ $ ks-avi </absolute/path/video.mkv> </path/prefix_name>
v_ext="avi"
````
* RECOMMENDED: You can use the [ks-conf](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-conf.md) tool to edit the configuration.
* RECOMMENDED: You can use the [ks-conf](https://gitlab.com/q3aql/ks-tools/blob/main/doc/ks-conf.md) tool to edit the configuration.
### Example of use:
@ -95,5 +95,5 @@ $ ks-avi </absolute/path/video.mkv> </path/prefix_name>
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -67,5 +67,5 @@ $ ks-conf
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -120,5 +120,5 @@ _Note: Output file name will be `Example-aspect.mkv`_
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -105,5 +105,5 @@ _Note: After executing the command, an assistant will ask us from what hour, min
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -26,7 +26,7 @@ $ ks-mp3-album </absolute/path/album>
default_lang_audio="spa"
````
* RECOMMENDED: You can use the [ks-conf](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-conf.md) tool to edit the configuration.
* RECOMMENDED: You can use the [ks-conf](https://gitlab.com/q3aql/ks-tools/blob/main/doc/ks-conf.md) tool to edit the configuration.
### Example of use:
@ -61,5 +61,5 @@ $ ks-mp3-album </absolute/path/album>
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -26,7 +26,7 @@ $ ks-mp3 </absolute/path/song.ogg> </path/prefix_name>
default_lang_audio="spa"
````
* RECOMMENDED: You can use the [ks-conf](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-conf.md) tool to edit the configuration.
* RECOMMENDED: You can use the [ks-conf](https://gitlab.com/q3aql/ks-tools/blob/main/doc/ks-conf.md) tool to edit the configuration.
### Example of use:
@ -69,5 +69,5 @@ $ ks-mp3 </absolute/path/song.ogg> </path/prefix_name>
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -48,5 +48,5 @@ $ ks-mp4-wrapper --conv /tmp/video.mkv /tmp/output 0:0 0:1 1280x720 "My video" 2
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -14,10 +14,10 @@ $ ks-mp4 </absolute/path/video.mkv> </path/prefix_name>
```shell
- Resolution: 1280x534
- Video codec: libx264
- Bitrate video: 2200k
- Preset: slow
- Bitrate video: 2400k
- Preset: medium
- Audio codec: aac (stereo)
- Bitrate audio: 192k
- Bitrate audio: 256k
- Default Audio: spa
- Default Subtitle: spa (forced)
- Container: mp4
@ -28,16 +28,16 @@ $ ks-mp4 </absolute/path/video.mkv> </path/prefix_name>
```shell
rel_size="1280x534"
vcodec="libx264"
b_vcodec="2200k"
v_preset="slow"
b_vcodec="2400k"
v_preset="medium"
acodec="aac"
b_acodec="192k"
b_acodec="256k"
default_lang_audio="spa"
default_lang_subt="spa"
v_ext="mp4"
````
* RECOMMENDED: You can use the [ks-conf](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-conf.md) tool to edit the configuration.
* RECOMMENDED: You can use the [ks-conf](https://gitlab.com/q3aql/ks-tools/blob/main/doc/ks-conf.md) tool to edit the configuration.
### Example of use:
@ -96,5 +96,5 @@ $ ks-mp4 </absolute/path/video.mkv> </path/prefix_name>
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -48,5 +48,5 @@ $ ks-mp4k-wrapper --conv /tmp/video.mkv /tmp/output 0:0 0:1 3840x2160 "My video"
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -37,7 +37,7 @@ $ ks-mp4k </absolute/path/video.mkv> </path/prefix_name>
v_ext="mp4"
````
* RECOMMENDED: You can use the [ks-conf](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-conf.md) tool to edit the configuration.
* RECOMMENDED: You can use the [ks-conf](https://gitlab.com/q3aql/ks-tools/blob/main/doc/ks-conf.md) tool to edit the configuration.
### Example of use:
@ -96,5 +96,5 @@ $ ks-mp4k </absolute/path/video.mkv> </path/prefix_name>
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -51,5 +51,5 @@ $ ks-mp4s-folder </path/folder> [subs]
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -48,5 +48,5 @@ $ ks-mp4s-wrapper --conv /tmp/video.mkv /tmp/output 0:0 0:1 720x480 "My video" 2
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -37,7 +37,7 @@ $ ks-mp4s </absolute/path/video.mkv> </path/prefix_name>
v_ext="mp4"
````
* RECOMMENDED: You can use the [ks-conf](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-conf.md) tool to edit the configuration.
* RECOMMENDED: You can use the [ks-conf](https://gitlab.com/q3aql/ks-tools/blob/main/doc/ks-conf.md) tool to edit the configuration.
### Example of use:
@ -96,5 +96,5 @@ $ ks-mp4s </absolute/path/video.mkv> </path/prefix_name>
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -26,7 +26,7 @@ $ ks-oga-album </absolute/path/album>
default_lang_audio="spa"`
````
* RECOMMENDED: You can use the [ks-conf](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-conf.md) tool to edit the configuration.
* RECOMMENDED: You can use the [ks-conf](https://gitlab.com/q3aql/ks-tools/blob/main/doc/ks-conf.md) tool to edit the configuration.
### Example of use:
@ -61,5 +61,5 @@ $ ks-oga-album </absolute/path/album>
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -26,7 +26,7 @@ $ ks-oga </absolute/path/song.mp3> </path/prefix_name>
default_lang_audio="spa"
````
* RECOMMENDED: You can use the [ks-conf](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/doc/ks-conf.md) tool to edit the configuration.
* RECOMMENDED: You can use the [ks-conf](https://gitlab.com/q3aql/ks-tools/blob/main/doc/ks-conf.md) tool to edit the configuration.
### Example of use:
@ -69,5 +69,5 @@ $ ks-oga </absolute/path/song.mp3> </path/prefix_name>
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -27,7 +27,7 @@ $ ks-upa -h - Show help
```shell
* Enter the server user: anonymous
* Enter the server password (type 'pem' for use pem certificate): *******
* Enter the server URL (or IP): mypersonaldomain.es
* Enter the server URL: mypersonaldomain.es
* Enter the path on the server: /home/anonymous
* Enter the local path to scan: /home/local/videos
* Setting 'scp' as the default tool
@ -108,5 +108,5 @@ $ ks-upa -h - Show help
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -27,7 +27,7 @@ $ ks-upf -h - Show help
```shell
* Enter the server user: anonymous
* Enter the server password (type 'pem' for use pem certificate): *******
* Enter the server URL (or IP): mypersonaldomain.es
* Enter the server URL: mypersonaldomain.es
* Enter the path on the server: /home/anonymous
* Enter the local path to scan: /home/local/videos
* Setting 'scp' as the default tool
@ -108,5 +108,5 @@ $ ks-upf -h - Show help
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -27,7 +27,7 @@ $ ks-upr -h - Show help
```shell
* Enter the server user: anonymous
* Enter the server password (type 'pem' for use pem certificate): *******
* Enter the server URL (or IP): mypersonaldomain.es
* Enter the server URL: mypersonaldomain.es
* Enter the path on the server: /home/anonymous
* Enter the local path to scan: /home/local/videos
* Setting 'scp' as the default tool
@ -108,5 +108,5 @@ $ ks-upr -h - Show help
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -27,7 +27,7 @@ $ ks-upv -h - Show help
```shell
* Enter the server user: anonymous
* Enter the server password (type 'pem' for use pem certificate): *******
* Enter the server URL (or IP): mypersonaldomain.es
* Enter the server URL: mypersonaldomain.es
* Enter the path on the server: /home/anonymous
* Enter the local path to scan: /home/local/videos
* Setting 'scp' as the default tool
@ -108,5 +108,5 @@ $ ks-upv -h - Show help
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -43,5 +43,5 @@ $ ks-vob-wrapper --conv /tmp/video.mkv /tmp/output 0:0 0:1 720x576 patch
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -71,5 +71,5 @@ $ ks-vob </absolute/path/video.mkv> </path/prefix_name>
### Back to README.md
* [Go back](https://git.q3aql.dev/q3aql/ks-tools/src/branch/main/README.md)
* [Go back](../README.md)

View File

@ -1,13 +1,13 @@
#!/bin/bash
##################################################
# ks-av1 (ks-tools) - Convert video to AV1 codec #
# Date: 04-01-2025 #
# Author: q3aql #
# Contact: q3aql@duck.com #
##################################################
VERSION="8.5"
M_DATE="040125"
############################################################
# ks-av1 (ks-tools) - Convert video to AV1 (Codec) format #
# Date: 09-03-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
############################################################
VERSION="8.4"
M_DATE="090323"
# Detect version ffmpeg for old releases
ffmpeg_version=$(ffmpeg -version 2>&1 | grep version | head -1 | cut -d " " -f 3 | cut -d "." -f 1)
@ -18,7 +18,7 @@ unset IFS
if [ -z "${ffmpeg_version}" ] ; then
video_sync="vsync"
else
if [ ${ffmpeg_version} -lt 5 ] 2> /dev/null ; then
if [ ${ffmpeg_version} -lt 5 ] ; then
video_sync="vsync"
else
video_sync="fps_mode"
@ -48,39 +48,6 @@ if [ -f "/usr/bin/cygwin-alias.sh" ] ; then
source "/usr/bin/cygwin-alias.sh"
fi
# Setting the correct resolution for the video file
# Sintaxis: set_resolution <resolution> <file>
function set_resolution() {
check_bc_app_directories="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
set_rel="${1}"
input_video_file="${2}"
bc_found="1"
for file in ${check_bc_app_directories} ; do
if [ -f ${file}/bc ] ; then
bc_found=0
fi
done
if [ ${bc_found} -eq 0 ] ; then
file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' 2> /dev/null | head -1)
if [ -z "${file_rel}" ] ; then
echo ${set_rel}
else
file_rel_width=$(echo ${file_rel} | cut -d "x" -f 1)
file_rel_height=$(echo ${file_rel} | cut -d "x" -f 2)
set_rel_width=$(echo ${set_rel} | cut -d "x" -f 1)
aspect_rel=$(echo ${file_rel_width} / ${file_rel_height} | bc -l)
new_rel_height=$(echo ${set_rel_width} / ${aspect_rel} | bc)
even_number=$(echo ${new_rel_height} % 2 | bc)
if [ ${even_number} -ne 0 ] ; then
new_rel_height=$(expr ${new_rel_height} + 1)
fi
echo ${set_rel_width}x${new_rel_height}
fi
else
echo ${set_rel}
fi
}
# Create inicial config file
mkdir -p ${configFolder}
if [ -f ${configFile} ] ; then
@ -117,7 +84,6 @@ if [ -f ${configFile} ] ; then
echo "v_ext=${v_ext}" >> ${configFile}
fi
source ${configFile}
rel_size=$(set_resolution ${rel_size} "${1}")
else
echo "#!/bin/bash" > ${configFile}
echo "" >> ${configFile}
@ -130,12 +96,11 @@ else
echo "default_lang_subt=${default_lang_subt}" >> ${configFile}
echo "v_ext=${v_ext}" >> ${configFile}
source ${configFile}
rel_size=$(set_resolution ${rel_size} "${1}")
fi
# Check if ffmpeg is installed
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
dependencies="ffmpeg grep sed grep cut head tail tr cat bc"
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
dependencies="ffmpeg grep sed grep cut head tail tr cat"
dependencies_found=""
dependencies_not_found=""
for checkPath in ${path_check} ; do
@ -214,7 +179,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp &> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
echo ${DisplayName}
@ -225,7 +190,7 @@ if [ -z "${1}" ] ; then
echo ""
echo "* ks-av1 (ks-tools) v${VERSION} (${M_DATE})"
echo ""
echo "- Convert video file(s) to compact and efficient AV1 codec"
echo "- Convert video file(s) to compact and efficient AV1 Codec"
echo ""
echo "+ Config: ${configFile}"
echo ""
@ -301,7 +266,7 @@ if [ -z "${2}" ] ; then
echo ""
echo "* ks-av1 (ks-tools) v${VERSION} (${M_DATE})"
echo ""
echo "- Convert video file(s) to compact and efficient AV1 codec"
echo "- Convert video file(s) to compact and efficient AV1 Codec"
echo ""
echo "+ Config:"
echo ""
@ -491,7 +456,7 @@ else
echo " ${p_ffmpeg} \"${1}\" -map ${subtitle_track} \"${2}.srt\""
echo ""
if [ "${patch_thread}" == "y" ] ; then
echo " # Convert the file '${1}' to AV1 codec"
echo " # Convert the file '${1}' to AV1 Codec"
if [ ! -z "${hevc_hdr}" ] ; then
p_conversion="-s ${rel_size} -c:v ${vcodec} -vf zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,subtitles=\"${2}.srt\"${profile_codec}-pix_fmt yuv420p -b:v ${b_vcodec} -c:a ${acodec} -b:a ${b_acodec}"
echo " ${p_ffmpeg} \"${1}\" ${f_conversion} -map ${video_track} -map ${audio_track} ${p_conversion} ${stereo_params} -metadata title=\"${name_title} (${year_file})\" -metadata date=\"${year_file}\" -metadata genre=\"${genre_file}\" -metadata:s:v:0 title=\"${name_title} (${year_file})\" -metadata:s:a:0 title=\"${acodec} Stereo Audio (${b_acodec})\" ${p_ffmpeg_patched} \"${2}.${v_ext}\""
@ -499,7 +464,7 @@ else
echo " ${p_ffmpeg} \"${1}\" ${f_conversion} -map ${video_track} -map ${audio_track} -vf subtitles=\"${2}.srt\" ${p_conversion} ${stereo_params} -metadata title=\"${name_title} (${year_file})\" -metadata date=\"${year_file}\" -metadata genre=\"${genre_file}\" -metadata:s:v:0 title=\"${name_title} (${year_file})\" -metadata:s:a:0 title=\"${acodec} Stereo Audio (${b_acodec})\" ${p_ffmpeg_patched} \"${2}.${v_ext}\""
fi
else
echo " # Convert the file '${1}' to AV1 codec"
echo " # Convert the file '${1}' to AV1 Codec"
if [ ! -z "${hevc_hdr}" ] ; then
p_conversion="-s ${rel_size} -c:v ${vcodec} -vf zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,subtitles=\"${2}.srt\"${profile_codec}-pix_fmt yuv420p -b:v ${b_vcodec} -c:a ${acodec} -b:a ${b_acodec}"
echo " ${p_ffmpeg} \"${1}\" ${f_conversion} -map ${video_track} -map ${audio_track} ${p_conversion} ${stereo_params} -metadata title=\"${name_title} (${year_file})\" -metadata date=\"${year_file}\" -metadata genre=\"${genre_file}\" -metadata:s:v:0 title=\"${name_title} (${year_file})\" -metadata:s:a:0 title=\"${acodec} Stereo Audio (${b_acodec})\" \"${2}.${v_ext}\""
@ -509,10 +474,10 @@ else
fi
else
if [ "${patch_thread}" == "y" ] ; then
echo " # Convert the file '${1}' to AV1 codec"
echo " # Convert the file '${1}' to AV1 Codec"
echo " ${p_ffmpeg} \"${1}\" ${f_conversion} -map ${video_track} -map ${audio_track} ${p_conversion} ${stereo_params} -metadata title=\"${name_title} (${year_file})\" -metadata date=\"${year_file}\" -metadata genre=\"${genre_file}\" -metadata:s:v:0 title=\"${name_title} (${year_file})\" -metadata:s:a:0 title=\"${acodec} Stereo Audio (${b_acodec})\" ${p_ffmpeg_patched} \"${2}.${v_ext}\""
else
echo " # Convert the file '${1}' to AV1 codec"
echo " # Convert the file '${1}' to AV1 Codec"
echo " ${p_ffmpeg} \"${1}\" ${f_conversion} -map ${video_track} -map ${audio_track} ${p_conversion} ${stereo_params} -metadata title=\"${name_title} (${year_file})\" -metadata date=\"${year_file}\" -metadata genre=\"${genre_file}\" -metadata:s:v:0 title=\"${name_title} (${year_file})\" -metadata:s:a:0 title=\"${acodec} Stereo Audio (${b_acodec})\" \"${2}.${v_ext}\""
fi
fi

View File

@ -1,13 +1,13 @@
#!/bin/bash
############################################################
# ks-av1s (ks-tools) - Convert video to AV1 codec (Series) #
# Date: 04-01-2025 #
# Author: q3aql #
# Contact: q3aql@duck.com #
############################################################
VERSION="8.5"
M_DATE="040125"
###################################################################
# ks-av1s (ks-tools) - Convert video to AV1 Codec format (Series) #
# Date: 10-03-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
###################################################################
VERSION="8.4"
M_DATE="100323"
# Detect version ffmpeg for old releases
ffmpeg_version=$(ffmpeg -version 2>&1 | grep version | head -1 | cut -d " " -f 3 | cut -d "." -f 1)
@ -18,7 +18,7 @@ unset IFS
if [ -z "${ffmpeg_version}" ] ; then
video_sync="vsync"
else
if [ ${ffmpeg_version} -lt 5 ] 2> /dev/null ; then
if [ ${ffmpeg_version} -lt 5 ] ; then
video_sync="vsync"
else
video_sync="fps_mode"
@ -48,39 +48,6 @@ if [ -f "/usr/bin/cygwin-alias.sh" ] ; then
source "/usr/bin/cygwin-alias.sh"
fi
# Setting the correct resolution for the video file
# Sintaxis: set_resolution <resolution> <file>
function set_resolution() {
check_bc_app_directories="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
set_rel="${1}"
input_video_file="${2}"
bc_found="1"
for file in ${check_bc_app_directories} ; do
if [ -f ${file}/bc ] ; then
bc_found=0
fi
done
if [ ${bc_found} -eq 0 ] ; then
file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' 2> /dev/null | head -1)
if [ -z "${file_rel}" ] ; then
echo ${set_rel}
else
file_rel_width=$(echo ${file_rel} | cut -d "x" -f 1)
file_rel_height=$(echo ${file_rel} | cut -d "x" -f 2)
set_rel_width=$(echo ${set_rel} | cut -d "x" -f 1)
aspect_rel=$(echo ${file_rel_width} / ${file_rel_height} | bc -l)
new_rel_height=$(echo ${set_rel_width} / ${aspect_rel} | bc)
even_number=$(echo ${new_rel_height} % 2 | bc)
if [ ${even_number} -ne 0 ] ; then
new_rel_height=$(expr ${new_rel_height} + 1)
fi
echo ${set_rel_width}x${new_rel_height}
fi
else
echo ${set_rel}
fi
}
# Create inicial config file
mkdir -p ${configFolder}
if [ -f ${configFile} ] ; then
@ -117,7 +84,6 @@ if [ -f ${configFile} ] ; then
echo "v_ext=${v_ext}" >> ${configFile}
fi
source ${configFile}
rel_size=$(set_resolution ${rel_size} "${1}")
else
echo "#!/bin/bash" > ${configFile}
echo "" >> ${configFile}
@ -130,12 +96,11 @@ else
echo "default_lang_subt=${default_lang_subt}" >> ${configFile}
echo "v_ext=${v_ext}" >> ${configFile}
source ${configFile}
rel_size=$(set_resolution ${rel_size} "${1}")
fi
# Check if ffmpeg is installed
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
dependencies="ffmpeg grep sed grep cut head tail tr cat bc"
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
dependencies="ffmpeg grep sed grep cut head tail tr cat"
dependencies_found=""
dependencies_not_found=""
for checkPath in ${path_check} ; do
@ -214,7 +179,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
echo ${DisplayName}
@ -225,7 +190,7 @@ if [ -z "${1}" ] ; then
echo ""
echo "* ks-av1s (ks-tools) v${VERSION} (${M_DATE})"
echo ""
echo "- Convert video file(s) to compact and efficient AV1 codec (Series)"
echo "- Convert video file(s) to compact and efficient AV1 Codec (Series)"
echo ""
echo "+ Config: ${configFile}"
echo ""
@ -301,7 +266,7 @@ if [ -z "${2}" ] ; then
echo ""
echo "* ks-av1s (ks-tools) v${VERSION} (${M_DATE})"
echo ""
echo "- Convert video file(s) to compact and efficient AV1 codec (Series)"
echo "- Convert video file(s) to compact and efficient AV1 Codec (Series)"
echo ""
echo "+ Config:"
echo ""
@ -491,7 +456,7 @@ else
echo " ${p_ffmpeg} \"${1}\" -map ${subtitle_track} \"${2}.srt\""
echo ""
if [ "${patch_thread}" == "y" ] ; then
echo " # Convert the file '${1}' to AV1 codec"
echo " # Convert the file '${1}' to AV1 Codec"
if [ ! -z "${hevc_hdr}" ] ; then
p_conversion="-s ${rel_size} -c:v ${vcodec} -vf zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,subtitles=\"${2}.srt\"${profile_codec}-pix_fmt yuv420p -b:v ${b_vcodec} -c:a ${acodec} -b:a ${b_acodec}"
echo " ${p_ffmpeg} \"${1}\" ${f_conversion} -map ${video_track} -map ${audio_track} ${p_conversion} ${stereo_params} -metadata title=\"${name_title}\" -metadata date=\"${year_file}\" -metadata genre=\"${genre_file}\" -metadata:s:v:0 title=\"${name_title}\" -metadata:s:a:0 title=\"${acodec} Stereo Audio (${b_acodec})\" ${p_ffmpeg_patched} \"${2}.${v_ext}\""
@ -499,7 +464,7 @@ else
echo " ${p_ffmpeg} \"${1}\" ${f_conversion} -map ${video_track} -map ${audio_track} -vf subtitles=\"${2}.srt\" ${p_conversion} ${stereo_params} -metadata title=\"${name_title}\" -metadata date=\"${year_file}\" -metadata genre=\"${genre_file}\" -metadata:s:v:0 title=\"${name_title}\" -metadata:s:a:0 title=\"${acodec} Stereo Audio (${b_acodec})\" ${p_ffmpeg_patched} \"${2}.${v_ext}\""
fi
else
echo " # Convert the file '${1}' to AV1 codec"
echo " # Convert the file '${1}' to AV1 Codec"
if [ ! -z "${hevc_hdr}" ] ; then
p_conversion="-s ${rel_size} -c:v ${vcodec} -vf zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,subtitles=\"${2}.srt\"${profile_codec}-pix_fmt yuv420p -b:v ${b_vcodec} -c:a ${acodec} -b:a ${b_acodec}"
echo " ${p_ffmpeg} \"${1}\" ${f_conversion} -map ${video_track} -map ${audio_track} ${p_conversion} ${stereo_params} -metadata title=\"${name_title}\" -metadata date=\"${year_file}\" -metadata genre=\"${genre_file}\" -metadata:s:v:0 title=\"${name_title}\" -metadata:s:a:0 title=\"${acodec} Stereo Audio (${b_acodec})\" \"${2}.${v_ext}\""
@ -509,10 +474,10 @@ else
fi
else
if [ "${patch_thread}" == "y" ] ; then
echo " # Convert the file '${1}' to AV1 codec"
echo " # Convert the file '${1}' to AV1 Codec"
echo " ${p_ffmpeg} \"${1}\" ${f_conversion} -map ${video_track} -map ${audio_track} ${p_conversion} ${stereo_params} -metadata title=\"${name_title}\" -metadata date=\"${year_file}\" -metadata genre=\"${genre_file}\" -metadata:s:v:0 title=\"${name_title}\" -metadata:s:a:0 title=\"${acodec} Stereo Audio (${b_acodec})\" ${p_ffmpeg_patched} \"${2}.${v_ext}\""
else
echo " # Convert the file '${1}' to AV1 codec"
echo " # Convert the file '${1}' to AV1 Codec"
echo " ${p_ffmpeg} \"${1}\" ${f_conversion} -map ${video_track} -map ${audio_track} ${p_conversion} ${stereo_params} -metadata title=\"${name_title}\" -metadata date=\"${year_file}\" -metadata genre=\"${genre_file}\" -metadata:s:v:0 title=\"${name_title}\" -metadata:s:a:0 title=\"${acodec} Stereo Audio (${b_acodec})\" \"${2}.${v_ext}\""
fi
fi

View File

@ -2,12 +2,12 @@
##################################################################################
# ks-av1s-folder (ks-tools) - Convert videos from folder to AV1 (Codec) (Series) #
# Date: 02-11-2023 #
# Date: 10-03-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
##################################################################################
VERSION="8.5"
M_DATE="021123"
VERSION="8.4"
M_DATE="100323"
# Variables
tempFile="/tmp/ks-av1s-folder.txt"
@ -21,7 +21,7 @@ if [ -f "/usr/bin/cygwin-alias.sh" ] ; then
fi
# Check if ffmpeg is installed
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
dependencies="ffmpeg grep find grep cut head tail cat"
dependencies_found=""
dependencies_not_found=""
@ -58,7 +58,7 @@ if [ -z "${1}" ] ; then
echo ""
echo "* ks-av1s-folder (ks-tools) v${VERSION} (${M_DATE})"
echo ""
echo "- Convert videos from folder to AV1 codec (Series)"
echo "- Convert videos from folder to MP4 format (Series)"
echo ""
echo "+ Syntax: "
echo ""
@ -93,7 +93,7 @@ clear
echo ""
echo "* ks-av1s-folder (ks-tools) v${VERSION} (${M_DATE})"
echo ""
echo "- Convert videos from folder to AV1 codec (Series)"
echo "- Convert videos from folder to MP4 format (Series)"
echo ""
echo -n "* Scanning ${1} "
echo ""
@ -104,9 +104,7 @@ for format in ${formatFiles} ; do
echo "null" > /dev/null
else
echo "+ Video file(s) in .${format} found!"
cd "${1}" && ls -1 *.${format} &> /tmp/tempFile.txt
cat /tmp/tempFile.txt >> ${tempFile}
rm -rf /tmp/tempFile.txt 2> /dev/null
cd "${1}" && ls -1 *.${format} &>> ${tempFile}
fail=0
fi
done
@ -115,7 +113,7 @@ done
num_files=$(cat ${tempFile} | wc -l)
if [ ${num_files} -eq 0 ] ; then
echo ""
echo "+ No video file(s) found in folder '${1}'"
echo "+ No video file(s) found in folder '${1}"
echo ""
exit
else

View File

@ -2,12 +2,12 @@
###############################################################
# ks-avi (ks-tools) - Convert video to AVI format #
# Date: 04-01-2025 #
# Date: 19-02-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
###############################################################
VERSION="8.5"
M_DATE="040125"
VERSION="8.4"
M_DATE="190223"
# Detect version ffmpeg for old releases
ffmpeg_version=$(ffmpeg -version 2>&1 | grep version | head -1 | cut -d " " -f 3 | cut -d "." -f 1)
@ -18,7 +18,7 @@ unset IFS
if [ -z "${ffmpeg_version}" ] ; then
video_sync="vsync"
else
if [ ${ffmpeg_version} -lt 5 ] 2> /dev/null ; then
if [ ${ffmpeg_version} -lt 5 ] ; then
video_sync="vsync"
else
video_sync="fps_mode"
@ -51,39 +51,6 @@ if [ -f "/usr/bin/cygwin-alias.sh" ] ; then
source "/usr/bin/cygwin-alias.sh"
fi
# Setting the correct resolution for the video file
# Sintaxis: set_resolution <resolution> <file>
function set_resolution() {
check_bc_app_directories="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
set_rel="${1}"
input_video_file="${2}"
bc_found="1"
for file in ${check_bc_app_directories} ; do
if [ -f ${file}/bc ] ; then
bc_found=0
fi
done
if [ ${bc_found} -eq 0 ] ; then
file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' 2> /dev/null | head -1)
if [ -z "${file_rel}" ] ; then
echo ${set_rel}
else
file_rel_width=$(echo ${file_rel} | cut -d "x" -f 1)
file_rel_height=$(echo ${file_rel} | cut -d "x" -f 2)
set_rel_width=$(echo ${set_rel} | cut -d "x" -f 1)
aspect_rel=$(echo ${file_rel_width} / ${file_rel_height} | bc -l)
new_rel_height=$(echo ${set_rel_width} / ${aspect_rel} | bc)
even_number=$(echo ${new_rel_height} % 2 | bc)
if [ ${even_number} -ne 0 ] ; then
new_rel_height=$(expr ${new_rel_height} + 1)
fi
echo ${set_rel_width}x${new_rel_height}
fi
else
echo ${set_rel}
fi
}
# Create inicial config file
mkdir -p ${configFolder}
if [ -f ${configFile} ] ; then
@ -124,7 +91,6 @@ if [ -f ${configFile} ] ; then
echo "v_ext=${v_ext}" >> ${configFile}
fi
source ${configFile}
rel_size=$(set_resolution ${rel_size} "${1}")
else
echo "#!/bin/bash" > ${configFile}
echo "" >> ${configFile}
@ -138,12 +104,11 @@ else
echo "default_lang_subt=${default_lang_subt}" >> ${configFile}
echo "v_ext=${v_ext}" >> ${configFile}
source ${configFile}
rel_size=$(set_resolution ${rel_size} "${1}")
fi
# Check if ffmpeg is installed
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
dependencies="ffmpeg grep sed grep cut head tail tr cat bc"
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
dependencies="ffmpeg grep sed grep cut head tail tr cat"
dependencies_found=""
dependencies_not_found=""
for checkPath in ${path_check} ; do
@ -222,7 +187,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
echo ${DisplayName}

View File

@ -2,12 +2,12 @@
#######################################################################
# ks-conf (ks-tools) - Tool for create and modify configuration files #
# Date: 02-11-2023 #
# Date: 10-03-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
#######################################################################
VERSION="8.5"
M_DATE="021123"
VERSION="8.4"
M_DATE="100323"
# Check cygwin alias (for Windows)
if [ -f "/usr/bin/cygwin-alias.sh" ] ; then
@ -21,10 +21,10 @@ function check_create_conf_ks_mp4() {
configFile=${configFolder}/ks-mp4
rel_size="1280x534"
vcodec="libx264"
b_vcodec="2200k"
v_preset="slow"
b_vcodec="2400k"
v_preset="medium"
acodec="aac"
b_acodec="192k"
b_acodec="256k"
default_lang_audio="spa"
default_lang_subt="spa"
v_ext="mp4"
@ -598,7 +598,7 @@ edit_video_config() {
elif [ "${option}" == "b" ] ; then
# Set bitrate for video
echo ""
echo "* Recommended: 850k / 950k / 2000k / 2200k / 3000k / 6000k / 10000k"
echo "* Recommended: 850k / 950k / 2000k / 2400k / 3000k / 6000k / 10000k"
echo ""
echo -n "* [Current: ${b_vcodec}] Type bitrate for video: " ; read videobitrate
if [ -z ${videobitrate} ] ; then
@ -754,8 +754,6 @@ edit_video_config() {
check_create_conf_ks_mp4s
check_create_conf_ks_mp4k
check_create_conf_ks_avi
check_create_conf_ks_av1
check_create_conf_ks_av1s
elif [ "${option}" == "q" ] ; then
editing=1
else

View File

@ -2,12 +2,12 @@
###############################################################
# ks-crop (ks-tools) - Crop or change aspect ratio of a video #
# Date: 04-01-2025 #
# Date: 11-03-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
###############################################################
VERSION="8.5"
M_DATE="040125"
VERSION="8.4"
M_DATE="110323"
# Detect version ffmpeg for old releases
ffmpeg_version=$(ffmpeg -version 2>&1 | grep version | head -1 | cut -d " " -f 3 | cut -d "." -f 1)
@ -18,7 +18,7 @@ unset IFS
if [ -z "${ffmpeg_version}" ] ; then
video_sync="vsync"
else
if [ ${ffmpeg_version} -lt 5 ] 2> /dev/null ; then
if [ ${ffmpeg_version} -lt 5 ] ; then
video_sync="vsync"
else
video_sync="fps_mode"
@ -54,7 +54,7 @@ if [ -f "/usr/bin/cygwin-alias.sh" ] ; then
fi
# Check if ffmpeg is installed
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
dependencies="ffmpeg grep sed grep cut head tail tr cat"
dependencies_found=""
dependencies_not_found=""
@ -114,7 +114,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
echo ${DisplayName}

View File

@ -2,12 +2,12 @@
#####################################################################
# ks-mix (ks-tools) - Extract video/audio and mix video/audio files #
# Date: 04-01-2025 #
# Date: 11-03-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
#####################################################################
VERSION="8.5"
M_DATE="040125"
VERSION="8.4"
M_DATE="110323"
# Detect version ffmpeg for old releases
ffmpeg_version=$(ffmpeg -version 2>&1 | grep version | head -1 | cut -d " " -f 3 | cut -d "." -f 1)
@ -18,7 +18,7 @@ unset IFS
if [ -z "${ffmpeg_version}" ] ; then
video_sync="vsync"
else
if [ ${ffmpeg_version} -lt 5 ] 2> /dev/null ; then
if [ ${ffmpeg_version} -lt 5 ] ; then
video_sync="vsync"
else
video_sync="fps_mode"
@ -43,7 +43,7 @@ if [ -f "/usr/bin/cygwin-alias.sh" ] ; then
fi
# Check if ffmpeg is installed
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
dependencies="ffmpeg grep sed cut head tail tr"
dependencies_found=""
dependencies_not_found=""

View File

@ -2,12 +2,12 @@
#########################################################################
# ks-mp3 (ks-tools) - Convert video/audio file(s) to MP3 (Audio) Format #
# Date: 02-11-2023 #
# Date: 13-02-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
#########################################################################
VERSION="8.5"
M_DATE="021123"
VERSION="8.4"
M_DATE="130223"
# Global parameters
dirTemp="/tmp"
@ -59,7 +59,7 @@ else
fi
# Check if ffmpeg is installed
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
dependencies="ffmpeg grep sed grep cut head tail tr cat"
dependencies_found=""
dependencies_not_found=""
@ -148,7 +148,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
cutDisplayName=$(echo ${DisplayName} | cut -c1)

View File

@ -2,12 +2,12 @@
######################################################################
# ks-mp3-album (ks-tools) - Convert folder album to MP3 Audio Format #
# Date: 02-11-2023 #
# Date: 12-02-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
######################################################################
VERSION="8.5"
M_DATE="021123"
VERSION="8.4"
M_DATE="120223"
# Variables
tempFile="/tmp/ks-mp4s-folder.txt"
@ -66,7 +66,7 @@ else
fi
# Check if ffmpeg is installed
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
dependencies="ffmpeg grep find grep cut head tail tr cat"
dependencies_found=""
dependencies_not_found=""
@ -122,7 +122,7 @@ function extractFolderOrFile() {
# Syntax: showFileWithSpace <file number>
function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
cutDisplayName=$(echo ${DisplayName} | cut -c1)
@ -225,9 +225,7 @@ for format in ${formatFiles} ; do
echo "null" > /dev/null
else
echo "+ Video file(s) in .${format} found!"
cd "${1}" && ls -1 *.${format} &> /tmp/tempFile.txt
cat /tmp/tempFile.txt >> ${tempFile}
rm -rf /tmp/tempFile.txt 2> /dev/null
cd "${1}" && ls -1 *.${format} &>> ${tempFile}
fail=0
fi
done

View File

@ -2,12 +2,12 @@
###############################################################
# ks-mp4 (ks-tools) - Convert video to MP4 format #
# Date: 04-01-2025 #
# Date: 19-02-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
###############################################################
VERSION="8.5"
M_DATE="040125"
VERSION="8.4"
M_DATE="190223"
# Detect version ffmpeg for old releases
ffmpeg_version=$(ffmpeg -version 2>&1 | grep version | head -1 | cut -d " " -f 3 | cut -d "." -f 1)
@ -18,7 +18,7 @@ unset IFS
if [ -z "${ffmpeg_version}" ] ; then
video_sync="vsync"
else
if [ ${ffmpeg_version} -lt 5 ] 2> /dev/null ; then
if [ ${ffmpeg_version} -lt 5 ] ; then
video_sync="vsync"
else
video_sync="fps_mode"
@ -35,12 +35,12 @@ configFile=${configFolder}/ks-mp4
# Basic parameters creating config file.
rel_size="1280x534"
vcodec="libx264"
b_vcodec="2200k"
b_vcodec="2400k"
# Presets: ultrafast, superfast, veryfast, faster,
# fast, medium (default), slow, slower, veryslow
v_preset="slow"
v_preset="medium"
acodec="aac"
b_acodec="192k"
b_acodec="256k"
default_lang_audio="spa"
default_lang_subt="spa"
v_ext="mp4"
@ -51,39 +51,6 @@ if [ -f "/usr/bin/cygwin-alias.sh" ] ; then
source "/usr/bin/cygwin-alias.sh"
fi
# Setting the correct resolution for the video file
# Sintaxis: set_resolution <resolution> <file>
function set_resolution() {
check_bc_app_directories="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
set_rel="${1}"
input_video_file="${2}"
bc_found="1"
for file in ${check_bc_app_directories} ; do
if [ -f ${file}/bc ] ; then
bc_found=0
fi
done
if [ ${bc_found} -eq 0 ] ; then
file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' 2> /dev/null | head -1)
if [ -z "${file_rel}" ] ; then
echo ${set_rel}
else
file_rel_width=$(echo ${file_rel} | cut -d "x" -f 1)
file_rel_height=$(echo ${file_rel} | cut -d "x" -f 2)
set_rel_width=$(echo ${set_rel} | cut -d "x" -f 1)
aspect_rel=$(echo ${file_rel_width} / ${file_rel_height} | bc -l)
new_rel_height=$(echo ${set_rel_width} / ${aspect_rel} | bc)
even_number=$(echo ${new_rel_height} % 2 | bc)
if [ ${even_number} -ne 0 ] ; then
new_rel_height=$(expr ${new_rel_height} + 1)
fi
echo ${set_rel_width}x${new_rel_height}
fi
else
echo ${set_rel}
fi
}
# Create inicial config file
mkdir -p ${configFolder}
if [ -f ${configFile} ] ; then
@ -124,7 +91,6 @@ if [ -f ${configFile} ] ; then
echo "v_ext=${v_ext}" >> ${configFile}
fi
source ${configFile}
rel_size=$(set_resolution ${rel_size} "${1}")
else
echo "#!/bin/bash" > ${configFile}
echo "" >> ${configFile}
@ -138,12 +104,11 @@ else
echo "default_lang_subt=${default_lang_subt}" >> ${configFile}
echo "v_ext=${v_ext}" >> ${configFile}
source ${configFile}
rel_size=$(set_resolution ${rel_size} "${1}")
fi
# Check if ffmpeg is installed
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
dependencies="ffmpeg grep sed grep cut head tail tr cat bc"
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
dependencies="ffmpeg grep sed grep cut head tail tr cat"
dependencies_found=""
dependencies_not_found=""
for checkPath in ${path_check} ; do
@ -222,7 +187,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
echo ${DisplayName}

View File

@ -2,12 +2,12 @@
###############################################################
# ks-mp4k (ks-tools) - Convert video to MP4 format (4K) #
# Date: 04-01-2025 #
# Date: 19-02-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
###############################################################
VERSION="8.5"
M_DATE="040125"
VERSION="8.4"
M_DATE="190223"
# Detect version ffmpeg for old releases
ffmpeg_version=$(ffmpeg -version 2>&1 | grep version | head -1 | cut -d " " -f 3 | cut -d "." -f 1)
@ -18,7 +18,7 @@ unset IFS
if [ -z "${ffmpeg_version}" ] ; then
video_sync="vsync"
else
if [ ${ffmpeg_version} -lt 5 ] 2> /dev/null ; then
if [ ${ffmpeg_version} -lt 5 ] ; then
video_sync="vsync"
else
video_sync="fps_mode"
@ -51,39 +51,6 @@ if [ -f "/usr/bin/cygwin-alias.sh" ] ; then
source "/usr/bin/cygwin-alias.sh"
fi
# Setting the correct resolution for the video file
# Sintaxis: set_resolution <resolution> <file>
function set_resolution() {
check_bc_app_directories="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
set_rel="${1}"
input_video_file="${2}"
bc_found="1"
for file in ${check_bc_app_directories} ; do
if [ -f ${file}/bc ] ; then
bc_found=0
fi
done
if [ ${bc_found} -eq 0 ] ; then
file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' 2> /dev/null | head -1)
if [ -z "${file_rel}" ] ; then
echo ${set_rel}
else
file_rel_width=$(echo ${file_rel} | cut -d "x" -f 1)
file_rel_height=$(echo ${file_rel} | cut -d "x" -f 2)
set_rel_width=$(echo ${set_rel} | cut -d "x" -f 1)
aspect_rel=$(echo ${file_rel_width} / ${file_rel_height} | bc -l)
new_rel_height=$(echo ${set_rel_width} / ${aspect_rel} | bc)
even_number=$(echo ${new_rel_height} % 2 | bc)
if [ ${even_number} -ne 0 ] ; then
new_rel_height=$(expr ${new_rel_height} + 1)
fi
echo ${set_rel_width}x${new_rel_height}
fi
else
echo ${set_rel}
fi
}
# Create inicial config file
mkdir -p ${configFolder}
if [ -f ${configFile} ] ; then
@ -124,7 +91,6 @@ if [ -f ${configFile} ] ; then
echo "v_ext=${v_ext}" >> ${configFile}
fi
source ${configFile}
rel_size=$(set_resolution ${rel_size} "${1}")
else
echo "#!/bin/bash" > ${configFile}
echo "" >> ${configFile}
@ -138,12 +104,11 @@ else
echo "default_lang_subt=${default_lang_subt}" >> ${configFile}
echo "v_ext=${v_ext}" >> ${configFile}
source ${configFile}
rel_size=$(set_resolution ${rel_size} "${1}")
fi
# Check if ffmpeg is installed
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
dependencies="ffmpeg grep sed grep cut head tail tr cat bc"
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
dependencies="ffmpeg grep sed grep cut head tail tr cat"
dependencies_found=""
dependencies_not_found=""
for checkPath in ${path_check} ; do
@ -222,7 +187,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
echo ${DisplayName}

View File

@ -2,12 +2,12 @@
###############################################################
# ks-mp4s (ks-tools) - Convert video to MP4 format (Series) #
# Date: 04-01-2025 #
# Date: 19-02-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
###############################################################
VERSION="8.5"
M_DATE="040125"
VERSION="8.4"
M_DATE="190223"
# Detect version ffmpeg for old releases
ffmpeg_version=$(ffmpeg -version 2>&1 | grep version | head -1 | cut -d " " -f 3 | cut -d "." -f 1)
@ -18,7 +18,7 @@ unset IFS
if [ -z "${ffmpeg_version}" ] ; then
video_sync="vsync"
else
if [ ${ffmpeg_version} -lt 5 ] 2> /dev/null ; then
if [ ${ffmpeg_version} -lt 5 ] ; then
video_sync="vsync"
else
video_sync="fps_mode"
@ -51,39 +51,6 @@ if [ -f "/usr/bin/cygwin-alias.sh" ] ; then
source "/usr/bin/cygwin-alias.sh"
fi
# Setting the correct resolution for the video file
# Sintaxis: set_resolution <resolution> <file>
function set_resolution() {
check_bc_app_directories="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
set_rel="${1}"
input_video_file="${2}"
bc_found="1"
for file in ${check_bc_app_directories} ; do
if [ -f ${file}/bc ] ; then
bc_found=0
fi
done
if [ ${bc_found} -eq 0 ] ; then
file_rel=$(ffmpeg -i "${2}" 2>&1 | grep Stream | grep Video: | grep -Po '\d{3,5}x\d{3,5}' 2> /dev/null | head -1)
if [ -z "${file_rel}" ] ; then
echo ${set_rel}
else
file_rel_width=$(echo ${file_rel} | cut -d "x" -f 1)
file_rel_height=$(echo ${file_rel} | cut -d "x" -f 2)
set_rel_width=$(echo ${set_rel} | cut -d "x" -f 1)
aspect_rel=$(echo ${file_rel_width} / ${file_rel_height} | bc -l)
new_rel_height=$(echo ${set_rel_width} / ${aspect_rel} | bc)
even_number=$(echo ${new_rel_height} % 2 | bc)
if [ ${even_number} -ne 0 ] ; then
new_rel_height=$(expr ${new_rel_height} + 1)
fi
echo ${set_rel_width}x${new_rel_height}
fi
else
echo ${set_rel}
fi
}
# Create inicial config file
mkdir -p ${configFolder}
if [ -f ${configFile} ] ; then
@ -124,7 +91,6 @@ if [ -f ${configFile} ] ; then
echo "v_ext=${v_ext}" >> ${configFile}
fi
source ${configFile}
rel_size=$(set_resolution ${rel_size} "${1}")
else
echo "#!/bin/bash" > ${configFile}
echo "" >> ${configFile}
@ -138,12 +104,11 @@ else
echo "default_lang_subt=${default_lang_subt}" >> ${configFile}
echo "v_ext=${v_ext}" >> ${configFile}
source ${configFile}
rel_size=$(set_resolution ${rel_size} "${1}")
fi
# Check if ffmpeg is installed
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
dependencies="ffmpeg grep sed grep cut head tail tr cat bc"
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
dependencies="ffmpeg grep sed grep cut head tail tr cat"
dependencies_found=""
dependencies_not_found=""
for checkPath in ${path_check} ; do
@ -222,7 +187,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
echo ${DisplayName}

View File

@ -2,12 +2,12 @@
#################################################################################
# ks-mp4s-folder (ks-tools) - Convert videos from folder to MP4 format (Series) #
# Date: 02-11-2023 #
# Date: 12-02-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
#################################################################################
VERSION="8.5"
M_DATE="021123"
VERSION="8.4"
M_DATE="120223"
# Variables
tempFile="/tmp/ks-mp4s-folder.txt"
@ -21,7 +21,7 @@ if [ -f "/usr/bin/cygwin-alias.sh" ] ; then
fi
# Check if ffmpeg is installed
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
dependencies="ffmpeg grep find grep cut head tail cat"
dependencies_found=""
dependencies_not_found=""
@ -104,9 +104,7 @@ for format in ${formatFiles} ; do
echo "null" > /dev/null
else
echo "+ Video file(s) in .${format} found!"
cd "${1}" && ls -1 *.${format} &> /tmp/tempFile.txt
cat /tmp/tempFile.txt >> ${tempFile}
rm -rf /tmp/tempFile.txt 2> /dev/null
cd "${1}" && ls -1 *.${format} &>> ${tempFile}
fail=0
fi
done
@ -115,7 +113,7 @@ done
num_files=$(cat ${tempFile} | wc -l)
if [ ${num_files} -eq 0 ] ; then
echo ""
echo "+ No video file(s) found in folder '${1}'"
echo "+ No video file(s) found in folder '${1}"
echo ""
exit
else

View File

@ -2,12 +2,12 @@
#############################################################################
# ks-oga (ks-tools) - Convert video/audio file(s) to OGA (OGG Audio) Format #
# Date: 02-11-2023 #
# Date: 13-02-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
#############################################################################
VERSION="8.5"
M_DATE="021123"
VERSION="8.4"
M_DATE="130223"
# Global parameters
dirTemp="/tmp"
@ -59,7 +59,7 @@ else
fi
# Check if ffmpeg is installed
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
dependencies="ffmpeg grep sed grep cut head tail tr cat"
dependencies_found=""
dependencies_not_found=""
@ -148,7 +148,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
cutDisplayName=$(echo ${DisplayName} | cut -c1)

View File

@ -2,12 +2,12 @@
############################################################################
# ks-oga-album (ks-tools) - Convert folder album to OGA (OGG Audio) Format #
# Date: 02-11-2023 #
# Date: 12-02-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
############################################################################
VERSION="8.5"
M_DATE="021123"
VERSION="8.4"
M_DATE="120223"
# Variables
tempFile="/tmp/ks-mp4s-folder.txt"
@ -66,7 +66,7 @@ else
fi
# Check if ffmpeg is installed
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
dependencies="ffmpeg grep find grep cut head tail tr cat"
dependencies_found=""
dependencies_not_found=""
@ -122,7 +122,7 @@ function extractFolderOrFile() {
# Syntax: showFileWithSpace <file number>
function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
cutDisplayName=$(echo ${DisplayName} | cut -c1)
@ -225,9 +225,7 @@ for format in ${formatFiles} ; do
echo "null" > /dev/null
else
echo "+ Video file(s) in .${format} found!"
cd "${1}" && ls -1 *.${format} &> /tmp/tempFile.txt
cat /tmp/tempFile.txt >> ${tempFile}
rm -rf /tmp/tempFile.txt 2> /dev/null
cd "${1}" && ls -1 *.${format} &>> ${tempFile}
fail=0
fi
done

View File

@ -2,12 +2,12 @@
########################################################################
# ks-upa (ks-tools) - Upload audio file(s) to server with scp or rsync #
# Date: 02-11-2023 #
# Date: 11-03-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
########################################################################
VERSION="8.5"
M_DATE="021123"
VERSION="8.4"
M_DATE="110323"
# Global parameters.
dirTemp="/tmp"
@ -26,11 +26,6 @@ else
cygwin="no"
fi
# Set the correct permissions to the pem file
if [ -f ${dirConfig}/connect.pem ] ; then
chmod 600 ${dirConfig}/connect.pem
fi
# Function to remove spaces and symbols
# Syntax: convertText "<text>"
function convertText() {
@ -88,12 +83,9 @@ function listArchives() {
if [ $? -ne 0 ] ; then
echo "null" > /dev/null
else
find "${1}"/*.${format} &> ${dirTemp}/temp.tmp
cat ${dirTemp}/temp.tmp >> ${dirTemp}/${listCompTemp}
find "${1}"/*.${format} &>> ${dirTemp}/${listCompTemp}
echo "+ Audio file(s) in .${format} found!"
cd "${1}" && ls -1 *.${format} &> ${dirTemp}/temp.tmp
cat ${dirTemp}/temp.tmp >> ${dirTemp}/${listTemp}
rm -rf ${dirTemp}/temp.tmp 2> /dev/null
cd "${1}" && ls -1 *.${format} &>> ${dirTemp}/${listTemp}
fail=0
fi
done
@ -118,7 +110,7 @@ function showFileWithSpace() {
FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
FileNoExtension=$(echo $FileName | cut -d "." -f 1)
echo $FileNoExtension > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
echo ${DisplayName}
@ -571,31 +563,14 @@ function editConfig() {
encrypt_password_enter=$(encrypt_kstools "${raw_password_enter}")
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
cp -rf "${pem_path}" ${dirConfig}/connect.pem
chmod 600 ${dirConfig}/connect.pem
if [ "${editUpvTool}" == "rsync" ] ; then
echo "rsync-pem" > ${dirConfig}/ks-upload-tool
elif [ "${editUpvTool}" == "rsync-rsa" ] ; then
echo "rsync-pem" > ${dirConfig}/ks-upload-tool
elif [ "${editUpvTool}" == "scp" ] ; then
echo "scp-pem" > ${dirConfig}/ks-upload-tool
elif [ "${editUpvTool}" == "scp-rsa" ] ; then
echo "scp-pem" > ${dirConfig}/ks-upload-tool
fi
echo "* PEM file copied to ${dirConfig}/connect.pem"
else
echo "+ File ${pem_path} does not exist"
echo ""
echo "+ Press ENTER to return menu " ; read continue
fi
else
raw_password_enter=${PASS}
encrypt_password_enter=$(encrypt_kstools "${raw_password_enter}")
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
if [ "${editUpvTool}" == "rsync-pem" ] ; then
echo "rsync" > ${dirConfig}/ks-upload-tool
elif [ "${editUpvTool}" == "scp-pem" ] ; then
echo "scp" > ${dirConfig}/ks-upload-tool
fi
fi
elif [ "${EDIT}" == "3" ] ; then
echo -n "* Enter the server URL: " ; read SERVER
@ -692,13 +667,9 @@ function createConfig() {
encrypt_password_enter=$(encrypt_kstools "${raw_password_enter}")
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
cp -rf "${pem_path}" ${dirConfig}/connect.pem
chmod 600 ${dirConfig}/connect.pem
echo "scp-pem" > ${dirConfig}/ks-upload-tool
echo "* PEM file copied to ${dirConfig}/connect.pem"
else
echo "+ File ${pem_path} does not exist"
echo "+ The configuration is cancelled"
exit
fi
else
raw_password_enter=${PASS}
@ -710,7 +681,7 @@ function createConfig() {
if [ -f ${dirConfig}/ks-upload-server ] ; then
echo "+ The SERVER configuration already exists (Use: 'ks-upa -e' for edit)"
else
echo -n "* Enter the server URL (or IP): " ; read SERVER
echo -n "* Enter the server URL: " ; read SERVER
server=${SERVER}
echo ${server} > ${dirConfig}/ks-upload-server
fi
@ -734,13 +705,8 @@ function createConfig() {
if [ -f ${dirConfig}/ks-upload-tool ] ; then
echo "+ The UPLOAD TOOL configuration already exists (Use: 'ks-upa -e' for edit)"
else
if [ "${PASS}" == "pem" ] ; then
echo "* Setting 'scp-pem' as the default tool"
echo "scp-pem" > ${dirConfig}/ks-upload-tool
else
echo "* Setting 'scp' as the default tool"
echo "scp" > ${dirConfig}/ks-upload-tool
fi
echo "* Setting 'scp' as the default tool"
echo "scp" > ${dirConfig}/ks-upload-tool
fi
# Configure port by default
if [ -f ${dirConfig}/ks-upload-port ] ; then
@ -786,7 +752,7 @@ function showHelp() {
# Function to check if all the necessary tools
# for the execution are installed.
function checkDependencies() {
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
dependencies="sshpass expect rsync md5sum scp ssh find grep sed cut head tail cat ssh-keyscan ssh-keygen"
dependencies_found=""
dependencies_not_found=""

View File

@ -2,12 +2,12 @@
#########################################################################
# ks-upf (ks-tools) - Upload common file(s) to server with scp or rsync #
# Date: 02-11-2023 #
# Date: 11-03-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
#########################################################################
VERSION="8.5"
M_DATE="021123"
VERSION="8.4"
M_DATE="110323"
# Global parameters.
dirTemp="/tmp"
@ -26,11 +26,6 @@ else
cygwin="no"
fi
# Set the correct permissions to the pem file
if [ -f ${dirConfig}/connect.pem ] ; then
chmod 600 ${dirConfig}/connect.pem
fi
# Function to remove spaces and symbols
# Syntax: convertText "<text>"
function convertText() {
@ -115,12 +110,9 @@ function listArchives() {
if [ $? -ne 0 ] ; then
echo "null" > /dev/null
else
find "${1}"/*.${format} &> ${dirTemp}/temp.tmp
cat ${dirTemp}/temp.tmp >> ${dirTemp}/${listCompTemp}
find "${1}"/*.${format} &>> ${dirTemp}/${listCompTemp}
echo "+ File(s) in .${format} format found!"
cd "${1}" && ls -1 *.${format} &> ${dirTemp}/temp.tmp
cat ${dirTemp}/temp.tmp >> ${dirTemp}/${listTemp}
rm -rf ${dirTemp}/temp.tmp 2> /dev/null
cd "${1}" && ls -1 *.${format} &>> ${dirTemp}/${listTemp}
fail=0
fi
done
@ -145,7 +137,7 @@ function showFileWithSpace() {
FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
FileNoExtension=$(echo $FileName | cut -d "." -f 1)
echo $FileNoExtension > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
echo ${DisplayName}
@ -598,31 +590,14 @@ function editConfig() {
encrypt_password_enter=$(encrypt_kstools "${raw_password_enter}")
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
cp -rf "${pem_path}" ${dirConfig}/connect.pem
chmod 600 ${dirConfig}/connect.pem
if [ "${editUpvTool}" == "rsync" ] ; then
echo "rsync-pem" > ${dirConfig}/ks-upload-tool
elif [ "${editUpvTool}" == "rsync-rsa" ] ; then
echo "rsync-pem" > ${dirConfig}/ks-upload-tool
elif [ "${editUpvTool}" == "scp" ] ; then
echo "scp-pem" > ${dirConfig}/ks-upload-tool
elif [ "${editUpvTool}" == "scp-rsa" ] ; then
echo "scp-pem" > ${dirConfig}/ks-upload-tool
fi
echo "* PEM file copied to ${dirConfig}/connect.pem"
else
echo "+ File ${pem_path} does not exist"
echo ""
echo "+ Press ENTER to return menu " ; read continue
fi
else
raw_password_enter=${PASS}
encrypt_password_enter=$(encrypt_kstools "${raw_password_enter}")
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
if [ "${editUpvTool}" == "rsync-pem" ] ; then
echo "rsync" > ${dirConfig}/ks-upload-tool
elif [ "${editUpvTool}" == "scp-pem" ] ; then
echo "scp" > ${dirConfig}/ks-upload-tool
fi
fi
elif [ "${EDIT}" == "3" ] ; then
echo -n "* Enter the server URL: " ; read SERVER
@ -719,13 +694,9 @@ function createConfig() {
encrypt_password_enter=$(encrypt_kstools "${raw_password_enter}")
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
cp -rf "${pem_path}" ${dirConfig}/connect.pem
chmod 600 ${dirConfig}/connect.pem
echo "scp-pem" > ${dirConfig}/ks-upload-tool
echo "* PEM file copied to ${dirConfig}/connect.pem"
else
echo "+ File ${pem_path} does not exist"
echo "+ The configuration is cancelled"
exit
fi
else
raw_password_enter=${PASS}
@ -737,7 +708,7 @@ function createConfig() {
if [ -f ${dirConfig}/ks-upload-server ] ; then
echo "+ The SERVER configuration already exists (Use: 'ks-upf -e' for edit)"
else
echo -n "* Enter the server URL (or IP): " ; read SERVER
echo -n "* Enter the server URL: " ; read SERVER
server=${SERVER}
echo ${server} > ${dirConfig}/ks-upload-server
fi
@ -761,13 +732,8 @@ function createConfig() {
if [ -f ${dirConfig}/ks-upload-tool ] ; then
echo "+ The UPLOAD TOOL configuration already exists (Use: 'ks-upf -e' for edit)"
else
if [ "${PASS}" == "pem" ] ; then
echo "* Setting 'scp-pem' as the default tool"
echo "scp-pem" > ${dirConfig}/ks-upload-tool
else
echo "* Setting 'scp' as the default tool"
echo "scp" > ${dirConfig}/ks-upload-tool
fi
echo "* Setting 'scp' as the default tool"
echo "scp" > ${dirConfig}/ks-upload-tool
fi
# Configure port by default
if [ -f ${dirConfig}/ks-upload-port ] ; then
@ -813,7 +779,7 @@ function showHelp() {
# Function to check if all the necessary tools
# for the execution are installed.
function checkDependencies() {
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
dependencies="sshpass expect rsync md5sum scp ssh find grep sed cut head tail cat ssh-keyscan ssh-keygen"
dependencies_found=""
dependencies_not_found=""

View File

@ -2,12 +2,12 @@
##############################################################################
# ks-upr (ks-tools) - Upload recursively file(s) to server with scp or rsync #
# Date: 02-11-2023 #
# Date: 11-03-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
##############################################################################
VERSION="8.5"
M_DATE="021123"
VERSION="8.4"
M_DATE="110323"
# Global parameters.
dirTemp="/tmp"
@ -26,11 +26,6 @@ else
cygwin="no"
fi
# Set the correct permissions to the pem file
if [ -f ${dirConfig}/connect.pem ] ; then
chmod 600 ${dirConfig}/connect.pem
fi
# Function to remove spaces and symbols
# Syntax: convertText "<text>"
function convertText() {
@ -105,12 +100,9 @@ function listArchives() {
if [ $? -ne 0 ] ; then
echo "null" > /dev/null
else
find "${1}"/*.${format} &> ${dirTemp}/temp.tmp
cat ${dirTemp}/temp.tmp >> ${dirTemp}/${listCompTemp}
find "${1}"/*.${format} &>> ${dirTemp}/${listCompTemp}
echo "+ File(s) in .${format} format found!"
cd "${1}" && ls -1 *.${format} &> ${dirTemp}/temp.tmp
cat ${dirTemp}/temp.tmp >> ${dirTemp}/${listTemp}
rm -rf ${dirTemp}/temp.tmp 2> /dev/null
cd "${1}" && ls -1 *.${format} &>> ${dirTemp}/${listTemp}
fail=0
fi
done
@ -135,7 +127,7 @@ function showFileWithSpace() {
FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
FileNoExtension=$(echo $FileName | cut -d "." -f 1)
echo $FileNoExtension > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
echo ${DisplayName}
@ -263,101 +255,6 @@ EOF
fi
}
# Function for recursive checksum.
# # Syntax: recursive_checksum <password> <file path> <user> <server> <server path>
function recursive_checksum() {
toolSelected=$(cat ${dirConfig}/ks-upload-tool)
portSelected=$(cat ${dirConfig}/ks-upload-port)
echo "# Generating checksum for files on ${dirLocal} directory"
cd ${2}
find . -type f -exec md5sum {} > ${dirConfig}/ks-tools_checksum.md5 \;
if [ "${cygwin}" == "yes" ] ; then
if [ "${toolSelected}" == "rsync" ] ; then
echo "# Copying checksum file to ${4}"
/usr/bin/sshpass -p ${1} /usr/bin/scp -o StrictHostKeyChecking=no -o CheckHostIP=no -P ${portSelected} ${dirConfig}/ks-tools_checksum.md5 ${3}@${4}:${5}/ &> /dev/null
echo "# Running checksum test"
/usr/bin/sshpass -p ${1} /usr/bin/ssh -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && md5sum -c ks-tools_checksum.md5"
/usr/bin/sshpass -p ${1} /usr/bin/ssh -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && rm -rf ks-tools_checksum.md5"
elif [ "${toolSelected}" == "scp" ] ; then
echo "# Copying checksum file to ${4}"
/usr/bin/sshpass -p ${1} /usr/bin/scp -o StrictHostKeyChecking=no -o CheckHostIP=no -P ${portSelected} ${dirConfig}/ks-tools_checksum.md5 ${3}@${4}:${5}/ &> /dev/null
echo "# Running checksum test"
/usr/bin/sshpass -p ${1} /usr/bin/ssh -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && md5sum -c ks-tools_checksum.md5"
/usr/bin/sshpass -p ${1} /usr/bin/ssh -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && rm -rf ks-tools_checksum.md5"
elif [ "${toolSelected}" == "rsync-rsa" ] ; then
echo "# Copying checksum file to ${4}"
/usr/bin/sshpass -p ${1} /usr/bin/scp -o HostKeyAlgorithms=+ssh-rsa -o StrictHostKeyChecking=no -o CheckHostIP=no -P ${portSelected} ${dirConfig}/ks-tools_checksum.md5 ${3}@${4}:${5}/ &> /dev/null
echo "# Running checksum test"
/usr/bin/sshpass -p ${1} /usr/bin/ssh -o HostKeyAlgorithms=+ssh-rsa -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && md5sum -c ks-tools_checksum.md5"
/usr/bin/sshpass -p ${1} /usr/bin/ssh -o HostKeyAlgorithms=+ssh-rsa -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && rm -rf ks-tools_checksum.md5"
elif [ "${toolSelected}" == "scp-rsa" ] ; then
echo "# Copying checksum file to ${4}"
/usr/bin/sshpass -p ${1} /usr/bin/scp -o HostKeyAlgorithms=+ssh-rsa -o StrictHostKeyChecking=no -o CheckHostIP=no -P ${portSelected} ${dirConfig}/ks-tools_checksum.md5 ${3}@${4}:${5}/ &> /dev/null
echo "# Running checksum test"
/usr/bin/sshpass -p ${1} /usr/bin/ssh -o HostKeyAlgorithms=+ssh-rsa -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && md5sum -c ks-tools_checksum.md5"
/usr/bin/sshpass -p ${1} /usr/bin/ssh -o HostKeyAlgorithms=+ssh-rsa -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && rm -rf ks-tools_checksum.md5"
elif [ "${toolSelected}" == "rsync-pem" ] ; then
echo "# Copying checksum file to ${4}"
/usr/bin/scp -i ${dirConfig}/connect.pem -o StrictHostKeyChecking=no -o CheckHostIP=no -P ${portSelected} ${dirConfig}/ks-tools_checksum.md5 ${3}@${4}:${5}/ &> /dev/null
echo "# Running checksum test"
/usr/bin/ssh -i ${dirConfig}/connect.pem -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && md5sum -c ks-tools_checksum.md5"
/usr/bin/ssh -i ${dirConfig}/connect.pem -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && rm -rf ks-tools_checksum.md5"
elif [ "${toolSelected}" == "scp-pem" ] ; then
echo "# Copying checksum file to ${4}"
/usr/bin/scp -i ${dirConfig}/connect.pem -o StrictHostKeyChecking=no -o CheckHostIP=no -P ${portSelected} ${dirConfig}/ks-tools_checksum.md5 ${3}@${4}:${5}/ &> /dev/null
echo "# Running checksum test"
/usr/bin/ssh -i ${dirConfig}/connect.pem -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && md5sum -c ks-tools_checksum.md5"
/usr/bin/ssh -i ${dirConfig}/connect.pem -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && rm -rf ks-tools_checksum.md5"
elif [ "${toolSelected}" == "rsync-e" ] ; then
echo "# Cancelled checksum por rsync-e"
elif [ "${toolSelected}" == "scp-pem" ] ; then
echo "# Cancelled checksum for scp-e"
fi
else
if [ "${toolSelected}" == "rsync" ] ; then
echo "# Copying checksum file to ${4}"
sshpass -p ${1} scp -o StrictHostKeyChecking=no -o CheckHostIP=no -P ${portSelected} ${dirConfig}/ks-tools_checksum.md5 ${3}@${4}:${5}/ &> /dev/null
echo "# Running checksum test"
sshpass -p ${1} ssh -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && md5sum -c ks-tools_checksum.md5"
sshpass -p ${1} ssh -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && rm -rf ks-tools_checksum.md5"
elif [ "${toolSelected}" == "scp" ] ; then
echo "# Copying checksum file to ${4}"
sshpass -p ${1} scp -o StrictHostKeyChecking=no -o CheckHostIP=no -P ${portSelected} ${dirConfig}/ks-tools_checksum.md5 ${3}@${4}:${5}/ &> /dev/null
echo "# Running checksum test"
sshpass -p ${1} ssh -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && md5sum -c ks-tools_checksum.md5"
sshpass -p ${1} ssh -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && rm -rf ks-tools_checksum.md5"
elif [ "${toolSelected}" == "rsync-rsa" ] ; then
echo "# Copying checksum file to ${4}"
sshpass -p ${1} scp -o HostKeyAlgorithms=+ssh-rsa -o StrictHostKeyChecking=no -o CheckHostIP=no -P ${portSelected} ${dirConfig}/ks-tools_checksum.md5 ${3}@${4}:${5}/ &> /dev/null
echo "# Running checksum test"
sshpass -p ${1} ssh -o HostKeyAlgorithms=+ssh-rsa -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && md5sum -c ks-tools_checksum.md5"
sshpass -p ${1} ssh -o HostKeyAlgorithms=+ssh-rsa -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && rm -rf ks-tools_checksum.md5"
elif [ "${toolSelected}" == "scp-rsa" ] ; then
echo "# Copying checksum file to ${4}"
sshpass -p ${1} scp -o HostKeyAlgorithms=+ssh-rsa -o StrictHostKeyChecking=no -o CheckHostIP=no -P ${portSelected} ${dirConfig}/ks-tools_checksum.md5 ${3}@${4}:${5}/ &> /dev/null
echo "# Running checksum test"
sshpass -p ${1} ssh -o HostKeyAlgorithms=+ssh-rsa -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && md5sum -c ks-tools_checksum.md5"
sshpass -p ${1} ssh -o HostKeyAlgorithms=+ssh-rsa -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && rm -rf ks-tools_checksum.md5"
elif [ "${toolSelected}" == "rsync-pem" ] ; then
echo "# Copying checksum file to ${4}"
scp -i ${dirConfig}/connect.pem -o StrictHostKeyChecking=no -o CheckHostIP=no -P ${portSelected} ${dirConfig}/ks-tools_checksum.md5 ${3}@${4}:${5}/ &> /dev/null
echo "# Running checksum test"
ssh -i ${dirConfig}/connect.pem -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && md5sum -c ks-tools_checksum.md5"
ssh -i ${dirConfig}/connect.pem -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && rm -rf ks-tools_checksum.md5"
elif [ "${toolSelected}" == "scp-pem" ] ; then
echo "# Copying checksum file to ${4}"
scp -i ${dirConfig}/connect.pem -o StrictHostKeyChecking=no -o CheckHostIP=no -P ${portSelected} ${dirConfig}/ks-tools_checksum.md5 ${3}@${4}:${5}/ &> /dev/null
echo "# Running checksum test"
ssh -i ${dirConfig}/connect.pem -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && md5sum -c ks-tools_checksum.md5"
ssh -i ${dirConfig}/connect.pem -o StrictHostKeyChecking=no -o CheckHostIP=no -p ${portSelected} ${3}@${4} "cd ${5} && rm -rf ks-tools_checksum.md5"
elif [ "${toolSelected}" == "rsync-e" ] ; then
echo "# Cancelled checksum por rsync-e"
elif [ "${toolSelected}" == "scp-pem" ] ; then
echo "# Cancelled checksum for scp-e"
fi
fi
}
# Generate random codes
function generate_codes() {
chars="abcdefghijklmnopqrstywxz1234567890ABCDEFHIJKLMNOPQRSTYWXZ@/"
@ -552,31 +449,14 @@ function editConfig() {
encrypt_password_enter=$(encrypt_kstools "${raw_password_enter}")
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
cp -rf "${pem_path}" ${dirConfig}/connect.pem
chmod 600 ${dirConfig}/connect.pem
if [ "${editUpvTool}" == "rsync" ] ; then
echo "rsync-pem" > ${dirConfig}/ks-upload-tool
elif [ "${editUpvTool}" == "rsync-rsa" ] ; then
echo "rsync-pem" > ${dirConfig}/ks-upload-tool
elif [ "${editUpvTool}" == "scp" ] ; then
echo "scp-pem" > ${dirConfig}/ks-upload-tool
elif [ "${editUpvTool}" == "scp-rsa" ] ; then
echo "scp-pem" > ${dirConfig}/ks-upload-tool
fi
echo "* PEM file copied to ${dirConfig}/connect.pem"
else
echo "+ File ${pem_path} does not exist"
echo ""
echo "+ Press ENTER to return menu " ; read continue
fi
else
raw_password_enter=${PASS}
encrypt_password_enter=$(encrypt_kstools "${raw_password_enter}")
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
if [ "${editUpvTool}" == "rsync-pem" ] ; then
echo "rsync" > ${dirConfig}/ks-upload-tool
elif [ "${editUpvTool}" == "scp-pem" ] ; then
echo "scp" > ${dirConfig}/ks-upload-tool
fi
fi
elif [ "${EDIT}" == "3" ] ; then
echo -n "* Enter the server URL: " ; read SERVER
@ -673,13 +553,9 @@ function createConfig() {
encrypt_password_enter=$(encrypt_kstools "${raw_password_enter}")
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
cp -rf "${pem_path}" ${dirConfig}/connect.pem
chmod 600 ${dirConfig}/connect.pem
echo "scp-pem" > ${dirConfig}/ks-upload-tool
echo "* PEM file copied to ${dirConfig}/connect.pem"
else
echo "+ File ${pem_path} does not exist"
echo "+ The configuration is cancelled"
exit
fi
else
raw_password_enter=${PASS}
@ -691,7 +567,7 @@ function createConfig() {
if [ -f ${dirConfig}/ks-upload-server ] ; then
echo "+ The SERVER configuration already exists (Use: 'ks-upr -e' for edit)"
else
echo -n "* Enter the server URL (or IP): " ; read SERVER
echo -n "* Enter the server URL: " ; read SERVER
server=${SERVER}
echo ${server} > ${dirConfig}/ks-upload-server
fi
@ -715,13 +591,8 @@ function createConfig() {
if [ -f ${dirConfig}/ks-upload-tool ] ; then
echo "+ The UPLOAD TOOL configuration already exists (Use: 'ks-upr -e' for edit)"
else
if [ "${PASS}" == "pem" ] ; then
echo "* Setting 'scp-pem' as the default tool"
echo "scp-pem" > ${dirConfig}/ks-upload-tool
else
echo "* Setting 'scp' as the default tool"
echo "scp" > ${dirConfig}/ks-upload-tool
fi
echo "* Setting 'scp' as the default tool"
echo "scp" > ${dirConfig}/ks-upload-tool
fi
# Configure port by default
if [ -f ${dirConfig}/ks-upload-port ] ; then
@ -767,7 +638,7 @@ function showHelp() {
# Function to check if all the necessary tools
# for the execution are installed.
function checkDependencies() {
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
dependencies="sshpass expect rsync md5sum scp ssh find grep sed cut head tail cat ssh-keyscan ssh-keygen"
dependencies_found=""
dependencies_not_found=""
@ -914,7 +785,6 @@ elif [ "${1}" == "-i" ] ; then
if [ -d ${dirLocal} ] ; then
sendFile ${password} "${dirLocal}" ${user} ${server} ${dirServer}
echo ""
recursive_checksum ${password} "${dirLocal}" ${user} ${server} ${dirServer}
count=$(expr ${count} + 1)
else
echo "* Directory ${dirLocal} does not exist!"

View File

@ -2,12 +2,12 @@
#########################################################################
# ks-upv (ks-tools) - Upload videos file(s) to server with scp or rsync #
# Date: 02-11-2023 #
# Date: 11-03-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
#########################################################################
VERSION="8.5"
M_DATE="021123"
VERSION="8.4"
M_DATE="110323"
# Global parameters.
dirTemp="/tmp"
@ -26,11 +26,6 @@ else
cygwin="no"
fi
# Set the correct permissions to the pem file
if [ -f ${dirConfig}/connect.pem ] ; then
chmod 600 ${dirConfig}/connect.pem
fi
# Function to remove spaces and symbols
# Syntax: convertText "<text>"
function convertText() {
@ -88,12 +83,9 @@ function listArchives() {
if [ $? -ne 0 ] ; then
echo "null" > /dev/null
else
find "${1}"/*.${format} &> ${dirTemp}/temp.tmp
cat ${dirTemp}/temp.tmp >> ${dirTemp}/${listCompTemp}
find "${1}"/*.${format} &>> ${dirTemp}/${listCompTemp}
echo "+ Video file(s) in .${format} found!"
cd "${1}" && ls -1 *.${format} &> ${dirTemp}/temp.tmp
cat ${dirTemp}/temp.tmp >> ${dirTemp}/${listTemp}
rm -rf ${dirTemp}/temp.tmp 2> /dev/null
cd "${1}" && ls -1 *.${format} &>> ${dirTemp}/${listTemp}
fail=0
fi
done
@ -118,7 +110,7 @@ function showFileWithSpace() {
FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
FileNoExtension=$(echo $FileName | cut -d "." -f 1)
echo $FileNoExtension > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
echo ${DisplayName}
@ -571,31 +563,14 @@ function editConfig() {
encrypt_password_enter=$(encrypt_kstools "${raw_password_enter}")
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
cp -rf "${pem_path}" ${dirConfig}/connect.pem
chmod 600 ${dirConfig}/connect.pem
if [ "${editUpvTool}" == "rsync" ] ; then
echo "rsync-pem" > ${dirConfig}/ks-upload-tool
elif [ "${editUpvTool}" == "rsync-rsa" ] ; then
echo "rsync-pem" > ${dirConfig}/ks-upload-tool
elif [ "${editUpvTool}" == "scp" ] ; then
echo "scp-pem" > ${dirConfig}/ks-upload-tool
elif [ "${editUpvTool}" == "scp-rsa" ] ; then
echo "scp-pem" > ${dirConfig}/ks-upload-tool
fi
echo "* PEM file copied to ${dirConfig}/connect.pem"
else
echo "+ File ${pem_path} does not exist"
echo ""
echo "+ Press ENTER to return menu " ; read continue
fi
else
raw_password_enter=${PASS}
encrypt_password_enter=$(encrypt_kstools "${raw_password_enter}")
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
if [ "${editUpvTool}" == "rsync-pem" ] ; then
echo "rsync" > ${dirConfig}/ks-upload-tool
elif [ "${editUpvTool}" == "scp-pem" ] ; then
echo "scp" > ${dirConfig}/ks-upload-tool
fi
fi
elif [ "${EDIT}" == "3" ] ; then
echo -n "* Enter the server URL: " ; read SERVER
@ -692,13 +667,9 @@ function createConfig() {
encrypt_password_enter=$(encrypt_kstools "${raw_password_enter}")
echo ${encrypt_password_enter} > ${dirConfig}/ks-upload-pass
cp -rf "${pem_path}" ${dirConfig}/connect.pem
chmod 600 ${dirConfig}/connect.pem
echo "scp-pem" > ${dirConfig}/ks-upload-tool
echo "* PEM file copied to ${dirConfig}/connect.pem"
else
echo "+ File ${pem_path} does not exist"
echo "+ The configuration is cancelled"
exit
fi
else
raw_password_enter=${PASS}
@ -710,7 +681,7 @@ function createConfig() {
if [ -f ${dirConfig}/ks-upload-server ] ; then
echo "+ The SERVER configuration already exists (Use: 'ks-upv -e' for edit)"
else
echo -n "* Enter the server URL (or IP): " ; read SERVER
echo -n "* Enter the server URL: " ; read SERVER
server=${SERVER}
echo ${server} > ${dirConfig}/ks-upload-server
fi
@ -734,13 +705,8 @@ function createConfig() {
if [ -f ${dirConfig}/ks-upload-tool ] ; then
echo "+ The UPLOAD TOOL configuration already exists (Use: 'ks-upv -e' for edit)"
else
if [ "${PASS}" == "pem" ] ; then
echo "* Setting 'scp-pem' as the default tool"
echo "scp-pem" > ${dirConfig}/ks-upload-tool
else
echo "* Setting 'scp' as the default tool"
echo "scp" > ${dirConfig}/ks-upload-tool
fi
echo "* Setting 'scp' as the default tool"
echo "scp" > ${dirConfig}/ks-upload-tool
fi
# Configure port by default
if [ -f ${dirConfig}/ks-upload-port ] ; then
@ -786,7 +752,7 @@ function showHelp() {
# Function to check if all the necessary tools
# for the execution are installed.
function checkDependencies() {
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
dependencies="sshpass expect rsync md5sum scp ssh find grep sed cut head tail cat ssh-keyscan ssh-keygen"
dependencies_found=""
dependencies_not_found=""

View File

@ -2,12 +2,12 @@
###############################################################
# ks-avi (ks-tools) - Convert video to VOB DVD Format #
# Date: 02-11-2023 #
# Date: 04-02-2022 #
# Author: q3aql #
# Contact: q3aql@duck.com #
###############################################################
VERSION="8.5"
M_DATE="021123"
VERSION="8.4"
M_DATE="040222"
# Basic parameters
rel_size="720x480"
@ -25,7 +25,7 @@ if [ -f "/usr/bin/cygwin-alias.sh" ] ; then
fi
# Check if ffmpeg is installed
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin $(brew --prefix 2> /dev/null)/bin"
path_check="/usr/bin /bin /usr/local/bin ${HOME}/.local/bin"
dependencies="ffmpeg grep grep cut head tail tr"
dependencies_found=""
dependencies_not_found=""

View File

@ -2,14 +2,15 @@
###############################################################
# ks-av1-wrapper (ks-tools) - Wrapper for ks-av1 #
# Date: 02-11-2023 #
# Date: 10-03-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
###############################################################
VERSION="8.5"
M_DATE="021123"
VERSION="8.4"
M_DATE="100323"
# Conversion parameters
ks_mp4_to_wrap="/usr/bin/ks-av1"
p_ffmpeg="ffmpeg -i"
p_ffmpeg_patched="-max_muxing_queue_size 9999"
rel_size="1280x534"
@ -41,9 +42,9 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
fi
# Check if ks-av1 is installed
wrap_test=$(ks-av1 &> /dev/null)
error_wrap=$?
if [ ${error_wrap} -ne 0 ] ; then
if [ -f ${ks_mp4_to_wrap} ] ; then
echo "ks-av1 detected" > /dev/null
else
echo ""
echo "* ks-av1-wrapper (ks-tools) v${VERSION} (${M_DATE})"
echo ""
@ -100,7 +101,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
echo ${DisplayName}
@ -128,7 +129,7 @@ function showInfo() {
# Syntax: showVideoDefault <video_file>
function showVideoDefault() {
# Check de video track by default
video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${video_default}" ] ; then
video_default="0:0"
else
@ -146,9 +147,9 @@ function showVideoDefault() {
# Syntax: showAudioDefault <video_file>
function showAudioDefault() {
# Check the audio track by default
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${audio_default}" ] ; then
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${audio_default}" ] ; then
audio_default="0:1"
else
@ -174,11 +175,11 @@ function showAudioDefault() {
# Syntax: showSubtitleDefault <video_file>
function showSubtitleDefault() {
# Check the subtitle track by default
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${subtitle_default}" ] ; then
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${subtitle_default}" ] ; then
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${subtitle_default}" ] ; then
subtitle_default="0:3"
else

View File

@ -2,14 +2,15 @@
###############################################################
# ks-av1s-wrapper (ks-tools) - Wrapper for ks-av1s #
# Date: 02-11-2023 #
# Date: 10-03-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
###############################################################
VERSION="8.5"
M_DATE="021123"
VERSION="8.4"
M_DATE="100323"
# Conversion parameters
ks_mp4s_to_wrap="/usr/bin/ks-av1s"
p_ffmpeg="ffmpeg -i"
p_ffmpeg_patched="-max_muxing_queue_size 9999"
rel_size="720x404"
@ -41,9 +42,9 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
fi
# Check if ks-av1s is installed
wrap_test=$(ks-av1s &> /dev/null)
error_wrap=$?
if [ ${error_wrap} -ne 0 ] ; then
if [ -f ${ks_mp4s_to_wrap} ] ; then
echo "ks-av1s detected" > /dev/null
else
echo ""
echo "* ks-av1s-wrapper (ks-tools) v${VERSION} (${M_DATE})"
echo ""
@ -100,7 +101,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
echo ${DisplayName}
@ -128,7 +129,7 @@ function showInfo() {
# Syntax: showVideoDefault <video_file>
function showVideoDefault() {
# Check de video track by default
video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${video_default}" ] ; then
video_default="0:0"
else
@ -146,9 +147,9 @@ function showVideoDefault() {
# Syntax: showAudioDefault <video_file>
function showAudioDefault() {
# Check the audio track by default
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${audio_default}" ] ; then
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${audio_default}" ] ; then
audio_default="0:1"
else
@ -174,11 +175,11 @@ function showAudioDefault() {
# Syntax: showSubtitleDefault <video_file>
function showSubtitleDefault() {
# Check the subtitle track by default
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${subtitle_default}" ] ; then
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${subtitle_default}" ] ; then
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${subtitle_default}" ] ; then
subtitle_default="0:3"
else

View File

@ -2,14 +2,15 @@
###############################################################
# ks-avi-wrapper (ks-tools) - Wrapper for ks-avi #
# Date: 02-11-2023 #
# Date: 10-03-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
###############################################################
VERSION="8.5"
M_DATE="021123"
VERSION="8.4"
M_DATE="100323"
# Conversion parameters
ks_avi_to_wrap="/usr/bin/ks-avi"
p_ffmpeg="ffmpeg -i"
p_ffmpeg_patched="-max_muxing_queue_size 9999"
rel_size="720x480"
@ -41,9 +42,9 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
fi
# Check if ks-avi is installed
wrap_test=$(ks-avi &> /dev/null)
error_wrap=$?
if [ ${error_wrap} -ne 0 ] ; then
if [ -f ${ks_avi_to_wrap} ] ; then
echo "ks-avi detected" > /dev/null
else
echo ""
echo "* ks-avi-wrapper (ks-tools) v${VERSION} (${M_DATE})"
echo ""
@ -100,7 +101,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
echo ${DisplayName}
@ -128,7 +129,7 @@ function showInfo() {
# Syntax: showVideoDefault <video_file>
function showVideoDefault() {
# Check de video track by default
video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${video_default}" ] ; then
video_default="0:0"
else
@ -146,9 +147,9 @@ function showVideoDefault() {
# Syntax: showAudioDefault <video_file>
function showAudioDefault() {
# Check the audio track by default
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${audio_default}" ] ; then
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${audio_default}" ] ; then
audio_default="0:1"
else
@ -174,11 +175,11 @@ function showAudioDefault() {
# Syntax: showSubtitleDefault <video_file>
function showSubtitleDefault() {
# Check the subtitle track by default
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${subtitle_default}" ] ; then
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${subtitle_default}" ] ; then
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${subtitle_default}" ] ; then
subtitle_default="0:3"
else

View File

@ -2,14 +2,15 @@
###############################################################
# ks-mp4-wrapper (ks-tools) - Wrapper for ks-mp4 #
# Date: 02-11-2023 #
# Date: 10-03-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
###############################################################
VERSION="8.5"
M_DATE="021123"
VERSION="8.4"
M_DATE="100323"
# Conversion parameters
ks_mp4_to_wrap="/usr/bin/ks-mp4"
p_ffmpeg="ffmpeg -i"
p_ffmpeg_patched="-max_muxing_queue_size 9999"
rel_size="1280x534"
@ -41,9 +42,9 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
fi
# Check if ks-mp4 is installed
wrap_test=$(ks-mp4 &> /dev/null)
error_wrap=$?
if [ ${error_wrap} -ne 0 ] ; then
if [ -f ${ks_mp4_to_wrap} ] ; then
echo "ks-mp4 detected" > /dev/null
else
echo ""
echo "* ks-mp4-wrapper (ks-tools) v${VERSION} (${M_DATE})"
echo ""
@ -100,7 +101,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
echo ${DisplayName}
@ -128,7 +129,7 @@ function showInfo() {
# Syntax: showVideoDefault <video_file>
function showVideoDefault() {
# Check de video track by default
video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${video_default}" ] ; then
video_default="0:0"
else
@ -146,9 +147,9 @@ function showVideoDefault() {
# Syntax: showAudioDefault <video_file>
function showAudioDefault() {
# Check the audio track by default
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${audio_default}" ] ; then
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${audio_default}" ] ; then
audio_default="0:1"
else
@ -174,11 +175,11 @@ function showAudioDefault() {
# Syntax: showSubtitleDefault <video_file>
function showSubtitleDefault() {
# Check the subtitle track by default
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${subtitle_default}" ] ; then
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${subtitle_default}" ] ; then
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${subtitle_default}" ] ; then
subtitle_default="0:3"
else

View File

@ -2,14 +2,15 @@
###############################################################
# ks-mp4k-wrapper (ks-tools) - Wrapper for ks-mp4k #
# Date: 02-11-2023 #
# Date: 10-03-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
###############################################################
VERSION="8.5"
M_DATE="021123"
VERSION="8.4"
M_DATE="100323"
# Conversion parameters
ks_mp4k_to_wrap="/usr/bin/ks-mp4k"
p_ffmpeg="ffmpeg -i"
p_ffmpeg_patched="-max_muxing_queue_size 9999"
rel_size="3840x2160"
@ -41,9 +42,9 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
fi
# Check if ks-mp4k is installed
wrap_test=$(ks-mp4k &> /dev/null)
error_wrap=$?
if [ ${error_wrap} -ne 0 ] ; then
if [ -f ${ks_mp4k_to_wrap} ] ; then
echo "ks-mp4k detected" > /dev/null
else
echo ""
echo "* ks-mp4k-wrapper (ks-tools) v${VERSION} (${M_DATE})"
echo ""
@ -100,7 +101,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
echo ${DisplayName}
@ -128,7 +129,7 @@ function showInfo() {
# Syntax: showVideoDefault <video_file>
function showVideoDefault() {
# Check de video track by default
video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${video_default}" ] ; then
video_default="0:0"
else
@ -146,9 +147,9 @@ function showVideoDefault() {
# Syntax: showAudioDefault <video_file>
function showAudioDefault() {
# Check the audio track by default
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${audio_default}" ] ; then
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${audio_default}" ] ; then
audio_default="0:1"
else
@ -174,11 +175,11 @@ function showAudioDefault() {
# Syntax: showSubtitleDefault <video_file>
function showSubtitleDefault() {
# Check the subtitle track by default
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${subtitle_default}" ] ; then
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${subtitle_default}" ] ; then
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${subtitle_default}" ] ; then
subtitle_default="0:3"
else

View File

@ -2,14 +2,15 @@
###############################################################
# ks-mp4s-wrapper (ks-tools) - Wrapper for ks-mp4s #
# Date: 02-11-2023 #
# Date: 10-03-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
###############################################################
VERSION="8.5"
M_DATE="021123"
VERSION="8.4"
M_DATE="100323"
# Conversion parameters
ks_mp4s_to_wrap="/usr/bin/ks-mp4s"
p_ffmpeg="ffmpeg -i"
p_ffmpeg_patched="-max_muxing_queue_size 9999"
rel_size="720x404"
@ -41,9 +42,9 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
fi
# Check if ks-mp4s is installed
wrap_test=$(ks-mp4s &> /dev/null)
error_wrap=$?
if [ ${error_wrap} -ne 0 ] ; then
if [ -f ${ks_mp4s_to_wrap} ] ; then
echo "ks-mp4s detected" > /dev/null
else
echo ""
echo "* ks-mp4s-wrapper (ks-tools) v${VERSION} (${M_DATE})"
echo ""
@ -100,7 +101,7 @@ function removeExtension() {
# Syntax: showFileWithSpace <file number>
function showFileWithSpace() {
echo "${1}" > ${dirTemp}/name.tmp
sed -i 's/_/ /g' ${dirTemp}/name.tmp 2> /dev/null
sed -i 's/_/ /g' ${dirTemp}/name.tmp
DisplayName=$(cat ${dirTemp}/name.tmp)
rm -rf ${dirTemp}/name.tmp
echo ${DisplayName}
@ -128,7 +129,7 @@ function showInfo() {
# Syntax: showVideoDefault <video_file>
function showVideoDefault() {
# Check de video track by default
video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${video_default}" ] ; then
video_default="0:0"
else
@ -146,9 +147,9 @@ function showVideoDefault() {
# Syntax: showAudioDefault <video_file>
function showAudioDefault() {
# Check the audio track by default
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${audio_default}" ] ; then
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${audio_default}" ] ; then
audio_default="0:1"
else
@ -174,11 +175,11 @@ function showAudioDefault() {
# Syntax: showSubtitleDefault <video_file>
function showSubtitleDefault() {
# Check the subtitle track by default
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | grep "(forced)" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${subtitle_default}" ] ; then
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | grep "(${default_lang_subt})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${subtitle_default}" ] ; then
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
subtitle_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Subtitle:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${subtitle_default}" ] ; then
subtitle_default="0:3"
else

View File

@ -2,17 +2,21 @@
###############################################################
# ks-vob-wrapper (ks-tools) - Wrapper for ks-vob #
# Date: 02-11-2023 #
# Date: 10-03-2023 #
# Author: q3aql #
# Contact: q3aql@duck.com #
###############################################################
VERSION="8.5"
M_DATE="021123"
VERSION="8.4"
M_DATE="100323"
# Conversion parameters
ks_vob_to_wrap="/usr/bin/ks-vob"
p_ffmpeg="ffmpeg -i"
p_ffmpeg_patched="-max_muxing_queue_size 9999"
rel_size="720x480"
configFolder=${HOME}/.ks-tools
configFile=${configFolder}/ks-vob
source ${configFile}
# Check cygwin alias (for Windows)
if [ -f "/usr/bin/cygwin-alias.sh" ] ; then
@ -33,9 +37,9 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
fi
# Check if ks-vob is installed
wrap_test=$(ks-vob &> /dev/null)
error_wrap=$?
if [ ${error_wrap} -ne 0 ] ; then
if [ -f ${ks_vob_to_wrap} ] ; then
echo "ks-vob detected" > /dev/null
else
echo ""
echo "* ks-vob-wrapper (ks-tools) v${VERSION} (${M_DATE})"
echo ""
@ -63,7 +67,7 @@ function showInfo() {
# Syntax: showVideoDefault <video_file>
function showVideoDefault() {
# Check de video track by default
video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
video_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${video_default}" ] ; then
video_default="0:0"
else
@ -81,9 +85,9 @@ function showVideoDefault() {
# Syntax: showAudioDefault <video_file>
function showAudioDefault() {
# Check the audio track by default
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "(${default_lang_audio})" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${audio_default}" ] ; then
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | cut -d "[" -f 1 | head -1)
audio_default=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | cut -d " " -f 3 | cut -c2-5 | cut -d "(" -f 1 | head -1)
if [ -z "${audio_default}" ] ; then
audio_default="0:1"
else