Animated Webp
I made some progress optimizing animated Webp compression. Simple windows batch scripts for now as I improve with Bash.
This takes Screenshot (X).png files and renames them to 01.png 02.png 03.png frames for ffmpeg processing
This scales the frames to 50% size and crops them to 540x540, assuming source is 1920x1080. Also exports them to a new png_444 folder.
This converts the png_444 frames into an intermediate RGB video file, may not be necessary...
This takes Screenshot (X).png files and renames them to 01.png 02.png 03.png frames for ffmpeg processing
@setlocal EnableDelayedExpansion & set n=1
for %%f in (*.png) do ren "%%f" "!n:~ -2!.png" & set /a n+=101
@echo off & setlocal EnableDelayedExpansion
mkdir png_444 & for %%f in (*.png) do ffmpeg -hide_banner -i "%%f" -vf "scale=iw/2:ih/2,crop=540:540:(iw-540)/2:(ih-540)/2" -y "png_444/%%~nf.png"
ffmpeg -framerate 1 -i %%02d.png ^
-c:v libvpx-vp9 -cpu-used 4 -r 1 -g 1 ^
-b:v 0 -crf 0 -qmin 0 -qmax 0 -pix_fmt gbrp out.webm

