Bump up version number to 6.8
This commit is contained in:
parent
823f921e3d
commit
4c1b6d0fbd
|
@ -1,6 +1,6 @@
|
||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
set VERSION=6.7
|
set VERSION=6.8
|
||||||
echo.
|
echo.
|
||||||
echo #####################################
|
echo #####################################
|
||||||
echo # Welcome to ks-tools installer %VERSION% #
|
echo # Welcome to ks-tools installer %VERSION% #
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
rem ######################################
|
rem ######################################
|
||||||
rem # ks-tools for Windows #
|
rem # ks-tools for Windows #
|
||||||
rem # U. Modificacion: 10-03-2021 #
|
rem # U. Modificacion: 22-03-2021 #
|
||||||
rem # Author: q3aql #
|
rem # Author: q3aql #
|
||||||
rem # Contact: q3aql@protonmail.ch #
|
rem # Contact: q3aql@protonmail.ch #
|
||||||
rem # License: GPL v2.0 #
|
rem # License: GPL v2.0 #
|
||||||
rem ######################################
|
rem ######################################
|
||||||
set VERSION=6.7
|
set VERSION=6.8
|
||||||
|
|
||||||
rem # Start ks-tools terminal (bash)
|
rem # Start ks-tools terminal (bash)
|
||||||
mkdir home\%USERNAME%
|
mkdir home\%USERNAME%
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
rem ######################################
|
rem ######################################
|
||||||
rem # ks-tools for Windows #
|
rem # ks-tools for Windows #
|
||||||
rem # U. Modificacion: 10-03-2021 #
|
rem # U. Modificacion: 22-03-2021 #
|
||||||
rem # Author: q3aql #
|
rem # Author: q3aql #
|
||||||
rem # Contact: q3aql@protonmail.ch #
|
rem # Contact: q3aql@protonmail.ch #
|
||||||
rem # License: GPL v2.0 #
|
rem # License: GPL v2.0 #
|
||||||
rem ######################################
|
rem ######################################
|
||||||
set VERSION=6.7
|
set VERSION=6.8
|
||||||
|
|
||||||
rem # Start ks-tools ZUI (bash)
|
rem # Start ks-tools ZUI (bash)
|
||||||
mkdir home\%USERNAME%
|
mkdir home\%USERNAME%
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
#################################################################
|
#################################################################
|
||||||
# ks-zui (ks-tools) - Simple zenity user interface for ks-tools #
|
# ks-zui (ks-tools) - Simple zenity user interface for ks-tools #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
#################################################################
|
#################################################################
|
||||||
VERSION="6.7 (BETA)"
|
VERSION="6.8 (BETA)"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Function to show about
|
# Function to show about
|
||||||
function showAbout() {
|
function showAbout() {
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
#################################################################
|
#################################################################
|
||||||
# ks-zui (ks-tools) - Simple zenity user interface for ks-tools #
|
# ks-zui (ks-tools) - Simple zenity user interface for ks-tools #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
#################################################################
|
#################################################################
|
||||||
VERSION="6.7 (BETA)"
|
VERSION="6.8 (BETA)"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Function to show about
|
# Function to show about
|
||||||
function showAbout() {
|
function showAbout() {
|
||||||
|
@ -17,7 +17,7 @@ function showAbout() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show information of video file
|
# Function to show information of video file
|
||||||
# Sintax: showVideoInfo
|
# Syntax: showVideoInfo
|
||||||
function showVideoInfo() {
|
function showVideoInfo() {
|
||||||
videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \
|
videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \
|
||||||
| Select the video file" --file-selection)
|
| Select the video file" --file-selection)
|
||||||
|
@ -28,7 +28,7 @@ function showVideoInfo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to convert MP4 with subs
|
# Function to convert MP4 with subs
|
||||||
# Sintax: convertMP4WithSub
|
# Syntax: convertMP4WithSub
|
||||||
function convertMP4WithSub() {
|
function convertMP4WithSub() {
|
||||||
videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \
|
videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \
|
||||||
| Select the video file" --file-selection)
|
| Select the video file" --file-selection)
|
||||||
|
@ -84,7 +84,7 @@ function convertMP4WithSub() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to convert MP4
|
# Function to convert MP4
|
||||||
# Sintax: convertMP4
|
# Syntax: convertMP4
|
||||||
function convertMP4() {
|
function convertMP4() {
|
||||||
videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \
|
videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \
|
||||||
| Select the video file" --file-selection)
|
| Select the video file" --file-selection)
|
||||||
|
@ -137,7 +137,7 @@ function convertMP4() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to convert AVI with subs
|
# Function to convert AVI with subs
|
||||||
# Sintax: convertAVIWithSub
|
# Syntax: convertAVIWithSub
|
||||||
function convertAVIWithSub() {
|
function convertAVIWithSub() {
|
||||||
videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \
|
videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \
|
||||||
| Select the video file" --file-selection)
|
| Select the video file" --file-selection)
|
||||||
|
@ -193,7 +193,7 @@ function convertAVIWithSub() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to convert AVI
|
# Function to convert AVI
|
||||||
# Sintax: convertAVIW
|
# Syntax: convertAVIW
|
||||||
function convertAVI() {
|
function convertAVI() {
|
||||||
videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \
|
videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \
|
||||||
| Select the video file" --file-selection)
|
| Select the video file" --file-selection)
|
||||||
|
@ -246,7 +246,7 @@ function convertAVI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to convert VOB
|
# Function to convert VOB
|
||||||
# Sintax: convertVOB
|
# Syntax: convertVOB
|
||||||
function convertVOB() {
|
function convertVOB() {
|
||||||
videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \
|
videoFile=$(zenity --title "ks-zui (ks-tools) ${VERSION} (${M_DATE}) \
|
||||||
| Select the video file" --file-selection)
|
| Select the video file" --file-selection)
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
# ks-tools - Initialize the ks-tools terminal (using xterm) #
|
# ks-tools - Initialize the ks-tools terminal (using xterm) #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
###############################################################
|
###############################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
name_terminal="ks-tools v${VERSION} (${M_DATE})"
|
name_terminal="ks-tools v${VERSION} (${M_DATE})"
|
||||||
|
|
|
@ -114,12 +114,12 @@ fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo " #################################"
|
echo " #################################"
|
||||||
echo " # ks-tools 6.7 (for Unix/Linux) #"
|
echo " # ks-tools 6.8 (for Unix/Linux) #"
|
||||||
echo " #################################"
|
echo " #################################"
|
||||||
echo ""
|
echo ""
|
||||||
echo " * Available commands:"
|
echo " * Available commands:"
|
||||||
echo ""
|
echo ""
|
||||||
echo " - ks-upv - ks-vob"
|
echo " - ks-upv - ks-crop"
|
||||||
echo " - ks-upa - ks-oga"
|
echo " - ks-upa - ks-oga"
|
||||||
echo " - ks-upf - ks-oga-album"
|
echo " - ks-upf - ks-oga-album"
|
||||||
echo " - ks-upr - ks-mp4-wrapper"
|
echo " - ks-upr - ks-mp4-wrapper"
|
||||||
|
@ -129,4 +129,5 @@ echo " - ks-mp4s - ks-mp4k-wrapper"
|
||||||
echo " - ks-mix - ks-mp4s-wrapper"
|
echo " - ks-mix - ks-mp4s-wrapper"
|
||||||
echo " - ks-avi - ks-mp4s-folder"
|
echo " - ks-avi - ks-mp4s-folder"
|
||||||
echo " - ks-mp3 - ks-mp3-album"
|
echo " - ks-mp3 - ks-mp3-album"
|
||||||
|
echo " - ks-vob"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
# ks-tools - Initialize the ks-tools ZUI (using xterm) #
|
# ks-tools - Initialize the ks-tools ZUI (using xterm) #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
###############################################################
|
###############################################################
|
||||||
VERSION="6.7 (BETA)"
|
VERSION="6.8 (BETA)"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
name_terminal="ks-tools v${VERSION} (${M_DATE})"
|
name_terminal="ks-tools v${VERSION} (${M_DATE})"
|
||||||
|
|
26
src/ks-avi
26
src/ks-avi
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
# ks-avi (ks-tools) - Convert video to AVI format #
|
# ks-avi (ks-tools) - Convert video to AVI format #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
###############################################################
|
###############################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Global parameters
|
# Global parameters
|
||||||
dirTemp="/tmp"
|
dirTemp="/tmp"
|
||||||
|
@ -40,7 +40,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Funcion to show the name of file/folder from full path
|
# Funcion to show the name of file/folder from full path
|
||||||
# Sintax: extractFolderOrFile <full/path/file.txt>
|
# Syntax: extractFolderOrFile <full/path/file.txt>
|
||||||
function extractFolderOrFile() {
|
function extractFolderOrFile() {
|
||||||
pathToExtract="${1}/"
|
pathToExtract="${1}/"
|
||||||
findFolder=0
|
findFolder=0
|
||||||
|
@ -60,7 +60,7 @@ function extractFolderOrFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to remove extension from file
|
# Function to remove extension from file
|
||||||
# Sintax: removeExtension "<text>"
|
# Syntax: removeExtension "<text>"
|
||||||
function removeExtension() {
|
function removeExtension() {
|
||||||
wordToConvert=${1}
|
wordToConvert=${1}
|
||||||
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
||||||
|
@ -84,7 +84,7 @@ function removeExtension() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show files with spaces.
|
# Function to show files with spaces.
|
||||||
# Sintax: showFileWithSpace <file number>
|
# Syntax: showFileWithSpace <file number>
|
||||||
function showFileWithSpace() {
|
function showFileWithSpace() {
|
||||||
echo "${1}" > ${dirTemp}/name.tmp
|
echo "${1}" > ${dirTemp}/name.tmp
|
||||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||||
|
@ -93,7 +93,7 @@ function showFileWithSpace() {
|
||||||
echo ${DisplayName}
|
echo ${DisplayName}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Sintax: ks-avi </absolute/path/video.mkv> </path/prefix_name>
|
# Syntax: ks-avi </absolute/path/video.mkv> </path/prefix_name>
|
||||||
if [ -z "${1}" ] ; then
|
if [ -z "${1}" ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-avi (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-avi (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
|
@ -112,7 +112,7 @@ if [ -z "${1}" ] ; then
|
||||||
echo " - Default Subtitle: ${default_lang_subt} (forced)"
|
echo " - Default Subtitle: ${default_lang_subt} (forced)"
|
||||||
echo " - Container: ${v_ext}"
|
echo " - Container: ${v_ext}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax: "
|
echo "+ Syntax: "
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-avi </absolute/path/video.mkv> </path/prefix_name>"
|
echo " $ ks-avi </absolute/path/video.mkv> </path/prefix_name>"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -141,9 +141,9 @@ codec_hevc=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" |
|
||||||
yuv420p10le=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "yuv420p10le")
|
yuv420p10le=$(${p_ffmpeg} "${1}" 2>&1 | grep Stream | tr -s " " | grep "Video:" | grep "yuv420p10le")
|
||||||
codec_h265_hevc="${codec_h265}${codec_hevc}${yuv420p10le}"
|
codec_h265_hevc="${codec_h265}${codec_hevc}${yuv420p10le}"
|
||||||
if [ -z "${codec_h265_hevc}" ] ; then
|
if [ -z "${codec_h265_hevc}" ] ; then
|
||||||
p_conversion="-s ${rel_size} -c:v ${vcodec} -b:v ${b_vcodec} -preset ${v_preset} -c:a ${acodec} -b:a ${b_acodec}"
|
p_conversion="-s ${rel_size} -c:v ${vcodec} -b:v ${b_vcodec} -preset ${v_preset} -c:a ${acodec} -b:a ${b_acodec}"
|
||||||
else
|
else
|
||||||
p_conversion="-s ${rel_size} -c:v ${vcodec} -pix_fmt yuv420p -b:v ${b_vcodec} -preset ${v_preset} -c:a ${acodec} -b:a ${b_acodec}"
|
p_conversion="-s ${rel_size} -c:v ${vcodec} -pix_fmt yuv420p -b:v ${b_vcodec} -preset ${v_preset} -c:a ${acodec} -b:a ${b_acodec}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Init conversion file
|
# Init conversion file
|
||||||
|
@ -166,7 +166,7 @@ if [ -z "${2}" ] ; then
|
||||||
echo " - Default Subtitle: ${default_lang_subt} (forced)"
|
echo " - Default Subtitle: ${default_lang_subt} (forced)"
|
||||||
echo " - Container: ${v_ext}"
|
echo " - Container: ${v_ext}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax: "
|
echo "+ Syntax: "
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-avi </absolute/path/video.mkv> </path/prefix_name>"
|
echo " $ ks-avi </absolute/path/video.mkv> </path/prefix_name>"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -282,9 +282,9 @@ else
|
||||||
else
|
else
|
||||||
rel_size="${resolution}"
|
rel_size="${resolution}"
|
||||||
if [ -z "${codec_h265_hevc}" ] ; then
|
if [ -z "${codec_h265_hevc}" ] ; then
|
||||||
p_conversion="-s ${rel_size} -c:v ${vcodec} -b:v ${b_vcodec} -preset ${v_preset} -c:a ${acodec} -b:a ${b_acodec}"
|
p_conversion="-s ${rel_size} -c:v ${vcodec} -b:v ${b_vcodec} -preset ${v_preset} -c:a ${acodec} -b:a ${b_acodec}"
|
||||||
else
|
else
|
||||||
p_conversion="-s ${rel_size} -c:v ${vcodec} -pix_fmt yuv420p -b:v ${b_vcodec} -preset ${v_preset} -c:a ${acodec} -b:a ${b_acodec}"
|
p_conversion="-s ${rel_size} -c:v ${vcodec} -pix_fmt yuv420p -b:v ${b_vcodec} -preset ${v_preset} -c:a ${acodec} -b:a ${b_acodec}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo -n "* (Default: n) Do you want apply '-max_muxing_queue_size 9999' patch? (y/n): " ; read patch_thread
|
echo -n "* (Default: n) Do you want apply '-max_muxing_queue_size 9999' patch? (y/n): " ; read patch_thread
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
###############################################################
|
###############################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="220321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Global parameters
|
# Global parameters
|
||||||
|
|
12
src/ks-mix
12
src/ks-mix
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# ks-mix (ks-tools) - Extract video/audio and mix video/audio files #
|
# ks-mix (ks-tools) - Extract video/audio and mix video/audio files #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
#####################################################################
|
#####################################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# File(s) detection
|
# File(s) detection
|
||||||
current_dir=$(pwd)
|
current_dir=$(pwd)
|
||||||
|
@ -51,7 +51,7 @@ else
|
||||||
subs_found="NOT FOUND"
|
subs_found="NOT FOUND"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Function to show menu again when sintax is wrong
|
# Function to show menu again when Syntax is wrong
|
||||||
function show_menu() {
|
function show_menu() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-mix (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-mix (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
|
@ -63,7 +63,7 @@ function show_menu() {
|
||||||
echo " + Audio file: ${audio_file_dir} (${audio_found})"
|
echo " + Audio file: ${audio_file_dir} (${audio_found})"
|
||||||
echo " + Subs file: ${subs_file_dir} (${subs_found})"
|
echo " + Subs file: ${subs_file_dir} (${subs_found})"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax: "
|
echo "+ Syntax: "
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-mix -evid <video-file> --> Extract video track"
|
echo " $ ks-mix -evid <video-file> --> Extract video track"
|
||||||
echo " $ ks-mix -ev25 <video-file> --> Extract video track to 25 fps (only for H264)"
|
echo " $ ks-mix -ev25 <video-file> --> Extract video track to 25 fps (only for H264)"
|
||||||
|
@ -81,7 +81,7 @@ function show_menu() {
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show menu and sintax
|
# Show menu and Syntax
|
||||||
if [ -z "${1}" ] ; then
|
if [ -z "${1}" ] ; then
|
||||||
show_menu
|
show_menu
|
||||||
elif [ "${1}" == "-evid" ] ; then
|
elif [ "${1}" == "-evid" ] ; then
|
||||||
|
|
18
src/ks-mp3
18
src/ks-mp3
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# ks-mp3 (ks-tools) - Convert video/audio file(s) to MP3 (Audio) Format #
|
# ks-mp3 (ks-tools) - Convert video/audio file(s) to MP3 (Audio) Format #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
#########################################################################
|
#########################################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Global parameters
|
# Global parameters
|
||||||
dirTemp="/tmp"
|
dirTemp="/tmp"
|
||||||
|
@ -33,7 +33,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Funcion to show the name of file/folder from full path
|
# Funcion to show the name of file/folder from full path
|
||||||
# Sintax: extractFolderOrFile <full/path/file.txt>
|
# Syntax: extractFolderOrFile <full/path/file.txt>
|
||||||
function extractFolderOrFile() {
|
function extractFolderOrFile() {
|
||||||
pathToExtract="${1}/"
|
pathToExtract="${1}/"
|
||||||
findFolder=0
|
findFolder=0
|
||||||
|
@ -53,7 +53,7 @@ function extractFolderOrFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to remove extension from file
|
# Function to remove extension from file
|
||||||
# Sintax: removeExtension "<text>"
|
# Syntax: removeExtension "<text>"
|
||||||
function removeExtension() {
|
function removeExtension() {
|
||||||
wordToConvert=${1}
|
wordToConvert=${1}
|
||||||
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
||||||
|
@ -86,7 +86,7 @@ function removeExtension() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show files with spaces.
|
# Function to show files with spaces.
|
||||||
# Sintax: showFileWithSpace <file number>
|
# Syntax: showFileWithSpace <file number>
|
||||||
function showFileWithSpace() {
|
function showFileWithSpace() {
|
||||||
echo "${1}" > ${dirTemp}/name.tmp
|
echo "${1}" > ${dirTemp}/name.tmp
|
||||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||||
|
@ -109,7 +109,7 @@ function showFileWithSpace() {
|
||||||
echo ${DisplayName}
|
echo ${DisplayName}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Sintax: ks-mp3 </absolute/path/song.ogg> </path/prefix_name>
|
# Syntax: ks-mp3 </absolute/path/song.ogg> </path/prefix_name>
|
||||||
if [ -z "${1}" ] ; then
|
if [ -z "${1}" ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-mp3 (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-mp3 (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
|
@ -122,7 +122,7 @@ if [ -z "${1}" ] ; then
|
||||||
echo " - Bitrate audio: ${b_acodec}"
|
echo " - Bitrate audio: ${b_acodec}"
|
||||||
echo " - Container: ${v_ext}"
|
echo " - Container: ${v_ext}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax: "
|
echo "+ Syntax: "
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-mp3 </absolute/path/song.ogg> </path/prefix_name>"
|
echo " $ ks-mp3 </absolute/path/song.ogg> </path/prefix_name>"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -158,7 +158,7 @@ if [ -z "${2}" ] ; then
|
||||||
echo " - Bitrate audio: ${b_acodec}"
|
echo " - Bitrate audio: ${b_acodec}"
|
||||||
echo " - Container: ${v_ext}"
|
echo " - Container: ${v_ext}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax: "
|
echo "+ Syntax: "
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-mp3 </absolute/path/song.ogg> </path/prefix_name>"
|
echo " $ ks-mp3 </absolute/path/song.ogg> </path/prefix_name>"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
130
src/ks-mp3-album
130
src/ks-mp3-album
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# ks-mp3-album (ks-tools) - Convert folder album to MP3 Audio Format #
|
# ks-mp3-album (ks-tools) - Convert folder album to MP3 Audio Format #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
######################################################################
|
######################################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
tempFile="/tmp/ks-mp4s-folder.txt"
|
tempFile="/tmp/ks-mp4s-folder.txt"
|
||||||
|
@ -40,7 +40,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Funcion to show the name of file/folder from full path
|
# Funcion to show the name of file/folder from full path
|
||||||
# Sintax: extractFolderOrFile <full/path/file.txt>
|
# Syntax: extractFolderOrFile <full/path/file.txt>
|
||||||
function extractFolderOrFile() {
|
function extractFolderOrFile() {
|
||||||
pathToExtract="${1}/"
|
pathToExtract="${1}/"
|
||||||
findFolder=0
|
findFolder=0
|
||||||
|
@ -60,7 +60,7 @@ function extractFolderOrFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show files with spaces.
|
# Function to show files with spaces.
|
||||||
# Sintax: showFileWithSpace <file number>
|
# Syntax: showFileWithSpace <file number>
|
||||||
function showFileWithSpace() {
|
function showFileWithSpace() {
|
||||||
echo "${1}" > ${dirTemp}/name.tmp
|
echo "${1}" > ${dirTemp}/name.tmp
|
||||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||||
|
@ -84,7 +84,7 @@ function showFileWithSpace() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to remove extension from file
|
# Function to remove extension from file
|
||||||
# Sintax: removeExtension "<text>"
|
# Syntax: removeExtension "<text>"
|
||||||
function removeExtension() {
|
function removeExtension() {
|
||||||
wordToConvert=${1}
|
wordToConvert=${1}
|
||||||
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
||||||
|
@ -116,7 +116,7 @@ function removeExtension() {
|
||||||
echo ${wordToConvert}
|
echo ${wordToConvert}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Sintax: ks-mp3-album </absolute/path/album/
|
# Syntax: ks-mp3-album </absolute/path/album/
|
||||||
if [ -z "${1}" ] ; then
|
if [ -z "${1}" ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-mp3-album (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-mp3-album (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
|
@ -129,7 +129,7 @@ if [ -z "${1}" ] ; then
|
||||||
echo " - Bitrate audio: ${b_acodec}"
|
echo " - Bitrate audio: ${b_acodec}"
|
||||||
echo " - Container: ${v_ext}"
|
echo " - Container: ${v_ext}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax: "
|
echo "+ Syntax: "
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-mp3 </absolute/path/album>"
|
echo " $ ks-mp3 </absolute/path/album>"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -140,14 +140,14 @@ fi
|
||||||
|
|
||||||
# Check if folder exist
|
# Check if folder exist
|
||||||
if [ -d "${1}" ] ; then
|
if [ -d "${1}" ] ; then
|
||||||
echo null > /dev/null
|
echo null > /dev/null
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-mp3-album (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-mp3-album (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ The folder '${1}' does not exist!"
|
echo "+ The folder '${1}' does not exist!"
|
||||||
echo ""
|
echo ""
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Scan videos/audio files format
|
# Scan videos/audio files format
|
||||||
|
@ -161,14 +161,14 @@ echo -n "* Scanning ${1} " && sleep 4
|
||||||
echo ""
|
echo ""
|
||||||
rm -rf ${tempFile} && touch ${tempFile}
|
rm -rf ${tempFile} && touch ${tempFile}
|
||||||
for format in ${formatFiles} ; do
|
for format in ${formatFiles} ; do
|
||||||
find "${1}"/*.${format} &> ${tempFileTest}
|
find "${1}"/*.${format} &> ${tempFileTest}
|
||||||
if [ $? -ne 0 ] ; then
|
if [ $? -ne 0 ] ; then
|
||||||
echo "null" > /dev/null
|
echo "null" > /dev/null
|
||||||
else
|
else
|
||||||
echo "+ Video file(s) in .${format} found!"
|
echo "+ Video file(s) in .${format} found!"
|
||||||
cd "${1}" && ls -1 *.${format} &>> ${tempFile}
|
cd "${1}" && ls -1 *.${format} &>> ${tempFile}
|
||||||
fail=0
|
fail=0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Set the global metadata album
|
# Set the global metadata album
|
||||||
|
@ -199,34 +199,34 @@ fi
|
||||||
convert_files=1
|
convert_files=1
|
||||||
num_files=$(cat ${tempFile} | wc -l)
|
num_files=$(cat ${tempFile} | wc -l)
|
||||||
if [ ${num_files} -eq 0 ] ; then
|
if [ ${num_files} -eq 0 ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ No video/audio file(s) found in folder '${1}"
|
echo "+ No video/audio file(s) found in folder '${1}"
|
||||||
echo ""
|
echo ""
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "* List of files:"
|
echo "* List of files:"
|
||||||
echo ""
|
echo ""
|
||||||
while [ ${convert_files} -le ${num_files} ] ; do
|
while [ ${convert_files} -le ${num_files} ] ; do
|
||||||
show_file=$(cat ${tempFile} | head -${convert_files} | tail -1)
|
show_file=$(cat ${tempFile} | head -${convert_files} | tail -1)
|
||||||
echo " + ${show_file}"
|
echo " + ${show_file}"
|
||||||
convert_files=$(expr ${convert_files} + 1)
|
convert_files=$(expr ${convert_files} + 1)
|
||||||
done
|
done
|
||||||
echo ""
|
echo ""
|
||||||
echo "* The output folder will be '${1}/to-mp3'"
|
echo "* The output folder will be '${1}/to-mp3'"
|
||||||
# Execute commands for conversion
|
# Execute commands for conversion
|
||||||
echo ""
|
echo ""
|
||||||
echo -n "* (Default: y) Do you want run the conversion? (y/n): " ; read run_commands_ffmpeg
|
echo -n "* (Default: y) Do you want run the conversion? (y/n): " ; read run_commands_ffmpeg
|
||||||
if [ "${run_commands_ffmpeg}" == "n" ] ; then
|
if [ "${run_commands_ffmpeg}" == "n" ] ; then
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
convert_files=1
|
convert_files=1
|
||||||
cd "${1}" && mkdir -p to-mp3 && rm -rf to-mp3/*
|
cd "${1}" && mkdir -p to-mp3 && rm -rf to-mp3/*
|
||||||
while [ ${convert_files} -le ${num_files} ] ; do
|
while [ ${convert_files} -le ${num_files} ] ; do
|
||||||
show_file=$(cat ${tempFile} | head -${convert_files} | tail -1)
|
show_file=$(cat ${tempFile} | head -${convert_files} | tail -1)
|
||||||
fname=$(echo "${show_file}" | cut -d "." -f 1)
|
fname=$(echo "${show_file}" | cut -d "." -f 1)
|
||||||
name_title_default=$(removeExtension "${show_file}")
|
name_title_default=$(removeExtension "${show_file}")
|
||||||
name_title_default=$(showFileWithSpace "${name_title_default}")
|
name_title_default=$(showFileWithSpace "${name_title_default}")
|
||||||
echo ""
|
echo ""
|
||||||
echo "* METADATA for '${show_file}'"
|
echo "* METADATA for '${show_file}'"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -270,24 +270,24 @@ else
|
||||||
audio_track="${audio_track}"
|
audio_track="${audio_track}"
|
||||||
fi
|
fi
|
||||||
echo -n "* (Default: ${name_title_default}) Type name of title: " ; read name_title
|
echo -n "* (Default: ${name_title_default}) Type name of title: " ; read name_title
|
||||||
if [ -z "${name_title}" ] ; then
|
if [ -z "${name_title}" ] ; then
|
||||||
name_title="${name_title_default}"
|
name_title="${name_title_default}"
|
||||||
else
|
else
|
||||||
name_title="${name_title}"
|
name_title="${name_title}"
|
||||||
fi
|
fi
|
||||||
echo -n "* (Default: ${track_init}) Type number of track: " ; read track_file
|
echo -n "* (Default: ${track_init}) Type number of track: " ; read track_file
|
||||||
if [ -z "${track_file}" ] ; then
|
if [ -z "${track_file}" ] ; then
|
||||||
track_num="${track_init}"
|
track_num="${track_init}"
|
||||||
else
|
else
|
||||||
track_num="${track_file}"
|
track_num="${track_file}"
|
||||||
fi
|
fi
|
||||||
echo -n "* (Default: ${artist_init}) Type name of artist: " ; read artist_file
|
echo -n "* (Default: ${artist_init}) Type name of artist: " ; read artist_file
|
||||||
if [ -z "${artist_file}" ] ; then
|
if [ -z "${artist_file}" ] ; then
|
||||||
artist_title="${artist_init}"
|
artist_title="${artist_init}"
|
||||||
else
|
else
|
||||||
artist_title="${artist_file}"
|
artist_title="${artist_file}"
|
||||||
artist_init="${artist_file}"
|
artist_init="${artist_file}"
|
||||||
fi
|
fi
|
||||||
# Check audio 5.1 or 7.1
|
# Check audio 5.1 or 7.1
|
||||||
audio_5_7_1=$(${p_ffmpeg} "${show_file}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "${audio_track}" | grep -i "5.1")
|
audio_5_7_1=$(${p_ffmpeg} "${show_file}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "${audio_track}" | grep -i "5.1")
|
||||||
audio_5_7_1_2=$(${p_ffmpeg} "${show_file}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "${audio_track}" | grep -i "7.1")
|
audio_5_7_1_2=$(${p_ffmpeg} "${show_file}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "${audio_track}" | grep -i "7.1")
|
||||||
|
@ -301,6 +301,6 @@ else
|
||||||
# Increment variables
|
# Increment variables
|
||||||
convert_files=$(expr ${convert_files} + 1)
|
convert_files=$(expr ${convert_files} + 1)
|
||||||
track_init=$(expr ${track_num} + 1)
|
track_init=$(expr ${track_num} + 1)
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
18
src/ks-mp4
18
src/ks-mp4
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
# ks-mp4 (ks-tools) - Convert video to MP4 format #
|
# ks-mp4 (ks-tools) - Convert video to MP4 format #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
###############################################################
|
###############################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Global parameters
|
# Global parameters
|
||||||
dirTemp="/tmp"
|
dirTemp="/tmp"
|
||||||
|
@ -40,7 +40,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Funcion to show the name of file/folder from full path
|
# Funcion to show the name of file/folder from full path
|
||||||
# Sintax: extractFolderOrFile <full/path/file.txt>
|
# Syntax: extractFolderOrFile <full/path/file.txt>
|
||||||
function extractFolderOrFile() {
|
function extractFolderOrFile() {
|
||||||
pathToExtract="${1}/"
|
pathToExtract="${1}/"
|
||||||
findFolder=0
|
findFolder=0
|
||||||
|
@ -60,7 +60,7 @@ function extractFolderOrFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to remove extension from file
|
# Function to remove extension from file
|
||||||
# Sintax: removeExtension "<text>"
|
# Syntax: removeExtension "<text>"
|
||||||
function removeExtension() {
|
function removeExtension() {
|
||||||
wordToConvert=${1}
|
wordToConvert=${1}
|
||||||
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
||||||
|
@ -84,7 +84,7 @@ function removeExtension() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show files with spaces.
|
# Function to show files with spaces.
|
||||||
# Sintax: showFileWithSpace <file number>
|
# Syntax: showFileWithSpace <file number>
|
||||||
function showFileWithSpace() {
|
function showFileWithSpace() {
|
||||||
echo "${1}" > ${dirTemp}/name.tmp
|
echo "${1}" > ${dirTemp}/name.tmp
|
||||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||||
|
@ -93,7 +93,7 @@ function showFileWithSpace() {
|
||||||
echo ${DisplayName}
|
echo ${DisplayName}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Sintax: ks-mp4 </absolute/path/video.mkv> </path/prefix_name>
|
# Syntax: ks-mp4 </absolute/path/video.mkv> </path/prefix_name>
|
||||||
if [ -z "${1}" ] ; then
|
if [ -z "${1}" ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-mp4 (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-mp4 (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
|
@ -112,7 +112,7 @@ if [ -z "${1}" ] ; then
|
||||||
echo " - Default Subtitle: ${default_lang_subt} (forced)"
|
echo " - Default Subtitle: ${default_lang_subt} (forced)"
|
||||||
echo " - Container: ${v_ext}"
|
echo " - Container: ${v_ext}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax: "
|
echo "+ Syntax: "
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-mp4 </absolute/path/video.mkv> </path/prefix_name>"
|
echo " $ ks-mp4 </absolute/path/video.mkv> </path/prefix_name>"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -166,7 +166,7 @@ if [ -z "${2}" ] ; then
|
||||||
echo " - Default Subtitle: ${default_lang_subt} (forced)"
|
echo " - Default Subtitle: ${default_lang_subt} (forced)"
|
||||||
echo " - Container: ${v_ext}"
|
echo " - Container: ${v_ext}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax: "
|
echo "+ Syntax: "
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-mp4 </absolute/path/video.mkv> </path/prefix_name>"
|
echo " $ ks-mp4 </absolute/path/video.mkv> </path/prefix_name>"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
18
src/ks-mp4k
18
src/ks-mp4k
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
# ks-mp4k (ks-tools) - Convert video to MP4 format (4K) #
|
# ks-mp4k (ks-tools) - Convert video to MP4 format (4K) #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
###############################################################
|
###############################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Global parameters
|
# Global parameters
|
||||||
dirTemp="/tmp"
|
dirTemp="/tmp"
|
||||||
|
@ -40,7 +40,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Funcion to show the name of file/folder from full path
|
# Funcion to show the name of file/folder from full path
|
||||||
# Sintax: extractFolderOrFile <full/path/file.txt>
|
# Syntax: extractFolderOrFile <full/path/file.txt>
|
||||||
function extractFolderOrFile() {
|
function extractFolderOrFile() {
|
||||||
pathToExtract="${1}/"
|
pathToExtract="${1}/"
|
||||||
findFolder=0
|
findFolder=0
|
||||||
|
@ -60,7 +60,7 @@ function extractFolderOrFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to remove extension from file
|
# Function to remove extension from file
|
||||||
# Sintax: removeExtension "<text>"
|
# Syntax: removeExtension "<text>"
|
||||||
function removeExtension() {
|
function removeExtension() {
|
||||||
wordToConvert=${1}
|
wordToConvert=${1}
|
||||||
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
||||||
|
@ -84,7 +84,7 @@ function removeExtension() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show files with spaces.
|
# Function to show files with spaces.
|
||||||
# Sintax: showFileWithSpace <file number>
|
# Syntax: showFileWithSpace <file number>
|
||||||
function showFileWithSpace() {
|
function showFileWithSpace() {
|
||||||
echo "${1}" > ${dirTemp}/name.tmp
|
echo "${1}" > ${dirTemp}/name.tmp
|
||||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||||
|
@ -93,7 +93,7 @@ function showFileWithSpace() {
|
||||||
echo ${DisplayName}
|
echo ${DisplayName}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Sintax: ks-mp4k </absolute/path/video.mkv> </path/prefix_name>
|
# Syntax: ks-mp4k </absolute/path/video.mkv> </path/prefix_name>
|
||||||
if [ -z "${1}" ] ; then
|
if [ -z "${1}" ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-mp4k (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-mp4k (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
|
@ -112,7 +112,7 @@ if [ -z "${1}" ] ; then
|
||||||
echo " - Default Subtitle: ${default_lang_subt} (forced)"
|
echo " - Default Subtitle: ${default_lang_subt} (forced)"
|
||||||
echo " - Container: ${v_ext}"
|
echo " - Container: ${v_ext}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax: "
|
echo "+ Syntax: "
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-mp4k </absolute/path/video.mkv> </path/prefix_name>"
|
echo " $ ks-mp4k </absolute/path/video.mkv> </path/prefix_name>"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -166,7 +166,7 @@ if [ -z "${2}" ] ; then
|
||||||
echo " - Default Subtitle: ${default_lang_subt} (forced)"
|
echo " - Default Subtitle: ${default_lang_subt} (forced)"
|
||||||
echo " - Container: ${v_ext}"
|
echo " - Container: ${v_ext}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax: "
|
echo "+ Syntax: "
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-mp4k </absolute/path/video.mkv> </path/prefix_name>"
|
echo " $ ks-mp4k </absolute/path/video.mkv> </path/prefix_name>"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
18
src/ks-mp4s
18
src/ks-mp4s
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
# ks-mp4s (ks-tools) - Convert video to MP4 format (Series) #
|
# ks-mp4s (ks-tools) - Convert video to MP4 format (Series) #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
###############################################################
|
###############################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Global parameters
|
# Global parameters
|
||||||
dirTemp="/tmp"
|
dirTemp="/tmp"
|
||||||
|
@ -40,7 +40,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Funcion to show the name of file/folder from full path
|
# Funcion to show the name of file/folder from full path
|
||||||
# Sintax: extractFolderOrFile <full/path/file.txt>
|
# Syntax: extractFolderOrFile <full/path/file.txt>
|
||||||
function extractFolderOrFile() {
|
function extractFolderOrFile() {
|
||||||
pathToExtract="${1}/"
|
pathToExtract="${1}/"
|
||||||
findFolder=0
|
findFolder=0
|
||||||
|
@ -60,7 +60,7 @@ function extractFolderOrFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to remove extension from file
|
# Function to remove extension from file
|
||||||
# Sintax: removeExtension "<text>"
|
# Syntax: removeExtension "<text>"
|
||||||
function removeExtension() {
|
function removeExtension() {
|
||||||
wordToConvert=${1}
|
wordToConvert=${1}
|
||||||
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
||||||
|
@ -84,7 +84,7 @@ function removeExtension() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show files with spaces.
|
# Function to show files with spaces.
|
||||||
# Sintax: showFileWithSpace <file number>
|
# Syntax: showFileWithSpace <file number>
|
||||||
function showFileWithSpace() {
|
function showFileWithSpace() {
|
||||||
echo "${1}" > ${dirTemp}/name.tmp
|
echo "${1}" > ${dirTemp}/name.tmp
|
||||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||||
|
@ -93,7 +93,7 @@ function showFileWithSpace() {
|
||||||
echo ${DisplayName}
|
echo ${DisplayName}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Sintax: ks-mp4s </absolute/path/video.mkv> </path/prefix_name>
|
# Syntax: ks-mp4s </absolute/path/video.mkv> </path/prefix_name>
|
||||||
if [ -z "${1}" ] ; then
|
if [ -z "${1}" ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-mp4s (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-mp4s (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
|
@ -112,7 +112,7 @@ if [ -z "${1}" ] ; then
|
||||||
echo " - Default Subtitle: ${default_lang_subt} (forced)"
|
echo " - Default Subtitle: ${default_lang_subt} (forced)"
|
||||||
echo " - Container: ${v_ext}"
|
echo " - Container: ${v_ext}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax: "
|
echo "+ Syntax: "
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-mp4s </absolute/path/video.mkv> </path/prefix_name>"
|
echo " $ ks-mp4s </absolute/path/video.mkv> </path/prefix_name>"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -166,7 +166,7 @@ if [ -z "${2}" ] ; then
|
||||||
echo " - Default Subtitle: ${default_lang_subt} (forced)"
|
echo " - Default Subtitle: ${default_lang_subt} (forced)"
|
||||||
echo " - Container: ${v_ext}"
|
echo " - Container: ${v_ext}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax: "
|
echo "+ Syntax: "
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-mp4s </absolute/path/video.mkv> </path/prefix_name>"
|
echo " $ ks-mp4s </absolute/path/video.mkv> </path/prefix_name>"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
#################################################################################
|
#################################################################################
|
||||||
# ks-mp4s-folder (ks-tools) - Convert videos from folder to MP4 format (Series) #
|
# ks-mp4s-folder (ks-tools) - Convert videos from folder to MP4 format (Series) #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
#################################################################################
|
#################################################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
tempFile="/tmp/ks-mp4s-folder.txt"
|
tempFile="/tmp/ks-mp4s-folder.txt"
|
||||||
|
@ -21,7 +21,7 @@ if [ -z "${1}" ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Convert videos from folder to MP4 format (Series)"
|
echo "- Convert videos from folder to MP4 format (Series)"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax: "
|
echo "+ Syntax: "
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-mp4s-folder </path/folder> [subs]"
|
echo " $ ks-mp4s-folder </path/folder> [subs]"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
18
src/ks-oga
18
src/ks-oga
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
# ks-oga (ks-tools) - Convert video/audio file(s) to OGA (OGG Audio) Format #
|
# ks-oga (ks-tools) - Convert video/audio file(s) to OGA (OGG Audio) Format #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
#############################################################################
|
#############################################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Global parameters
|
# Global parameters
|
||||||
dirTemp="/tmp"
|
dirTemp="/tmp"
|
||||||
|
@ -33,7 +33,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Funcion to show the name of file/folder from full path
|
# Funcion to show the name of file/folder from full path
|
||||||
# Sintax: extractFolderOrFile <full/path/file.txt>
|
# Syntax: extractFolderOrFile <full/path/file.txt>
|
||||||
function extractFolderOrFile() {
|
function extractFolderOrFile() {
|
||||||
pathToExtract="${1}/"
|
pathToExtract="${1}/"
|
||||||
findFolder=0
|
findFolder=0
|
||||||
|
@ -53,7 +53,7 @@ function extractFolderOrFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to remove extension from file
|
# Function to remove extension from file
|
||||||
# Sintax: removeExtension "<text>"
|
# Syntax: removeExtension "<text>"
|
||||||
function removeExtension() {
|
function removeExtension() {
|
||||||
wordToConvert=${1}
|
wordToConvert=${1}
|
||||||
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
||||||
|
@ -86,7 +86,7 @@ function removeExtension() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show files with spaces.
|
# Function to show files with spaces.
|
||||||
# Sintax: showFileWithSpace <file number>
|
# Syntax: showFileWithSpace <file number>
|
||||||
function showFileWithSpace() {
|
function showFileWithSpace() {
|
||||||
echo "${1}" > ${dirTemp}/name.tmp
|
echo "${1}" > ${dirTemp}/name.tmp
|
||||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||||
|
@ -109,7 +109,7 @@ function showFileWithSpace() {
|
||||||
echo ${DisplayName}
|
echo ${DisplayName}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Sintax: ks-oga </absolute/path/song.mp3> </path/prefix_name>
|
# Syntax: ks-oga </absolute/path/song.mp3> </path/prefix_name>
|
||||||
if [ -z "${1}" ] ; then
|
if [ -z "${1}" ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-oga (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-oga (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
|
@ -122,7 +122,7 @@ if [ -z "${1}" ] ; then
|
||||||
echo " - Bitrate audio: ${b_acodec}"
|
echo " - Bitrate audio: ${b_acodec}"
|
||||||
echo " - Container: ${v_ext}"
|
echo " - Container: ${v_ext}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax: "
|
echo "+ Syntax: "
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-oga </absolute/path/song.mp3> </path/prefix_name>"
|
echo " $ ks-oga </absolute/path/song.mp3> </path/prefix_name>"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -158,7 +158,7 @@ if [ -z "${2}" ] ; then
|
||||||
echo " - Bitrate audio: ${b_acodec}"
|
echo " - Bitrate audio: ${b_acodec}"
|
||||||
echo " - Container: ${v_ext}"
|
echo " - Container: ${v_ext}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax: "
|
echo "+ Syntax: "
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-oga </absolute/path/song.mp3> </path/prefix_name>"
|
echo " $ ks-oga </absolute/path/song.mp3> </path/prefix_name>"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
130
src/ks-oga-album
130
src/ks-oga-album
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
# ks-oga-album (ks-tools) - Convert folder album to OGA (OGG Audio) Format #
|
# ks-oga-album (ks-tools) - Convert folder album to OGA (OGG Audio) Format #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
############################################################################
|
############################################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Variables
|
# Variables
|
||||||
tempFile="/tmp/ks-mp4s-folder.txt"
|
tempFile="/tmp/ks-mp4s-folder.txt"
|
||||||
|
@ -40,7 +40,7 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Funcion to show the name of file/folder from full path
|
# Funcion to show the name of file/folder from full path
|
||||||
# Sintax: extractFolderOrFile <full/path/file.txt>
|
# Syntax: extractFolderOrFile <full/path/file.txt>
|
||||||
function extractFolderOrFile() {
|
function extractFolderOrFile() {
|
||||||
pathToExtract="${1}/"
|
pathToExtract="${1}/"
|
||||||
findFolder=0
|
findFolder=0
|
||||||
|
@ -60,7 +60,7 @@ function extractFolderOrFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show files with spaces.
|
# Function to show files with spaces.
|
||||||
# Sintax: showFileWithSpace <file number>
|
# Syntax: showFileWithSpace <file number>
|
||||||
function showFileWithSpace() {
|
function showFileWithSpace() {
|
||||||
echo "${1}" > ${dirTemp}/name.tmp
|
echo "${1}" > ${dirTemp}/name.tmp
|
||||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||||
|
@ -84,7 +84,7 @@ function showFileWithSpace() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to remove extension from file
|
# Function to remove extension from file
|
||||||
# Sintax: removeExtension "<text>"
|
# Syntax: removeExtension "<text>"
|
||||||
function removeExtension() {
|
function removeExtension() {
|
||||||
wordToConvert=${1}
|
wordToConvert=${1}
|
||||||
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
||||||
|
@ -116,7 +116,7 @@ function removeExtension() {
|
||||||
echo ${wordToConvert}
|
echo ${wordToConvert}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Sintax: ks-oga </absolute/path/song.mp3> </path/prefix_name>
|
# Syntax: ks-oga </absolute/path/song.mp3> </path/prefix_name>
|
||||||
if [ -z "${1}" ] ; then
|
if [ -z "${1}" ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-oga-album (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-oga-album (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
|
@ -129,7 +129,7 @@ if [ -z "${1}" ] ; then
|
||||||
echo " - Bitrate audio: ${b_acodec}"
|
echo " - Bitrate audio: ${b_acodec}"
|
||||||
echo " - Container: ${v_ext}"
|
echo " - Container: ${v_ext}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax: "
|
echo "+ Syntax: "
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-oga </absolute/path/album>"
|
echo " $ ks-oga </absolute/path/album>"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -140,14 +140,14 @@ fi
|
||||||
|
|
||||||
# Check if folder exist
|
# Check if folder exist
|
||||||
if [ -d "${1}" ] ; then
|
if [ -d "${1}" ] ; then
|
||||||
echo null > /dev/null
|
echo null > /dev/null
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-oga-album (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-oga-album (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ The folder '${1}' does not exist!"
|
echo "+ The folder '${1}' does not exist!"
|
||||||
echo ""
|
echo ""
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Scan videos/audio files format
|
# Scan videos/audio files format
|
||||||
|
@ -161,14 +161,14 @@ echo -n "* Scanning ${1} " && sleep 4
|
||||||
echo ""
|
echo ""
|
||||||
rm -rf ${tempFile} && touch ${tempFile}
|
rm -rf ${tempFile} && touch ${tempFile}
|
||||||
for format in ${formatFiles} ; do
|
for format in ${formatFiles} ; do
|
||||||
find "${1}"/*.${format} &> ${tempFileTest}
|
find "${1}"/*.${format} &> ${tempFileTest}
|
||||||
if [ $? -ne 0 ] ; then
|
if [ $? -ne 0 ] ; then
|
||||||
echo "null" > /dev/null
|
echo "null" > /dev/null
|
||||||
else
|
else
|
||||||
echo "+ Video file(s) in .${format} found!"
|
echo "+ Video file(s) in .${format} found!"
|
||||||
cd "${1}" && ls -1 *.${format} &>> ${tempFile}
|
cd "${1}" && ls -1 *.${format} &>> ${tempFile}
|
||||||
fail=0
|
fail=0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Set the global metadata album
|
# Set the global metadata album
|
||||||
|
@ -199,34 +199,34 @@ fi
|
||||||
convert_files=1
|
convert_files=1
|
||||||
num_files=$(cat ${tempFile} | wc -l)
|
num_files=$(cat ${tempFile} | wc -l)
|
||||||
if [ ${num_files} -eq 0 ] ; then
|
if [ ${num_files} -eq 0 ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ No video/audio file(s) found in folder '${1}"
|
echo "+ No video/audio file(s) found in folder '${1}"
|
||||||
echo ""
|
echo ""
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
echo "* List of files:"
|
echo "* List of files:"
|
||||||
echo ""
|
echo ""
|
||||||
while [ ${convert_files} -le ${num_files} ] ; do
|
while [ ${convert_files} -le ${num_files} ] ; do
|
||||||
show_file=$(cat ${tempFile} | head -${convert_files} | tail -1)
|
show_file=$(cat ${tempFile} | head -${convert_files} | tail -1)
|
||||||
echo " + ${show_file}"
|
echo " + ${show_file}"
|
||||||
convert_files=$(expr ${convert_files} + 1)
|
convert_files=$(expr ${convert_files} + 1)
|
||||||
done
|
done
|
||||||
echo ""
|
echo ""
|
||||||
echo "* The output folder will be '${1}/to-oga'"
|
echo "* The output folder will be '${1}/to-oga'"
|
||||||
# Execute commands for conversion
|
# Execute commands for conversion
|
||||||
echo ""
|
echo ""
|
||||||
echo -n "* (Default: y) Do you want run the conversion? (y/n): " ; read run_commands_ffmpeg
|
echo -n "* (Default: y) Do you want run the conversion? (y/n): " ; read run_commands_ffmpeg
|
||||||
if [ "${run_commands_ffmpeg}" == "n" ] ; then
|
if [ "${run_commands_ffmpeg}" == "n" ] ; then
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
convert_files=1
|
convert_files=1
|
||||||
cd "${1}" && mkdir -p to-oga && rm -rf to-oga/*
|
cd "${1}" && mkdir -p to-oga && rm -rf to-oga/*
|
||||||
while [ ${convert_files} -le ${num_files} ] ; do
|
while [ ${convert_files} -le ${num_files} ] ; do
|
||||||
show_file=$(cat ${tempFile} | head -${convert_files} | tail -1)
|
show_file=$(cat ${tempFile} | head -${convert_files} | tail -1)
|
||||||
fname=$(echo "${show_file}" | cut -d "." -f 1)
|
fname=$(echo "${show_file}" | cut -d "." -f 1)
|
||||||
name_title_default=$(removeExtension "${show_file}")
|
name_title_default=$(removeExtension "${show_file}")
|
||||||
name_title_default=$(showFileWithSpace "${name_title_default}")
|
name_title_default=$(showFileWithSpace "${name_title_default}")
|
||||||
echo ""
|
echo ""
|
||||||
echo "* METADATA for '${show_file}'"
|
echo "* METADATA for '${show_file}'"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -270,24 +270,24 @@ else
|
||||||
audio_track="${audio_track}"
|
audio_track="${audio_track}"
|
||||||
fi
|
fi
|
||||||
echo -n "* (Default: ${name_title_default}) Type name of title: " ; read name_title
|
echo -n "* (Default: ${name_title_default}) Type name of title: " ; read name_title
|
||||||
if [ -z "${name_title}" ] ; then
|
if [ -z "${name_title}" ] ; then
|
||||||
name_title="${name_title_default}"
|
name_title="${name_title_default}"
|
||||||
else
|
else
|
||||||
name_title="${name_title}"
|
name_title="${name_title}"
|
||||||
fi
|
fi
|
||||||
echo -n "* (Default: ${track_init}) Type number of track: " ; read track_file
|
echo -n "* (Default: ${track_init}) Type number of track: " ; read track_file
|
||||||
if [ -z "${track_file}" ] ; then
|
if [ -z "${track_file}" ] ; then
|
||||||
track_num="${track_init}"
|
track_num="${track_init}"
|
||||||
else
|
else
|
||||||
track_num="${track_file}"
|
track_num="${track_file}"
|
||||||
fi
|
fi
|
||||||
echo -n "* (Default: ${artist_init}) Type name of artist: " ; read artist_file
|
echo -n "* (Default: ${artist_init}) Type name of artist: " ; read artist_file
|
||||||
if [ -z "${artist_file}" ] ; then
|
if [ -z "${artist_file}" ] ; then
|
||||||
artist_title="${artist_init}"
|
artist_title="${artist_init}"
|
||||||
else
|
else
|
||||||
artist_title="${artist_file}"
|
artist_title="${artist_file}"
|
||||||
artist_init="${artist_file}"
|
artist_init="${artist_file}"
|
||||||
fi
|
fi
|
||||||
# Check audio 5.1 or 7.1
|
# Check audio 5.1 or 7.1
|
||||||
audio_5_7_1=$(${p_ffmpeg} "${show_file}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "${audio_track}" | grep -i "5.1")
|
audio_5_7_1=$(${p_ffmpeg} "${show_file}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "${audio_track}" | grep -i "5.1")
|
||||||
audio_5_7_1_2=$(${p_ffmpeg} "${show_file}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "${audio_track}" | grep -i "7.1")
|
audio_5_7_1_2=$(${p_ffmpeg} "${show_file}" 2>&1 | grep Stream | tr -s " " | grep "Audio:" | grep "${audio_track}" | grep -i "7.1")
|
||||||
|
@ -301,6 +301,6 @@ else
|
||||||
# Increment variables
|
# Increment variables
|
||||||
convert_files=$(expr ${convert_files} + 1)
|
convert_files=$(expr ${convert_files} + 1)
|
||||||
track_init=$(expr ${track_num} + 1)
|
track_init=$(expr ${track_num} + 1)
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
32
src/ks-upa
32
src/ks-upa
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
#####################################################################
|
#####################################################################
|
||||||
# ks-upa (ks-tools) - Upload audio file(s) to server with rsync+ssh #
|
# ks-upa (ks-tools) - Upload audio file(s) to server with rsync+ssh #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
#####################################################################
|
#####################################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Global parameters.
|
# Global parameters.
|
||||||
dirTemp="/tmp"
|
dirTemp="/tmp"
|
||||||
|
@ -18,7 +18,7 @@ dirConfig="$HOME/.ks-tools"
|
||||||
ksToolsTempFolder="/tmp/ks-tools"
|
ksToolsTempFolder="/tmp/ks-tools"
|
||||||
|
|
||||||
# Function to remove spaces and symbols
|
# Function to remove spaces and symbols
|
||||||
# Sintaxis: convertText "<text>"
|
# Syntax: convertText "<text>"
|
||||||
function convertText() {
|
function convertText() {
|
||||||
wordToConvert=${1}
|
wordToConvert=${1}
|
||||||
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
||||||
|
@ -45,7 +45,7 @@ function convertText() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to list the files of a directory.
|
# Function to list the files of a directory.
|
||||||
# Sintax: listArchives <directory>
|
# Syntax: listArchives <directory>
|
||||||
function listArchives() {
|
function listArchives() {
|
||||||
fail=1
|
fail=1
|
||||||
formatFiles="mp3 wma ogg wav flac midi acc oga opus mp2 ra m4a mka"
|
formatFiles="mp3 wma ogg wav flac midi acc oga opus mp2 ra m4a mka"
|
||||||
|
@ -95,7 +95,7 @@ function countArchives() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show files with spaces.
|
# Function to show files with spaces.
|
||||||
# Sintax: showFileWithSpace <file number>
|
# Syntax: showFileWithSpace <file number>
|
||||||
function showFileWithSpace() {
|
function showFileWithSpace() {
|
||||||
FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
|
FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
|
||||||
FileNoExtension=$(echo $FileName | cut -d "." -f 1)
|
FileNoExtension=$(echo $FileName | cut -d "." -f 1)
|
||||||
|
@ -107,21 +107,21 @@ function showFileWithSpace() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show the name of the file.
|
# Function to show the name of the file.
|
||||||
# Sintax: showFile <file number>
|
# Syntax: showFile <file number>
|
||||||
function showFile() {
|
function showFile() {
|
||||||
archive=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
|
archive=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
|
||||||
echo ${archive}
|
echo ${archive}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show full file path.
|
# Function to show full file path.
|
||||||
# Sintax: showPathFile <file number>
|
# Syntax: showPathFile <file number>
|
||||||
function showPathFile() {
|
function showPathFile() {
|
||||||
pathFile=$(cat ${dirTemp}/${listCompTemp} | head -${1} | tail -1)
|
pathFile=$(cat ${dirTemp}/${listCompTemp} | head -${1} | tail -1)
|
||||||
echo ${pathFile}
|
echo ${pathFile}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to send file to server.
|
# Function to send file to server.
|
||||||
# Sintax: sendFile <password> <file path> <user> <server> <server path> [file name]
|
# Syntax: sendFile <password> <file path> <user> <server> <server path> [file name]
|
||||||
function sendFile() {
|
function sendFile() {
|
||||||
correct=0
|
correct=0
|
||||||
countSend=0
|
countSend=0
|
||||||
|
@ -148,7 +148,7 @@ function sendFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to check local and server checksum.
|
# Function to check local and server checksum.
|
||||||
# Sintax: checkChecksum <password> <local file path> <user> <server> <server file path>
|
# Syntax: checkChecksum <password> <local file path> <user> <server> <server file path>
|
||||||
function checkChecksum() {
|
function checkChecksum() {
|
||||||
correct=0
|
correct=0
|
||||||
countChecksum=0
|
countChecksum=0
|
||||||
|
@ -280,7 +280,7 @@ function showHelp() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Upload audio file(s) to server with rsync+ssh"
|
echo "- Upload audio file(s) to server with rsync+ssh"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax:"
|
echo "+ Syntax:"
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-upa -i - Start upload"
|
echo " $ ks-upa -i - Start upload"
|
||||||
echo " $ ks-upa -r - Remove configuration"
|
echo " $ ks-upa -r - Remove configuration"
|
||||||
|
@ -357,16 +357,16 @@ fi
|
||||||
# Show configuration file
|
# Show configuration file
|
||||||
if [ "$1" == "-c" ] ; then
|
if [ "$1" == "-c" ] ; then
|
||||||
showConfig
|
showConfig
|
||||||
# Show configuration file
|
# Show configuration file
|
||||||
elif [ "$1" == "-e" ] ; then
|
elif [ "$1" == "-e" ] ; then
|
||||||
editConfig
|
editConfig
|
||||||
# Show the version
|
# Show the version
|
||||||
elif [ "$1" == "-v" ] ; then
|
elif [ "$1" == "-v" ] ; then
|
||||||
showVersion
|
showVersion
|
||||||
# Show the help
|
# Show the help
|
||||||
elif [ "$1" == "-h" ] ; then
|
elif [ "$1" == "-h" ] ; then
|
||||||
showHelp
|
showHelp
|
||||||
# Init
|
# Init
|
||||||
elif [ "$1" == "-i" ] ; then
|
elif [ "$1" == "-i" ] ; then
|
||||||
# Start script
|
# Start script
|
||||||
clear
|
clear
|
||||||
|
@ -438,7 +438,7 @@ elif [ "$1" == "-i" ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
# Show help
|
# Show help
|
||||||
else
|
else
|
||||||
showHelp
|
showHelp
|
||||||
fi
|
fi
|
||||||
|
|
32
src/ks-upf
32
src/ks-upf
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# ks-upf (ks-tools) - Upload common file(s) to server with rsync+ssh #
|
# ks-upf (ks-tools) - Upload common file(s) to server with rsync+ssh #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
######################################################################
|
######################################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Global parameters.
|
# Global parameters.
|
||||||
dirTemp="/tmp"
|
dirTemp="/tmp"
|
||||||
|
@ -18,7 +18,7 @@ dirConfig="$HOME/.ks-tools"
|
||||||
ksToolsTempFolder="/tmp/ks-tools"
|
ksToolsTempFolder="/tmp/ks-tools"
|
||||||
|
|
||||||
# Function to remove spaces and symbols
|
# Function to remove spaces and symbols
|
||||||
# Sintaxis: convertText "<text>"
|
# Syntax: convertText "<text>"
|
||||||
function convertText() {
|
function convertText() {
|
||||||
wordToConvert=${1}
|
wordToConvert=${1}
|
||||||
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
||||||
|
@ -45,7 +45,7 @@ function convertText() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to list the files of a directory.
|
# Function to list the files of a directory.
|
||||||
# Sintax: listArchives <directory>
|
# Syntax: listArchives <directory>
|
||||||
function listArchives() {
|
function listArchives() {
|
||||||
fail=1
|
fail=1
|
||||||
formatFiles=""
|
formatFiles=""
|
||||||
|
@ -113,7 +113,7 @@ function countArchives() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show files with spaces.
|
# Function to show files with spaces.
|
||||||
# Sintax: showFileWithSpace <file number>
|
# Syntax: showFileWithSpace <file number>
|
||||||
function showFileWithSpace() {
|
function showFileWithSpace() {
|
||||||
FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
|
FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
|
||||||
FileNoExtension=$(echo $FileName | cut -d "." -f 1)
|
FileNoExtension=$(echo $FileName | cut -d "." -f 1)
|
||||||
|
@ -125,21 +125,21 @@ function showFileWithSpace() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show the name of the file.
|
# Function to show the name of the file.
|
||||||
# Sintax: showFile <file number>
|
# Syntax: showFile <file number>
|
||||||
function showFile() {
|
function showFile() {
|
||||||
archive=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
|
archive=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
|
||||||
echo ${archive}
|
echo ${archive}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show full file path.
|
# Function to show full file path.
|
||||||
# Sintax: showPathFile <file number>
|
# Syntax: showPathFile <file number>
|
||||||
function showPathFile() {
|
function showPathFile() {
|
||||||
pathFile=$(cat ${dirTemp}/${listCompTemp} | head -${1} | tail -1)
|
pathFile=$(cat ${dirTemp}/${listCompTemp} | head -${1} | tail -1)
|
||||||
echo ${pathFile}
|
echo ${pathFile}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to send file to server.
|
# Function to send file to server.
|
||||||
# Sintax: sendFile <password> <file path> <user> <server> <server path> [file name]
|
# Syntax: sendFile <password> <file path> <user> <server> <server path> [file name]
|
||||||
function sendFile() {
|
function sendFile() {
|
||||||
correct=0
|
correct=0
|
||||||
countSend=0
|
countSend=0
|
||||||
|
@ -166,7 +166,7 @@ function sendFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to check local and server checksum.
|
# Function to check local and server checksum.
|
||||||
# Sintax: checkChecksum <password> <local file path> <user> <server> <server file path>
|
# Syntax: checkChecksum <password> <local file path> <user> <server> <server file path>
|
||||||
function checkChecksum() {
|
function checkChecksum() {
|
||||||
correct=0
|
correct=0
|
||||||
countChecksum=0
|
countChecksum=0
|
||||||
|
@ -298,7 +298,7 @@ function showHelp() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Upload common file(s) to server with rsync+ssh"
|
echo "- Upload common file(s) to server with rsync+ssh"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax:"
|
echo "+ Syntax:"
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-upf -i - Start upload"
|
echo " $ ks-upf -i - Start upload"
|
||||||
echo " $ ks-upf -r - Remove configuration"
|
echo " $ ks-upf -r - Remove configuration"
|
||||||
|
@ -375,16 +375,16 @@ fi
|
||||||
# Show configuration file
|
# Show configuration file
|
||||||
if [ "$1" == "-c" ] ; then
|
if [ "$1" == "-c" ] ; then
|
||||||
showConfig
|
showConfig
|
||||||
# Show configuration file
|
# Show configuration file
|
||||||
elif [ "$1" == "-e" ] ; then
|
elif [ "$1" == "-e" ] ; then
|
||||||
editConfig
|
editConfig
|
||||||
# Show the version
|
# Show the version
|
||||||
elif [ "$1" == "-v" ] ; then
|
elif [ "$1" == "-v" ] ; then
|
||||||
showVersion
|
showVersion
|
||||||
# Show the help
|
# Show the help
|
||||||
elif [ "$1" == "-h" ] ; then
|
elif [ "$1" == "-h" ] ; then
|
||||||
showHelp
|
showHelp
|
||||||
# Init
|
# Init
|
||||||
elif [ "$1" == "-i" ] ; then
|
elif [ "$1" == "-i" ] ; then
|
||||||
# Start script
|
# Start script
|
||||||
clear
|
clear
|
||||||
|
@ -456,7 +456,7 @@ elif [ "$1" == "-i" ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
# Show help
|
# Show help
|
||||||
else
|
else
|
||||||
showHelp
|
showHelp
|
||||||
fi
|
fi
|
||||||
|
|
20
src/ks-upr
20
src/ks-upr
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# ks-upr (ks-tools) - Upload recursively file(s) to server with rsync+ssh #
|
# ks-upr (ks-tools) - Upload recursively file(s) to server with rsync+ssh #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
###########################################################################
|
###########################################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Global parameters.
|
# Global parameters.
|
||||||
dirTemp="/tmp"
|
dirTemp="/tmp"
|
||||||
|
@ -18,7 +18,7 @@ dirConfig="$HOME/.ks-tools"
|
||||||
ksToolsTempFolder="/tmp/ks-tools"
|
ksToolsTempFolder="/tmp/ks-tools"
|
||||||
|
|
||||||
# Function to remove spaces and symbols
|
# Function to remove spaces and symbols
|
||||||
# Sintaxis: convertText "<text>"
|
# Syntax: convertText "<text>"
|
||||||
function convertText() {
|
function convertText() {
|
||||||
wordToConvert=${1}
|
wordToConvert=${1}
|
||||||
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
||||||
|
@ -45,7 +45,7 @@ function convertText() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to list the files of a directory.
|
# Function to list the files of a directory.
|
||||||
# Sintax: listArchives <directory>
|
# Syntax: listArchives <directory>
|
||||||
function listArchives() {
|
function listArchives() {
|
||||||
fail=1
|
fail=1
|
||||||
formatFiles=""
|
formatFiles=""
|
||||||
|
@ -113,7 +113,7 @@ function countArchives() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show files with spaces.
|
# Function to show files with spaces.
|
||||||
# Sintax: showFileWithSpace <file number>
|
# Syntax: showFileWithSpace <file number>
|
||||||
function showFileWithSpace() {
|
function showFileWithSpace() {
|
||||||
FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
|
FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
|
||||||
FileNoExtension=$(echo $FileName | cut -d "." -f 1)
|
FileNoExtension=$(echo $FileName | cut -d "." -f 1)
|
||||||
|
@ -125,21 +125,21 @@ function showFileWithSpace() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show the name of the file.
|
# Function to show the name of the file.
|
||||||
# Sintax: showFile <file number>
|
# Syntax: showFile <file number>
|
||||||
function showFile() {
|
function showFile() {
|
||||||
archive=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
|
archive=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
|
||||||
echo ${archive}
|
echo ${archive}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show full file path.
|
# Function to show full file path.
|
||||||
# Sintax: showPathFile <file number>
|
# Syntax: showPathFile <file number>
|
||||||
function showPathFile() {
|
function showPathFile() {
|
||||||
pathFile=$(cat ${dirTemp}/${listCompTemp} | head -${1} | tail -1)
|
pathFile=$(cat ${dirTemp}/${listCompTemp} | head -${1} | tail -1)
|
||||||
echo ${pathFile}
|
echo ${pathFile}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to send file to server.
|
# Function to send file to server.
|
||||||
# Sintax: sendFile <password> <file path> <user> <server> <server path> [file name]
|
# Syntax: sendFile <password> <file path> <user> <server> <server path> [file name]
|
||||||
function sendFile() {
|
function sendFile() {
|
||||||
#sshpass -p ${1} scp ${2} ${3}@${4}:${5} &> /dev/null
|
#sshpass -p ${1} scp ${2} ${3}@${4}:${5} &> /dev/null
|
||||||
comandOne="sshpass -p ${1} rsync -azlr -e"
|
comandOne="sshpass -p ${1} rsync -azlr -e"
|
||||||
|
@ -254,7 +254,7 @@ function showHelp() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Upload recursively file(s) to server with rsync+ssh"
|
echo "- Upload recursively file(s) to server with rsync+ssh"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax:"
|
echo "+ Syntax:"
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-upf -i - Start upload"
|
echo " $ ks-upf -i - Start upload"
|
||||||
echo " $ ks-upf -r - Remove configuration"
|
echo " $ ks-upf -r - Remove configuration"
|
||||||
|
|
22
src/ks-upv
22
src/ks-upv
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# ks-upv (ks-tools) - Upload videos file(s) to server with rynsc+ssh #
|
# ks-upv (ks-tools) - Upload videos file(s) to server with rynsc+ssh #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
######################################################################
|
######################################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Global parameters.
|
# Global parameters.
|
||||||
dirTemp="/tmp"
|
dirTemp="/tmp"
|
||||||
|
@ -18,7 +18,7 @@ dirConfig="$HOME/.ks-tools"
|
||||||
ksToolsTempFolder="/tmp/ks-tools"
|
ksToolsTempFolder="/tmp/ks-tools"
|
||||||
|
|
||||||
# Function to remove spaces and symbols
|
# Function to remove spaces and symbols
|
||||||
# Sintaxis: convertText "<text>"
|
# Syntax: convertText "<text>"
|
||||||
function convertText() {
|
function convertText() {
|
||||||
wordToConvert=${1}
|
wordToConvert=${1}
|
||||||
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
||||||
|
@ -45,7 +45,7 @@ function convertText() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to list the files of a directory.
|
# Function to list the files of a directory.
|
||||||
# Sintax: listArchives <directory>
|
# Syntax: listArchives <directory>
|
||||||
function listArchives() {
|
function listArchives() {
|
||||||
fail=1
|
fail=1
|
||||||
formatFiles="mp4 avi mpg mpeg mov wmv mkv ogv webm rm flv vob ts"
|
formatFiles="mp4 avi mpg mpeg mov wmv mkv ogv webm rm flv vob ts"
|
||||||
|
@ -95,7 +95,7 @@ function countArchives() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show files with spaces.
|
# Function to show files with spaces.
|
||||||
# Sintax: showFileWithSpace <file number>
|
# Syntax: showFileWithSpace <file number>
|
||||||
function showFileWithSpace() {
|
function showFileWithSpace() {
|
||||||
FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
|
FileName=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
|
||||||
FileNoExtension=$(echo $FileName | cut -d "." -f 1)
|
FileNoExtension=$(echo $FileName | cut -d "." -f 1)
|
||||||
|
@ -107,21 +107,21 @@ function showFileWithSpace() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show the name of the file.
|
# Function to show the name of the file.
|
||||||
# Sintax: showFile <file number>
|
# Syntax: showFile <file number>
|
||||||
function showFile() {
|
function showFile() {
|
||||||
archive=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
|
archive=$(cat ${dirTemp}/${listTemp} | head -${1} | tail -1)
|
||||||
echo ${archive}
|
echo ${archive}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show full file path.
|
# Function to show full file path.
|
||||||
# Sintax: showPathFile <file number>
|
# Syntax: showPathFile <file number>
|
||||||
function showPathFile() {
|
function showPathFile() {
|
||||||
pathFile=$(cat ${dirTemp}/${listCompTemp} | head -${1} | tail -1)
|
pathFile=$(cat ${dirTemp}/${listCompTemp} | head -${1} | tail -1)
|
||||||
echo ${pathFile}
|
echo ${pathFile}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to send file to server.
|
# Function to send file to server.
|
||||||
# Sintax: sendFile <password> <file path> <user> <server> <server path> [file name]
|
# Syntax: sendFile <password> <file path> <user> <server> <server path> [file name]
|
||||||
function sendFile() {
|
function sendFile() {
|
||||||
correct=0
|
correct=0
|
||||||
countSend=0
|
countSend=0
|
||||||
|
@ -148,7 +148,7 @@ function sendFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to check local and server checksum.
|
# Function to check local and server checksum.
|
||||||
# Sintax: checkChecksum <password> <local file path> <user> <server> <server file path>
|
# Syntax: checkChecksum <password> <local file path> <user> <server> <server file path>
|
||||||
function checkChecksum() {
|
function checkChecksum() {
|
||||||
correct=0
|
correct=0
|
||||||
countChecksum=0
|
countChecksum=0
|
||||||
|
@ -280,7 +280,7 @@ function showHelp() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Upload videos file(s) to server with rynsc+ssh"
|
echo "- Upload videos file(s) to server with rynsc+ssh"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax:"
|
echo "+ Syntax:"
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-upv -i - Start upload"
|
echo " $ ks-upv -i - Start upload"
|
||||||
echo " $ ks-upv -r - Remove configuration"
|
echo " $ ks-upv -r - Remove configuration"
|
||||||
|
|
16
src/ks-vob
16
src/ks-vob
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
# ks-avi (ks-tools) - Convert video to VOB DVD Format #
|
# ks-avi (ks-tools) - Convert video to VOB DVD Format #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
###############################################################
|
###############################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Basic parameters
|
# Basic parameters
|
||||||
rel_size="720x480"
|
rel_size="720x480"
|
||||||
|
@ -30,13 +30,13 @@ if [ ${error_ffmpeg} -ne 0 ] ; then
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Sintax: ks-vob -f </absolute/path/video.mp4> </path/prefix_name>
|
# Syntax: ks-vob -f </absolute/path/video.mp4> </path/prefix_name>
|
||||||
if [ -z "${1}" ] ; then
|
if [ -z "${1}" ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "* ks-vob (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-vob (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Convert video file(s) to compact and efficient VOB"
|
echo "- Convert video file(s) to compact and efficient VOB"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Config:"
|
echo "+ Config:"
|
||||||
echo ""
|
echo ""
|
||||||
echo " - Resolution: ${rel_size}"
|
echo " - Resolution: ${rel_size}"
|
||||||
|
@ -48,7 +48,7 @@ if [ -z "${1}" ] ; then
|
||||||
echo " - Split: 30 minutes"
|
echo " - Split: 30 minutes"
|
||||||
echo " - Container: ${v_ext}"
|
echo " - Container: ${v_ext}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax: "
|
echo "+ Syntax: "
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-vob </absolute/path/video.mkv> </path/prefix_name>"
|
echo " $ ks-vob </absolute/path/video.mkv> </path/prefix_name>"
|
||||||
echo
|
echo
|
||||||
|
@ -76,7 +76,7 @@ if [ -z "${2}" ] ; then
|
||||||
echo "* ks-vob (ks-tools) v${VERSION} (${M_DATE})"
|
echo "* ks-vob (ks-tools) v${VERSION} (${M_DATE})"
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Convert video file(s) to compact and efficient VOB"
|
echo "- Convert video file(s) to compact and efficient VOB"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Config:"
|
echo "+ Config:"
|
||||||
echo ""
|
echo ""
|
||||||
echo " - Resolution: ${rel_size}"
|
echo " - Resolution: ${rel_size}"
|
||||||
|
@ -88,7 +88,7 @@ if [ -z "${2}" ] ; then
|
||||||
echo " - Split: 30 minutes"
|
echo " - Split: 30 minutes"
|
||||||
echo " - Container: ${v_ext}"
|
echo " - Container: ${v_ext}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax: "
|
echo "+ Syntax: "
|
||||||
echo ""
|
echo ""
|
||||||
echo " $ ks-vob </absolute/path/video.mkv> </path/prefix_name>"
|
echo " $ ks-vob </absolute/path/video.mkv> </path/prefix_name>"
|
||||||
echo
|
echo
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
# ks-avi-wrapper (ks-tools) - Wrapper for ks-avi #
|
# ks-avi-wrapper (ks-tools) - Wrapper for ks-avi #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
###############################################################
|
###############################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Conversion parameters
|
# Conversion parameters
|
||||||
ks_mp4_to_wrap="/usr/bin/ks-avi"
|
ks_mp4_to_wrap="/usr/bin/ks-avi"
|
||||||
|
@ -45,7 +45,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Funcion to show the name of file/folder from full path
|
# Funcion to show the name of file/folder from full path
|
||||||
# Sintax: extractFolderOrFile <full/path/file.txt>
|
# Syntax: extractFolderOrFile <full/path/file.txt>
|
||||||
function extractFolderOrFile() {
|
function extractFolderOrFile() {
|
||||||
pathToExtract="${1}/"
|
pathToExtract="${1}/"
|
||||||
findFolder=0
|
findFolder=0
|
||||||
|
@ -65,7 +65,7 @@ function extractFolderOrFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to remove extension from file
|
# Function to remove extension from file
|
||||||
# Sintax: removeExtension "<text>"
|
# Syntax: removeExtension "<text>"
|
||||||
function removeExtension() {
|
function removeExtension() {
|
||||||
wordToConvert=${1}
|
wordToConvert=${1}
|
||||||
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
||||||
|
@ -89,7 +89,7 @@ function removeExtension() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show files with spaces.
|
# Function to show files with spaces.
|
||||||
# Sintax: showFileWithSpace <file number>
|
# Syntax: showFileWithSpace <file number>
|
||||||
function showFileWithSpace() {
|
function showFileWithSpace() {
|
||||||
echo "${1}" > ${dirTemp}/name.tmp
|
echo "${1}" > ${dirTemp}/name.tmp
|
||||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||||
|
@ -99,7 +99,7 @@ function showFileWithSpace() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show info tracks of input video video file.
|
# Show info tracks of input video video file.
|
||||||
# Sintax: showInfo <video_file>
|
# Syntax: showInfo <video_file>
|
||||||
function showInfo() {
|
function showInfo() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "* Information of ${1}:"
|
echo "* Information of ${1}:"
|
||||||
|
@ -117,7 +117,7 @@ function showInfo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the video track default
|
# Show the video track default
|
||||||
# Sintax: showVideoDefault <video_file>
|
# Syntax: showVideoDefault <video_file>
|
||||||
function showVideoDefault() {
|
function showVideoDefault() {
|
||||||
# Check de video track by default
|
# 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 | 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)
|
||||||
|
@ -135,7 +135,7 @@ function showVideoDefault() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the audio track default
|
# Show the audio track default
|
||||||
# Sintax: showAudioDefault <video_file>
|
# Syntax: showAudioDefault <video_file>
|
||||||
function showAudioDefault() {
|
function showAudioDefault() {
|
||||||
# Check the audio track by default
|
# 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 | 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)
|
||||||
|
@ -163,7 +163,7 @@ function showAudioDefault() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the subtitle track default
|
# Show the subtitle track default
|
||||||
# Sintax: showSubtitleDefault <video_file>
|
# Syntax: showSubtitleDefault <video_file>
|
||||||
function showSubtitleDefault() {
|
function showSubtitleDefault() {
|
||||||
# Check the subtitle track by default
|
# 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 | 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)
|
||||||
|
@ -201,20 +201,20 @@ function showSubtitleDefault() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show default resolution
|
# Show default resolution
|
||||||
# Sintax: showResolutionDefault
|
# Syntax: showResolutionDefault
|
||||||
function showResolutionDefault() {
|
function showResolutionDefault() {
|
||||||
echo "${rel_size}"
|
echo "${rel_size}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show default year (METADATA)
|
# Show default year (METADATA)
|
||||||
# Sintax: showResolutionDefault
|
# Syntax: showResolutionDefault
|
||||||
function showYearDefault() {
|
function showYearDefault() {
|
||||||
current_date=$(date +%Y)
|
current_date=$(date +%Y)
|
||||||
echo "${current_date}"
|
echo "${current_date}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the name title default (MEDATA)
|
# Show the name title default (MEDATA)
|
||||||
# Sintax: showNameDefault <video_file>
|
# Syntax: showNameDefault <video_file>
|
||||||
function showNameDefault() {
|
function showNameDefault() {
|
||||||
# Prepare name title by default
|
# Prepare name title by default
|
||||||
FullPath="${1}"
|
FullPath="${1}"
|
||||||
|
@ -225,7 +225,7 @@ function showNameDefault() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the genre default (MEDATA)
|
# Show the genre default (MEDATA)
|
||||||
# Sintax: showGenreDefault
|
# Syntax: showGenreDefault
|
||||||
function showGenreDefault() {
|
function showGenreDefault() {
|
||||||
echo "Unknown"
|
echo "Unknown"
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ function showHelp() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Wrapper for ks-avi to create graphical interfaces"
|
echo "- Wrapper for ks-avi to create graphical interfaces"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax:"
|
echo "+ Syntax:"
|
||||||
echo ""
|
echo ""
|
||||||
echo " * TRACKS/CONFIG DETECT:"
|
echo " * TRACKS/CONFIG DETECT:"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
# ks-mp4-wrapper (ks-tools) - Wrapper for ks-mp4 #
|
# ks-mp4-wrapper (ks-tools) - Wrapper for ks-mp4 #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
###############################################################
|
###############################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Conversion parameters
|
# Conversion parameters
|
||||||
ks_mp4_to_wrap="/usr/bin/ks-mp4"
|
ks_mp4_to_wrap="/usr/bin/ks-mp4"
|
||||||
|
@ -45,7 +45,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Funcion to show the name of file/folder from full path
|
# Funcion to show the name of file/folder from full path
|
||||||
# Sintax: extractFolderOrFile <full/path/file.txt>
|
# Syntax: extractFolderOrFile <full/path/file.txt>
|
||||||
function extractFolderOrFile() {
|
function extractFolderOrFile() {
|
||||||
pathToExtract="${1}/"
|
pathToExtract="${1}/"
|
||||||
findFolder=0
|
findFolder=0
|
||||||
|
@ -65,7 +65,7 @@ function extractFolderOrFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to remove extension from file
|
# Function to remove extension from file
|
||||||
# Sintax: removeExtension "<text>"
|
# Syntax: removeExtension "<text>"
|
||||||
function removeExtension() {
|
function removeExtension() {
|
||||||
wordToConvert=${1}
|
wordToConvert=${1}
|
||||||
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
||||||
|
@ -89,7 +89,7 @@ function removeExtension() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show files with spaces.
|
# Function to show files with spaces.
|
||||||
# Sintax: showFileWithSpace <file number>
|
# Syntax: showFileWithSpace <file number>
|
||||||
function showFileWithSpace() {
|
function showFileWithSpace() {
|
||||||
echo "${1}" > ${dirTemp}/name.tmp
|
echo "${1}" > ${dirTemp}/name.tmp
|
||||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||||
|
@ -99,7 +99,7 @@ function showFileWithSpace() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show info tracks of input video video file.
|
# Show info tracks of input video video file.
|
||||||
# Sintax: showInfo <video_file>
|
# Syntax: showInfo <video_file>
|
||||||
function showInfo() {
|
function showInfo() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "* Information of ${1}:"
|
echo "* Information of ${1}:"
|
||||||
|
@ -117,7 +117,7 @@ function showInfo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the video track default
|
# Show the video track default
|
||||||
# Sintax: showVideoDefault <video_file>
|
# Syntax: showVideoDefault <video_file>
|
||||||
function showVideoDefault() {
|
function showVideoDefault() {
|
||||||
# Check de video track by default
|
# 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 | 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)
|
||||||
|
@ -135,7 +135,7 @@ function showVideoDefault() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the audio track default
|
# Show the audio track default
|
||||||
# Sintax: showAudioDefault <video_file>
|
# Syntax: showAudioDefault <video_file>
|
||||||
function showAudioDefault() {
|
function showAudioDefault() {
|
||||||
# Check the audio track by default
|
# 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 | 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)
|
||||||
|
@ -163,7 +163,7 @@ function showAudioDefault() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the subtitle track default
|
# Show the subtitle track default
|
||||||
# Sintax: showSubtitleDefault <video_file>
|
# Syntax: showSubtitleDefault <video_file>
|
||||||
function showSubtitleDefault() {
|
function showSubtitleDefault() {
|
||||||
# Check the subtitle track by default
|
# 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 | 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)
|
||||||
|
@ -201,20 +201,20 @@ function showSubtitleDefault() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show default resolution
|
# Show default resolution
|
||||||
# Sintax: showResolutionDefault
|
# Syntax: showResolutionDefault
|
||||||
function showResolutionDefault() {
|
function showResolutionDefault() {
|
||||||
echo "${rel_size}"
|
echo "${rel_size}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show default year (METADATA)
|
# Show default year (METADATA)
|
||||||
# Sintax: showResolutionDefault
|
# Syntax: showResolutionDefault
|
||||||
function showYearDefault() {
|
function showYearDefault() {
|
||||||
current_date=$(date +%Y)
|
current_date=$(date +%Y)
|
||||||
echo "${current_date}"
|
echo "${current_date}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the name title default (MEDATA)
|
# Show the name title default (MEDATA)
|
||||||
# Sintax: showNameDefault <video_file>
|
# Syntax: showNameDefault <video_file>
|
||||||
function showNameDefault() {
|
function showNameDefault() {
|
||||||
# Prepare name title by default
|
# Prepare name title by default
|
||||||
FullPath="${1}"
|
FullPath="${1}"
|
||||||
|
@ -225,7 +225,7 @@ function showNameDefault() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the genre default (MEDATA)
|
# Show the genre default (MEDATA)
|
||||||
# Sintax: showGenreDefault
|
# Syntax: showGenreDefault
|
||||||
function showGenreDefault() {
|
function showGenreDefault() {
|
||||||
echo "Unknown"
|
echo "Unknown"
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ function showHelp() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Wrapper for ks-mp4 to create graphical interfaces"
|
echo "- Wrapper for ks-mp4 to create graphical interfaces"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax:"
|
echo "+ Syntax:"
|
||||||
echo ""
|
echo ""
|
||||||
echo " * TRACKS/CONFIG DETECT:"
|
echo " * TRACKS/CONFIG DETECT:"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
# ks-mp4k-wrapper (ks-tools) - Wrapper for ks-mp4k #
|
# ks-mp4k-wrapper (ks-tools) - Wrapper for ks-mp4k #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
###############################################################
|
###############################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Conversion parameters
|
# Conversion parameters
|
||||||
ks_mp4_to_wrap="/usr/bin/ks-mp4k"
|
ks_mp4_to_wrap="/usr/bin/ks-mp4k"
|
||||||
|
@ -45,7 +45,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Funcion to show the name of file/folder from full path
|
# Funcion to show the name of file/folder from full path
|
||||||
# Sintax: extractFolderOrFile <full/path/file.txt>
|
# Syntax: extractFolderOrFile <full/path/file.txt>
|
||||||
function extractFolderOrFile() {
|
function extractFolderOrFile() {
|
||||||
pathToExtract="${1}/"
|
pathToExtract="${1}/"
|
||||||
findFolder=0
|
findFolder=0
|
||||||
|
@ -65,7 +65,7 @@ function extractFolderOrFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to remove extension from file
|
# Function to remove extension from file
|
||||||
# Sintax: removeExtension "<text>"
|
# Syntax: removeExtension "<text>"
|
||||||
function removeExtension() {
|
function removeExtension() {
|
||||||
wordToConvert=${1}
|
wordToConvert=${1}
|
||||||
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
||||||
|
@ -89,7 +89,7 @@ function removeExtension() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show files with spaces.
|
# Function to show files with spaces.
|
||||||
# Sintax: showFileWithSpace <file number>
|
# Syntax: showFileWithSpace <file number>
|
||||||
function showFileWithSpace() {
|
function showFileWithSpace() {
|
||||||
echo "${1}" > ${dirTemp}/name.tmp
|
echo "${1}" > ${dirTemp}/name.tmp
|
||||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||||
|
@ -99,7 +99,7 @@ function showFileWithSpace() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show info tracks of input video video file.
|
# Show info tracks of input video video file.
|
||||||
# Sintax: showInfo <video_file>
|
# Syntax: showInfo <video_file>
|
||||||
function showInfo() {
|
function showInfo() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "* Information of ${1}:"
|
echo "* Information of ${1}:"
|
||||||
|
@ -117,7 +117,7 @@ function showInfo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the video track default
|
# Show the video track default
|
||||||
# Sintax: showVideoDefault <video_file>
|
# Syntax: showVideoDefault <video_file>
|
||||||
function showVideoDefault() {
|
function showVideoDefault() {
|
||||||
# Check de video track by default
|
# 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 | 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)
|
||||||
|
@ -135,7 +135,7 @@ function showVideoDefault() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the audio track default
|
# Show the audio track default
|
||||||
# Sintax: showAudioDefault <video_file>
|
# Syntax: showAudioDefault <video_file>
|
||||||
function showAudioDefault() {
|
function showAudioDefault() {
|
||||||
# Check the audio track by default
|
# 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 | 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)
|
||||||
|
@ -163,7 +163,7 @@ function showAudioDefault() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the subtitle track default
|
# Show the subtitle track default
|
||||||
# Sintax: showSubtitleDefault <video_file>
|
# Syntax: showSubtitleDefault <video_file>
|
||||||
function showSubtitleDefault() {
|
function showSubtitleDefault() {
|
||||||
# Check the subtitle track by default
|
# 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 | 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)
|
||||||
|
@ -201,20 +201,20 @@ function showSubtitleDefault() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show default resolution
|
# Show default resolution
|
||||||
# Sintax: showResolutionDefault
|
# Syntax: showResolutionDefault
|
||||||
function showResolutionDefault() {
|
function showResolutionDefault() {
|
||||||
echo "${rel_size}"
|
echo "${rel_size}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show default year (METADATA)
|
# Show default year (METADATA)
|
||||||
# Sintax: showResolutionDefault
|
# Syntax: showResolutionDefault
|
||||||
function showYearDefault() {
|
function showYearDefault() {
|
||||||
current_date=$(date +%Y)
|
current_date=$(date +%Y)
|
||||||
echo "${current_date}"
|
echo "${current_date}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the name title default (MEDATA)
|
# Show the name title default (MEDATA)
|
||||||
# Sintax: showNameDefault <video_file>
|
# Syntax: showNameDefault <video_file>
|
||||||
function showNameDefault() {
|
function showNameDefault() {
|
||||||
# Prepare name title by default
|
# Prepare name title by default
|
||||||
FullPath="${1}"
|
FullPath="${1}"
|
||||||
|
@ -225,7 +225,7 @@ function showNameDefault() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the genre default (MEDATA)
|
# Show the genre default (MEDATA)
|
||||||
# Sintax: showGenreDefault
|
# Syntax: showGenreDefault
|
||||||
function showGenreDefault() {
|
function showGenreDefault() {
|
||||||
echo "Unknown"
|
echo "Unknown"
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ function showHelp() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Wrapper for ks-mp4k to create graphical interfaces"
|
echo "- Wrapper for ks-mp4k to create graphical interfaces"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax:"
|
echo "+ Syntax:"
|
||||||
echo ""
|
echo ""
|
||||||
echo " * TRACKS/CONFIG DETECT:"
|
echo " * TRACKS/CONFIG DETECT:"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
# ks-mp4s-wrapper (ks-tools) - Wrapper for ks-mp4s #
|
# ks-mp4s-wrapper (ks-tools) - Wrapper for ks-mp4s #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
###############################################################
|
###############################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Conversion parameters
|
# Conversion parameters
|
||||||
ks_mp4_to_wrap="/usr/bin/ks-mp4s"
|
ks_mp4_to_wrap="/usr/bin/ks-mp4s"
|
||||||
|
@ -45,7 +45,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Funcion to show the name of file/folder from full path
|
# Funcion to show the name of file/folder from full path
|
||||||
# Sintax: extractFolderOrFile <full/path/file.txt>
|
# Syntax: extractFolderOrFile <full/path/file.txt>
|
||||||
function extractFolderOrFile() {
|
function extractFolderOrFile() {
|
||||||
pathToExtract="${1}/"
|
pathToExtract="${1}/"
|
||||||
findFolder=0
|
findFolder=0
|
||||||
|
@ -65,7 +65,7 @@ function extractFolderOrFile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to remove extension from file
|
# Function to remove extension from file
|
||||||
# Sintax: removeExtension "<text>"
|
# Syntax: removeExtension "<text>"
|
||||||
function removeExtension() {
|
function removeExtension() {
|
||||||
wordToConvert=${1}
|
wordToConvert=${1}
|
||||||
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
ksToolsSedFile="${ksToolsTempFolder}/ks-tools-${RANDOM}.txt"
|
||||||
|
@ -89,7 +89,7 @@ function removeExtension() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to show files with spaces.
|
# Function to show files with spaces.
|
||||||
# Sintax: showFileWithSpace <file number>
|
# Syntax: showFileWithSpace <file number>
|
||||||
function showFileWithSpace() {
|
function showFileWithSpace() {
|
||||||
echo "${1}" > ${dirTemp}/name.tmp
|
echo "${1}" > ${dirTemp}/name.tmp
|
||||||
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
sed -i 's/_/ /g' ${dirTemp}/name.tmp
|
||||||
|
@ -99,7 +99,7 @@ function showFileWithSpace() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show info tracks of input video video file.
|
# Show info tracks of input video video file.
|
||||||
# Sintax: showInfo <video_file>
|
# Syntax: showInfo <video_file>
|
||||||
function showInfo() {
|
function showInfo() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "* Information of ${1}:"
|
echo "* Information of ${1}:"
|
||||||
|
@ -117,7 +117,7 @@ function showInfo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the video track default
|
# Show the video track default
|
||||||
# Sintax: showVideoDefault <video_file>
|
# Syntax: showVideoDefault <video_file>
|
||||||
function showVideoDefault() {
|
function showVideoDefault() {
|
||||||
# Check de video track by default
|
# 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 | 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)
|
||||||
|
@ -135,7 +135,7 @@ function showVideoDefault() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the audio track default
|
# Show the audio track default
|
||||||
# Sintax: showAudioDefault <video_file>
|
# Syntax: showAudioDefault <video_file>
|
||||||
function showAudioDefault() {
|
function showAudioDefault() {
|
||||||
# Check the audio track by default
|
# 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 | 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)
|
||||||
|
@ -163,7 +163,7 @@ function showAudioDefault() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the subtitle track default
|
# Show the subtitle track default
|
||||||
# Sintax: showSubtitleDefault <video_file>
|
# Syntax: showSubtitleDefault <video_file>
|
||||||
function showSubtitleDefault() {
|
function showSubtitleDefault() {
|
||||||
# Check the subtitle track by default
|
# 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 | 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)
|
||||||
|
@ -201,20 +201,20 @@ function showSubtitleDefault() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show default resolution
|
# Show default resolution
|
||||||
# Sintax: showResolutionDefault
|
# Syntax: showResolutionDefault
|
||||||
function showResolutionDefault() {
|
function showResolutionDefault() {
|
||||||
echo "${rel_size}"
|
echo "${rel_size}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show default year (METADATA)
|
# Show default year (METADATA)
|
||||||
# Sintax: showResolutionDefault
|
# Syntax: showResolutionDefault
|
||||||
function showYearDefault() {
|
function showYearDefault() {
|
||||||
current_date=$(date +%Y)
|
current_date=$(date +%Y)
|
||||||
echo "${current_date}"
|
echo "${current_date}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the name title default (MEDATA)
|
# Show the name title default (MEDATA)
|
||||||
# Sintax: showNameDefault <video_file>
|
# Syntax: showNameDefault <video_file>
|
||||||
function showNameDefault() {
|
function showNameDefault() {
|
||||||
# Prepare name title by default
|
# Prepare name title by default
|
||||||
FullPath="${1}"
|
FullPath="${1}"
|
||||||
|
@ -225,7 +225,7 @@ function showNameDefault() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the genre default (MEDATA)
|
# Show the genre default (MEDATA)
|
||||||
# Sintax: showGenreDefault
|
# Syntax: showGenreDefault
|
||||||
function showGenreDefault() {
|
function showGenreDefault() {
|
||||||
echo "Unknown"
|
echo "Unknown"
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ function showHelp() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Wrapper for ks-mp4s to create graphical interfaces"
|
echo "- Wrapper for ks-mp4s to create graphical interfaces"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax:"
|
echo "+ Syntax:"
|
||||||
echo ""
|
echo ""
|
||||||
echo " * TRACKS/CONFIG DETECT:"
|
echo " * TRACKS/CONFIG DETECT:"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
###############################################################
|
###############################################################
|
||||||
# ks-vob-wrapper (ks-tools) - Wrapper for ks-vob #
|
# ks-vob-wrapper (ks-tools) - Wrapper for ks-vob #
|
||||||
# Date: 10-03-2021 #
|
# Date: 22-03-2021 #
|
||||||
# Author: q3aql #
|
# Author: q3aql #
|
||||||
# Contact: q3aql@protonmail.ch #
|
# Contact: q3aql@protonmail.ch #
|
||||||
###############################################################
|
###############################################################
|
||||||
VERSION="6.7"
|
VERSION="6.8"
|
||||||
M_DATE="100321"
|
M_DATE="220321"
|
||||||
|
|
||||||
# Conversion parameters
|
# Conversion parameters
|
||||||
ks_mp4_to_wrap="/usr/bin/ks-vob"
|
ks_mp4_to_wrap="/usr/bin/ks-vob"
|
||||||
|
@ -40,7 +40,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Show info tracks of input video video file.
|
# Show info tracks of input video video file.
|
||||||
# Sintax: showInfo <video_file>
|
# Syntax: showInfo <video_file>
|
||||||
function showInfo() {
|
function showInfo() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "* Information of ${1}:"
|
echo "* Information of ${1}:"
|
||||||
|
@ -55,7 +55,7 @@ function showInfo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the video track default
|
# Show the video track default
|
||||||
# Sintax: showVideoDefault <video_file>
|
# Syntax: showVideoDefault <video_file>
|
||||||
function showVideoDefault() {
|
function showVideoDefault() {
|
||||||
# Check de video track by default
|
# 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 | 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)
|
||||||
|
@ -73,7 +73,7 @@ function showVideoDefault() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show the audio track default
|
# Show the audio track default
|
||||||
# Sintax: showAudioDefault <video_file>
|
# Syntax: showAudioDefault <video_file>
|
||||||
function showAudioDefault() {
|
function showAudioDefault() {
|
||||||
# Check the audio track by default
|
# 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 | 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)
|
||||||
|
@ -101,7 +101,7 @@ function showAudioDefault() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show default resolution
|
# Show default resolution
|
||||||
# Sintax: showResolutionDefault
|
# Syntax: showResolutionDefault
|
||||||
function showResolutionDefault() {
|
function showResolutionDefault() {
|
||||||
echo "${rel_size}"
|
echo "${rel_size}"
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ function showHelp() {
|
||||||
echo ""
|
echo ""
|
||||||
echo "- Wrapper for ks-vob to create graphical interfaces"
|
echo "- Wrapper for ks-vob to create graphical interfaces"
|
||||||
echo ""
|
echo ""
|
||||||
echo "+ Sintax:"
|
echo "+ Syntax:"
|
||||||
echo ""
|
echo ""
|
||||||
echo " * TRACKS/CONFIG DETECT:"
|
echo " * TRACKS/CONFIG DETECT:"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user