# color selector (use q/w)
c=0; while true; do printf '\033[H\033[0;1;48;5;%s;30m\033[J%s\n\033[37m%s\n\n\n\n\n\033[0m\033[J\033[0;1;38;5;%sm\n  ███\n\n' $c $c $c $c; read -u1 -n1 -r k; [ "$k" = q ] && c=$((c-1)); [ "$k" = w ] && c=$((c+1)); done

# show box
cb=24; cf=215; x=14; sleep 2; printf '\033[H\033[0;48;5;%sm\033[J' $cb; printf '\033[0;48;5;%sm' $cf; for y in {7..9}; do printf '\033[%s;%sH           ' $y $x; done; printf '\033[D'; read

# mutate
convert Screenshot_20200101-160025_Termux.png -crop 1920x1072+16+96 -flip box2.png
convert Screenshot_20200101-160025_Termux.png -crop 1920x1072+16+96 -flip -flop box3.png
convert Screenshot_20200101-160025_Termux.png -crop 1920x1072+16+96 -flop box4.png

# make video
for codec in x264 x265; do for fps in 30 35 40 45 50 55 60; do ffmpeg -hide_banner -nostdin -y -loop 1 -r $fps -i box%d.png -vcodec lib$codec -preset slower -tune animation -crf 20 -t 5 $codec-$fps.mkv || break; done; done 

