Fix bug with spaces name files (ks-crop)

This commit is contained in:
q3aql 2021-03-22 19:44:26 +01:00
parent d6fdb87751
commit c5a959a058

View File

@ -216,9 +216,9 @@ function crop_video() {
echo ""
echo " # Crop '${inputFile}' from 4:3/IMAX to 16:9 (1.77:1)"
if [ "${patch_thread}" == "y" ] ; then
echo " ${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v \"crop=iw:ih-240\" -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-crop.${v_ext}"
echo " ${p_ffmpeg} \"${inputFile}\" ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v \"crop=iw:ih-240\" -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-crop.${v_ext}"
else
echo " ${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v \"crop=iw:ih-240\" -s ${resolution} ${p_conversion} ${inputFileOut}-crop.${v_ext}"
echo " ${p_ffmpeg} \"${inputFile}\" ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v \"crop=iw:ih-240\" -s ${resolution} ${p_conversion} ${inputFileOut}-crop.${v_ext}"
fi
# Execute commands for conversion
echo ""
@ -227,9 +227,9 @@ function crop_video() {
exit
else
if [ "${patch_thread}" == "y" ] ; then
${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v "crop=iw:ih-240" -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-crop.${v_ext}
${p_ffmpeg} "${inputFile}" ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v "crop=iw:ih-240" -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-crop.${v_ext}
else
${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v "crop=iw:ih-240" -s ${resolution} ${p_conversion} ${inputFileOut}-crop.${v_ext}
${p_ffmpeg} "${inputFile}" ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v "crop=iw:ih-240" -s ${resolution} ${p_conversion} ${inputFileOut}-crop.${v_ext}
fi
fi
elif [ "${modeCrop}" == "4:3-crop" ] ; then
@ -240,9 +240,9 @@ function crop_video() {
echo ""
echo " # Crop '${inputFile}' from 16:9 to 4:3 (1.33:1)"
if [ "${patch_thread}" == "y" ] ; then
echo " ${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v \"crop=ih/3*4:ih\" -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-crop.${v_ext}"
echo " ${p_ffmpeg} \"${inputFile}\" ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v \"crop=ih/3*4:ih\" -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-crop.${v_ext}"
else
echo " ${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v \"crop=ih/3*4:ih\" -s ${resolution} ${p_conversion} ${inputFileOut}-crop.${v_ext}"
echo " ${p_ffmpeg} \"${inputFile}\" ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v \"crop=ih/3*4:ih\" -s ${resolution} ${p_conversion} ${inputFileOut}-crop.${v_ext}"
fi
# Execute commands for conversion
echo ""
@ -251,9 +251,9 @@ function crop_video() {
exit
else
if [ "${patch_thread}" == "y" ] ; then
${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v "crop=ih/3*4:ih" -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-crop.${v_ext}
${p_ffmpeg} "${inputFile}" ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v "crop=ih/3*4:ih" -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-crop.${v_ext}
else
${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v "crop=ih/3*4:ih" -s ${resolution} ${p_conversion} ${inputFileOut}-crop.${v_ext}
${p_ffmpeg} "${inputFile}" ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v "crop=ih/3*4:ih" -s ${resolution} ${p_conversion} ${inputFileOut}-crop.${v_ext}
fi
fi
elif [ "${modeCrop}" == "5:4-crop" ] ; then
@ -264,9 +264,9 @@ function crop_video() {
echo ""
echo " # Crop '${inputFile}' from 16:9 to 5:4 (1.25:1)"
if [ "${patch_thread}" == "y" ] ; then
echo " ${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v \"crop=ih/4*5:ih\" -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-crop.${v_ext}"
echo " ${p_ffmpeg} \"${inputFile}\" ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v \"crop=ih/4*5:ih\" -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-crop.${v_ext}"
else
echo " ${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v \"crop=ih/4*5:ih\" -s ${resolution} ${p_conversion} ${inputFileOut}-crop.${v_ext}"
echo " ${p_ffmpeg} \"${inputFile}\" ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v \"crop=ih/4*5:ih\" -s ${resolution} ${p_conversion} ${inputFileOut}-crop.${v_ext}"
fi
# Execute commands for conversion
echo ""
@ -275,9 +275,9 @@ function crop_video() {
exit
else
if [ "${patch_thread}" == "y" ] ; then
${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v "crop=ih/4*5:ih" -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-crop.${v_ext}
${p_ffmpeg} "${inputFile}" ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v "crop=ih/4*5:ih" -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-crop.${v_ext}
else
${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v "crop=ih/4*5:ih" -s ${resolution} ${p_conversion} ${inputFileOut}-crop.${v_ext}
${p_ffmpeg} "${inputFile}" ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v "crop=ih/4*5:ih" -s ${resolution} ${p_conversion} ${inputFileOut}-crop.${v_ext}
fi
fi
elif [ "${modeCrop}" == "imax-crop" ] ; then
@ -288,9 +288,9 @@ function crop_video() {
echo ""
echo " # Crop '${inputFile}' from 16:9 to IMAX (1.43:1)"
if [ "${patch_thread}" == "y" ] ; then
echo " ${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v \"crop=ih/2.79*4:ih\" -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-crop.${v_ext}"
echo " ${p_ffmpeg} \"${inputFile}\" ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v \"crop=ih/2.79*4:ih\" -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-crop.${v_ext}"
else
echo " ${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v \"crop=ih/2.79*4:ih\" -s ${resolution} ${p_conversion} ${inputFileOut}-crop.${v_ext}"
echo " ${p_ffmpeg} \"${inputFile}\" ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v \"crop=ih/2.79*4:ih\" -s ${resolution} ${p_conversion} ${inputFileOut}-crop.${v_ext}"
fi
# Execute commands for conversion
echo ""
@ -299,9 +299,9 @@ function crop_video() {
exit
else
if [ "${patch_thread}" == "y" ] ; then
${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v "crop=ih/2.79*4:ih" -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-crop.${v_ext}
${p_ffmpeg} "${inputFile}" ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v "crop=ih/2.79*4:ih" -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-crop.${v_ext}
else
${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v "crop=ih/2.79*4:ih" -s ${resolution} ${p_conversion} ${inputFileOut}-crop.${v_ext}
${p_ffmpeg} "${inputFile}" ${f_conversion} -map ${video_track} -map ${audio_track} -filter:v "crop=ih/2.79*4:ih" -s ${resolution} ${p_conversion} ${inputFileOut}-crop.${v_ext}
fi
fi
elif [ "${modeCrop}" == "16:9-aspect" ] ; then
@ -312,9 +312,9 @@ function crop_video() {
echo ""
echo " # Change '${inputFile}' aspect to 16:9 (stretched)"
if [ "${patch_thread}" == "y" ] ; then
echo " ${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 16:9 -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-aspect.${v_ext}"
echo " ${p_ffmpeg} \"${inputFile}\" ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 16:9 -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-aspect.${v_ext}"
else
echo " ${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 16:9 -s ${resolution} ${p_conversion} ${inputFileOut}-aspect.${v_ext}"
echo " ${p_ffmpeg} \"${inputFile}\" ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 16:9 -s ${resolution} ${p_conversion} ${inputFileOut}-aspect.${v_ext}"
fi
# Execute commands for conversion
echo ""
@ -323,9 +323,9 @@ function crop_video() {
exit
else
if [ "${patch_thread}" == "y" ] ; then
${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 16:9 -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-aspect.${v_ext}
${p_ffmpeg} "${inputFile}" ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 16:9 -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-aspect.${v_ext}
else
${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 16:9 -s ${resolution} ${p_conversion} ${inputFileOut}-aspect.${v_ext}
${p_ffmpeg} "${inputFile}" ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 16:9 -s ${resolution} ${p_conversion} ${inputFileOut}-aspect.${v_ext}
fi
fi
elif [ "${modeCrop}" == "4:3-aspect" ] ; then
@ -336,9 +336,9 @@ function crop_video() {
echo ""
echo " # Change '${inputFile}' aspect to 4:3 (stretched)"
if [ "${patch_thread}" == "y" ] ; then
echo " ${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 4:3 -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-aspect.${v_ext}"
echo " ${p_ffmpeg} \"${inputFile}\" ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 4:3 -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-aspect.${v_ext}"
else
echo " ${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 4:3 -s ${resolution} ${p_conversion} ${inputFileOut}-aspect.${v_ext}"
echo " ${p_ffmpeg} \"${inputFile}\" ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 4:3 -s ${resolution} ${p_conversion} ${inputFileOut}-aspect.${v_ext}"
fi
# Execute commands for conversion
echo ""
@ -347,9 +347,9 @@ function crop_video() {
exit
else
if [ "${patch_thread}" == "y" ] ; then
${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 4:3 -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-aspect.${v_ext}
${p_ffmpeg} "${inputFile}" ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 4:3 -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-aspect.${v_ext}
else
${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 4:3 -s ${resolution} ${p_conversion} ${inputFileOut}-aspect.${v_ext}
${p_ffmpeg} "${inputFile}" ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 4:3 -s ${resolution} ${p_conversion} ${inputFileOut}-aspect.${v_ext}
fi
fi
elif [ "${modeCrop}" == "5:4-aspect" ] ; then
@ -360,9 +360,9 @@ function crop_video() {
echo ""
echo " # Change '${inputFile}' aspect to 5:4 (stretched)"
if [ "${patch_thread}" == "y" ] ; then
echo " ${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 5:4 -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-aspect.${v_ext}"
echo " ${p_ffmpeg} \"${inputFile}\" ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 5:4 -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-aspect.${v_ext}"
else
echo " ${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 5:4 -s ${resolution} ${p_conversion} ${inputFileOut}-aspect.${v_ext}"
echo " ${p_ffmpeg} \"${inputFile}\" ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 5:4 -s ${resolution} ${p_conversion} ${inputFileOut}-aspect.${v_ext}"
fi
# Execute commands for conversion
echo ""
@ -371,9 +371,9 @@ function crop_video() {
exit
else
if [ "${patch_thread}" == "y" ] ; then
${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 5:4 -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-aspect.${v_ext}
${p_ffmpeg} "${inputFile}" ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 5:4 -s ${resolution} ${p_conversion} ${p_ffmpeg_patched} ${inputFileOut}-aspect.${v_ext}
else
${p_ffmpeg} ${inputFile} ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 5:4 -s ${resolution} ${p_conversion} ${inputFileOut}-aspect.${v_ext}
${p_ffmpeg} "${inputFile}" ${f_conversion} -map ${video_track} -map ${audio_track} -aspect 5:4 -s ${resolution} ${p_conversion} ${inputFileOut}-aspect.${v_ext}
fi
fi
else