WEBP2
Kinda lost interest in continuing this since it turns out upscaling DVD anime to 720p is actually really really hard. The resolution is so low that most AI models can barely do better than bicubic but I did eventually find one that's okay-ish.
https://openmodeldb.info/models/2x-DigitoonLite
For those who haven't heard, it's possible to fraudulently create a VP9 WEBM that contains a yuv420p "image" and force your GPU to decode it instead of your CPU which is pretty much what would have been WEBP2. This may or may not benefit you but IMHO it's amusing that it's possible at all. It's not a good image format for real life images but it does seem especially good for anime upscales. 4chan doesn't allow modern image formats so if you want better image compression efficiency this is as good as it gets lol. Anyway here's a windows batch script that not only asks you to strictly define the quantizer ceilings (ie lower number better) in one go but if you're not satisfied it loops again so you can use a different value if you wish. In a proper WEBP2 implementation the 0-63 range would be inverted and mapped to 0-100 with 100 = 0 but the whole thing was abandoned so this is what we have left to work with now.
@echo off
:loop
echo:
set /p crf="CRF (0-63): "
mkdir temp
for %%f in (*.png) do (
ffmpeg -hide_banner -framerate 1 -stream_loop 1 -i "%%f" -pix_fmt yuv420p -color_range full -y temp/temp.y4m
ffmpeg -hide_banner -color_range full -colorspace bt470bg -color_primaries unknown -color_trc unknown ^
-i temp/temp.y4m -c:v libvpx-vp9 -quality best -cpu-used -1 -crf %crf% -b:v 0 -qmin %crf% -qmax %crf% -y "%%~nf.webm"
)
set /p retry="Test again? YES or NO?: "
if /i "%retry%"=="YES" goto loop
if /i "%retry%"=="yes" goto loop
if /i "%retry%"=="Yes" goto loop
I'll include a PNG version if you want to use this to test image codecs and they'll serve as a nice backup in case I find a model better than digiTROON lite.
https://files.catbox.moe/t309wn.png
https://openmodeldb.info/models/2x-DigitoonLite
For those who haven't heard, it's possible to fraudulently create a VP9 WEBM that contains a yuv420p "image" and force your GPU to decode it instead of your CPU which is pretty much what would have been WEBP2. This may or may not benefit you but IMHO it's amusing that it's possible at all. It's not a good image format for real life images but it does seem especially good for anime upscales. 4chan doesn't allow modern image formats so if you want better image compression efficiency this is as good as it gets lol. Anyway here's a windows batch script that not only asks you to strictly define the quantizer ceilings (ie lower number better) in one go but if you're not satisfied it loops again so you can use a different value if you wish. In a proper WEBP2 implementation the 0-63 range would be inverted and mapped to 0-100 with 100 = 0 but the whole thing was abandoned so this is what we have left to work with now.
@echo off
:loop
echo:
set /p crf="CRF (0-63): "
mkdir temp
for %%f in (*.png) do (
ffmpeg -hide_banner -framerate 1 -stream_loop 1 -i "%%f" -pix_fmt yuv420p -color_range full -y temp/temp.y4m
ffmpeg -hide_banner -color_range full -colorspace bt470bg -color_primaries unknown -color_trc unknown ^
-i temp/temp.y4m -c:v libvpx-vp9 -quality best -cpu-used -1 -crf %crf% -b:v 0 -qmin %crf% -qmax %crf% -y "%%~nf.webm"
)
set /p retry="Test again? YES or NO?: "
if /i "%retry%"=="YES" goto loop
if /i "%retry%"=="yes" goto loop
if /i "%retry%"=="Yes" goto loop
I'll include a PNG version if you want to use this to test image codecs and they'll serve as a nice backup in case I find a model better than digiTROON lite.
https://files.catbox.moe/t309wn.png