Remove debug output

This commit is contained in:
2024-12-31 00:09:17 +01:00
parent e0cddfde9c
commit 500f767a4a
2 changed files with 1 additions and 39 deletions
-15
View File
@@ -94,14 +94,6 @@ IF "%filetype%"=="png" SET "filetype=apng"
IF "%filetype%"=="apng" SET "output=%output%.png"
IF "%filetype%"=="webp" SET "output=%output%.webp"
:: APNG does not support multiple palettes
::IF "%filetype%"=="apng" (
:: IF %mode% EQU 2 (
:: ECHO %RED%Palettegen mode 2 ^(single^) not valid - APNG does not support multiple palettes.%OFF%
:: GOTO :EOF
:: )
::)
:: Validate Palettegen
IF %mode% GTR 3 (
ECHO %RED%Not a valid palettegen ^(-m^) mode%OFF%
@@ -208,7 +200,6 @@ MD "%WD%"
:palettegen
:: Putting together command to generate palette
SET palette=%WD%\palette_%%05d.png
:: SET frames=%palette%_%%05d
SET filters=fps=%fps%,scale=%scale%:-1:flags=lanczos
:: APNG muxer does not support multiple palettes so fallback to using palettegen diff mode
@@ -232,7 +223,6 @@ IF DEFINED colormax (
:: Executing command to generate palette
ECHO %GREEN%Generating palette...%OFF%
echo ffmpeg -v %loglevel% %trim% -i %vid% -vf "%filters%,%encode%%mcol%" -y "%palette%"
ffmpeg -v %loglevel% %trim% -i %vid% -vf "%filters%,%encode%%mcol%" -y "%palette%"
:: Checking if the palette file is in the Working Directory, if not cleaning up
@@ -257,8 +247,6 @@ IF DEFINED errorswitch (
IF %mode% EQU 3 SET "errordiff==diff_mode=rectangle"
)
echo Errordiff: %errordiff%
:: Prepare dithering and encoding options
IF %dither% EQU 0 SET "ditheralg=none"
IF %dither% EQU 1 SET "ditheralg=bayer"
@@ -282,8 +270,6 @@ echo Ditherenc: %ditherenc%
IF NOT DEFINED bayerscale SET "bayer="
IF DEFINED bayerscale SET "bayer=:bayer_scale=%bayerscale%"
echo Bayer: %bayer%
:: WEBP pixel format and lossy quality
IF "%filetype%" == "webp" (
IF DEFINED webp_lossy (
@@ -293,7 +279,6 @@ IF "%filetype%" == "webp" (
:: Executing the encoding command
ECHO %GREEN%Encoding animation...%OFF%
echo ffmpeg -v %loglevel% %trim% -i %vid% -thread_queue_size 512 -i "%palette%" -lavfi "%filters% [x]; [x][1:v] %decode%%errordiff%%ditherenc%%bayer%" -f %filetype% %webp_lossy% -loop 0 -plays 0 -y "%output%"
ffmpeg -v %loglevel% %trim% -i %vid% -thread_queue_size 512 -i "%palette%" -lavfi "%filters% [x]; [x][1:v] %decode%%errordiff%%ditherenc%%bayer%" -f %filetype% %webp_lossy% -loop 0 -plays 0 -y "%output%"
:: Checking if file was created and cleaning up if not
+1 -24
View File
@@ -1,4 +1,5 @@
#!/bin/bash
# Description: Video to GIF/APNG/WEBP converter
# By: MDHEXT, Nabi KaramAliZadeh, Pathduck
# Version: 6.0
@@ -41,9 +42,6 @@ if [ $# -eq 0 ]; then print_help; exit; fi
input="$1"
output="${input%.*}"
echo "Input file: $input"
echo "Output file: $output"
# Parse Arguments
shift
while [[ $# -gt 0 ]]; do
@@ -83,9 +81,6 @@ else
WD=$(mktemp -d -t vid2ani-XXXXXX)
fi
echo "Input file: $input"
echo "Output file: $output"
# Cleanup on exit, interrupt, termination
trap 'rm -rf "$WD"' EXIT INT TERM
@@ -128,23 +123,6 @@ if [[ -n "$webp_lossy" ]]; then
fi
fi
if [[ -n "$start_time" ]]; then
echo start er satt
fi
if [[ -z "$start_time" ]]; then
echo start er null
fi
if [[ -n "$end_time" ]]; then
echo end er satt
fi
if [[ -z "$end_time" ]]; then
echo end er null
fi
# Validate Clipping
if [[ -n "$start_time" && -z "$end_time" ]]; then
echo ${RED}"End time (-e) is required when Start time (-e) is specified."${OFF}; exit 1;
@@ -199,7 +177,6 @@ fi
# Executing command to generate palette
echo ${GREEN}"Generating palette..."${OFF}
echo "Palette file: $palette"
ffmpeg -v "${loglevel}" ${trim:-} -i "${input}" -vf "${filters},${encode}${mcol}" -y "${palette}"
# Checking if the palette file is in the Working Directory, if not cleaning up