Generate an image sequence that's cropped and scaled

This commit is contained in:
Matt McWilliams 2021-08-10 18:07:38 -04:00
parent 67c71d683d
commit d09782367b
1 changed files with 15 additions and 0 deletions

15
image_seq.sh Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
INPUT="${1}"
OUTPUT="${2}"
WIDTH=323
HEIGHT=242
mkdir -p "${OUTPUT}"
ffmpeg -re -i "${INPUT}" \
-f image2 \
-r 12 \
-vf crop=in_h/3*4:in_h,scale=$WIDTH:$HEIGHT,setsar=1:1 \
"${OUTPUT}/image_%06d.png"