testing with these settings:
ffmpeg -ss 00:21:36 -to 00:22:10 -i "$in" -c:v libvpx-vp9 -profile:v 2 -aq-mode 1 -lag-in-frames 25 -auto-alt-ref 6 -deadline good -cpu-used 4 -frame-parallel 0 -row-mt 1 -enable-tpl 1 -b:v 950k -g 240 -pix_fmt yuv420p10le -an -pass 1 -map_metadata -1 -map 0:v:0 -f null /dev/null
ffmpeg -ss 00:21:36 -to 00:22:10 -i "$in" -c:v libvpx-vp9 -profile:v 2 -aq-mode 1 -lag-in-frames 25 -auto-alt-ref 6 -deadline good -cpu-used 4 -frame-parallel 0 -row-mt 1 -enable-tpl 1 -b:v 950k -g 240 -pix_fmt yuv420p10le -an -pass 2 -map_metadata -1 -map 0:v:0 "$out"
i feel like it doesn't look very good, but not sure how to improve the command line any further. also on my ryzen 5950x, this took 138s to encode this 35s clip jfc