diff --git a/scripts/preview.sh b/scripts/preview.sh index 246a318..9e23799 100644 --- a/scripts/preview.sh +++ b/scripts/preview.sh @@ -54,7 +54,7 @@ popd > /dev/null # Upscale (scale) if [[ "$ScaleRatio" -ne 1 ]]; then - echo "Scale" + echo "waifu2x scale" waifu2x-caffe-cui \ --mode "scale" \ --scale_ratio "$ScaleRatio" \ @@ -69,7 +69,6 @@ if [[ "$ScaleRatio" -ne 1 ]]; then --output_path "$TmpFramesOutDir" \ > /dev/null - echo "Copy" pushd "$TmpFramesOutDir" > /dev/null while read Filename do @@ -88,7 +87,7 @@ do UpscaleMode="noise_scale" fi - echo "$UpscaleMode $NoiseLevel" + echo "waifu2x $UpscaleMode $NoiseLevel" waifu2x-caffe-cui \ --mode "$UpscaleMode" \ --scale_ratio "$ScaleRatio" \ @@ -104,7 +103,6 @@ do --output_path "$TmpFramesOutDir" \ > /dev/null - echo "Copy" pushd "$TmpFramesOutDir" > /dev/null while read Filename do @@ -114,6 +112,8 @@ do popd > /dev/null done +echo "scale original" +mogrify -scale $(echo "$ScaleRatio * 100" | bc)% "$TmpFramesSrcDir"/*.png pushd "$TmpFramesSrcDir" > /dev/null mv *.png "$PreviewDir" popd > /dev/null diff --git a/video2d-2x b/video2d-2x index 4b62c6b..ea7a27b 100644 --- a/video2d-2x +++ b/video2d-2x @@ -38,6 +38,7 @@ function show_help () echo " -e, --extract extract all resources from (video) FILE" echo " -f, --frames convert extracted video to frames" echo " -r, --ranges generate range list for frames" + echo " -p, --preview generate preview images for each range" echo " -u, --upscale upscale frames with range settings" echo " -v, --video generate upscaled video from upscaled frames" echo " -m, --merge merge upscaled video with all extracted resources"