feat: gen preview for ranges
This commit is contained in:
parent
3acbb56f87
commit
099e49e0aa
@ -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
|
||||
|
@ -38,6 +38,7 @@ function show_help ()
|
||||
echo " -e, --extract <FILE> 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"
|
||||
|
Loading…
Reference in New Issue
Block a user