Fix bug with spaces name files (ks-crop)
This commit is contained in:
parent
d6fdb87751
commit
c5a959a058
56
src/ks-crop
56
src/ks-crop
|
@ -216,9 +216,9 @@ function crop_video() {
|
||||||
echo ""
|
echo ""
|
||||||
echo " # Crop '${inputFile}' from 4:3/IMAX to 16:9 (1.77:1)"
|
echo " # Crop '${inputFile}' from 4:3/IMAX to 16:9 (1.77:1)"
|
||||||
if [ "${patch_thread}" == "y" ] ; then
|
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
|
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
|
fi
|
||||||
# Execute commands for conversion
|
# Execute commands for conversion
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -227,9 +227,9 @@ function crop_video() {
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
if [ "${patch_thread}" == "y" ] ; then
|
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
|
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
|
||||||
fi
|
fi
|
||||||
elif [ "${modeCrop}" == "4:3-crop" ] ; then
|
elif [ "${modeCrop}" == "4:3-crop" ] ; then
|
||||||
|
@ -240,9 +240,9 @@ function crop_video() {
|
||||||
echo ""
|
echo ""
|
||||||
echo " # Crop '${inputFile}' from 16:9 to 4:3 (1.33:1)"
|
echo " # Crop '${inputFile}' from 16:9 to 4:3 (1.33:1)"
|
||||||
if [ "${patch_thread}" == "y" ] ; then
|
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
|
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
|
fi
|
||||||
# Execute commands for conversion
|
# Execute commands for conversion
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -251,9 +251,9 @@ function crop_video() {
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
if [ "${patch_thread}" == "y" ] ; then
|
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
|
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
|
||||||
fi
|
fi
|
||||||
elif [ "${modeCrop}" == "5:4-crop" ] ; then
|
elif [ "${modeCrop}" == "5:4-crop" ] ; then
|
||||||
|
@ -264,9 +264,9 @@ function crop_video() {
|
||||||
echo ""
|
echo ""
|
||||||
echo " # Crop '${inputFile}' from 16:9 to 5:4 (1.25:1)"
|
echo " # Crop '${inputFile}' from 16:9 to 5:4 (1.25:1)"
|
||||||
if [ "${patch_thread}" == "y" ] ; then
|
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
|
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
|
fi
|
||||||
# Execute commands for conversion
|
# Execute commands for conversion
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -275,9 +275,9 @@ function crop_video() {
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
if [ "${patch_thread}" == "y" ] ; then
|
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
|
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
|
||||||
fi
|
fi
|
||||||
elif [ "${modeCrop}" == "imax-crop" ] ; then
|
elif [ "${modeCrop}" == "imax-crop" ] ; then
|
||||||
|
@ -288,9 +288,9 @@ function crop_video() {
|
||||||
echo ""
|
echo ""
|
||||||
echo " # Crop '${inputFile}' from 16:9 to IMAX (1.43:1)"
|
echo " # Crop '${inputFile}' from 16:9 to IMAX (1.43:1)"
|
||||||
if [ "${patch_thread}" == "y" ] ; then
|
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
|
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
|
fi
|
||||||
# Execute commands for conversion
|
# Execute commands for conversion
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -299,9 +299,9 @@ function crop_video() {
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
if [ "${patch_thread}" == "y" ] ; then
|
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
|
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
|
||||||
fi
|
fi
|
||||||
elif [ "${modeCrop}" == "16:9-aspect" ] ; then
|
elif [ "${modeCrop}" == "16:9-aspect" ] ; then
|
||||||
|
@ -312,9 +312,9 @@ function crop_video() {
|
||||||
echo ""
|
echo ""
|
||||||
echo " # Change '${inputFile}' aspect to 16:9 (stretched)"
|
echo " # Change '${inputFile}' aspect to 16:9 (stretched)"
|
||||||
if [ "${patch_thread}" == "y" ] ; then
|
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
|
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
|
fi
|
||||||
# Execute commands for conversion
|
# Execute commands for conversion
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -323,9 +323,9 @@ function crop_video() {
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
if [ "${patch_thread}" == "y" ] ; then
|
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
|
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
|
||||||
fi
|
fi
|
||||||
elif [ "${modeCrop}" == "4:3-aspect" ] ; then
|
elif [ "${modeCrop}" == "4:3-aspect" ] ; then
|
||||||
|
@ -336,9 +336,9 @@ function crop_video() {
|
||||||
echo ""
|
echo ""
|
||||||
echo " # Change '${inputFile}' aspect to 4:3 (stretched)"
|
echo " # Change '${inputFile}' aspect to 4:3 (stretched)"
|
||||||
if [ "${patch_thread}" == "y" ] ; then
|
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
|
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
|
fi
|
||||||
# Execute commands for conversion
|
# Execute commands for conversion
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -347,9 +347,9 @@ function crop_video() {
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
if [ "${patch_thread}" == "y" ] ; then
|
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
|
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
|
||||||
fi
|
fi
|
||||||
elif [ "${modeCrop}" == "5:4-aspect" ] ; then
|
elif [ "${modeCrop}" == "5:4-aspect" ] ; then
|
||||||
|
@ -360,9 +360,9 @@ function crop_video() {
|
||||||
echo ""
|
echo ""
|
||||||
echo " # Change '${inputFile}' aspect to 5:4 (stretched)"
|
echo " # Change '${inputFile}' aspect to 5:4 (stretched)"
|
||||||
if [ "${patch_thread}" == "y" ] ; then
|
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
|
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
|
fi
|
||||||
# Execute commands for conversion
|
# Execute commands for conversion
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -371,9 +371,9 @@ function crop_video() {
|
||||||
exit
|
exit
|
||||||
else
|
else
|
||||||
if [ "${patch_thread}" == "y" ] ; then
|
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
|
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
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user