feat: gen preview for ranges
This commit is contained in:
parent
3acbb56f87
commit
099e49e0aa
@ -54,7 +54,7 @@ popd > /dev/null
|
|||||||
|
|
||||||
# Upscale (scale)
|
# Upscale (scale)
|
||||||
if [[ "$ScaleRatio" -ne 1 ]]; then
|
if [[ "$ScaleRatio" -ne 1 ]]; then
|
||||||
echo "Scale"
|
echo "waifu2x scale"
|
||||||
waifu2x-caffe-cui \
|
waifu2x-caffe-cui \
|
||||||
--mode "scale" \
|
--mode "scale" \
|
||||||
--scale_ratio "$ScaleRatio" \
|
--scale_ratio "$ScaleRatio" \
|
||||||
@ -69,7 +69,6 @@ if [[ "$ScaleRatio" -ne 1 ]]; then
|
|||||||
--output_path "$TmpFramesOutDir" \
|
--output_path "$TmpFramesOutDir" \
|
||||||
> /dev/null
|
> /dev/null
|
||||||
|
|
||||||
echo "Copy"
|
|
||||||
pushd "$TmpFramesOutDir" > /dev/null
|
pushd "$TmpFramesOutDir" > /dev/null
|
||||||
while read Filename
|
while read Filename
|
||||||
do
|
do
|
||||||
@ -88,7 +87,7 @@ do
|
|||||||
UpscaleMode="noise_scale"
|
UpscaleMode="noise_scale"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$UpscaleMode $NoiseLevel"
|
echo "waifu2x $UpscaleMode $NoiseLevel"
|
||||||
waifu2x-caffe-cui \
|
waifu2x-caffe-cui \
|
||||||
--mode "$UpscaleMode" \
|
--mode "$UpscaleMode" \
|
||||||
--scale_ratio "$ScaleRatio" \
|
--scale_ratio "$ScaleRatio" \
|
||||||
@ -104,7 +103,6 @@ do
|
|||||||
--output_path "$TmpFramesOutDir" \
|
--output_path "$TmpFramesOutDir" \
|
||||||
> /dev/null
|
> /dev/null
|
||||||
|
|
||||||
echo "Copy"
|
|
||||||
pushd "$TmpFramesOutDir" > /dev/null
|
pushd "$TmpFramesOutDir" > /dev/null
|
||||||
while read Filename
|
while read Filename
|
||||||
do
|
do
|
||||||
@ -114,6 +112,8 @@ do
|
|||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "scale original"
|
||||||
|
mogrify -scale $(echo "$ScaleRatio * 100" | bc)% "$TmpFramesSrcDir"/*.png
|
||||||
pushd "$TmpFramesSrcDir" > /dev/null
|
pushd "$TmpFramesSrcDir" > /dev/null
|
||||||
mv *.png "$PreviewDir"
|
mv *.png "$PreviewDir"
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
@ -38,6 +38,7 @@ function show_help ()
|
|||||||
echo " -e, --extract <FILE> extract all resources from (video) FILE"
|
echo " -e, --extract <FILE> extract all resources from (video) FILE"
|
||||||
echo " -f, --frames convert extracted video to frames"
|
echo " -f, --frames convert extracted video to frames"
|
||||||
echo " -r, --ranges generate range list for 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 " -u, --upscale upscale frames with range settings"
|
||||||
echo " -v, --video generate upscaled video from upscaled frames"
|
echo " -v, --video generate upscaled video from upscaled frames"
|
||||||
echo " -m, --merge merge upscaled video with all extracted resources"
|
echo " -m, --merge merge upscaled video with all extracted resources"
|
||||||
|
Loading…
Reference in New Issue
Block a user