#!/bin/bash

# 480x360 base resolution
# 42x32 is close enough
# 40x32 is nicer to work with because divisible by 8

rm frames/*.png

ffmpeg -i *.webm \
-r $1 \
-ss 1 \
-vf scale=320:240 \
-sws_dither none \
frames/frame_%04d.png 2> /dev/null
# -pix_fmt monob \

echo converted with $1 fps
echo $(ls -L1 frames | wc -l) frames
