Skip to content

Instantly share code, notes, and snippets.

@micahyoung
Last active June 5, 2022 21:55
Show Gist options
  • Save micahyoung/df0f3b3f810089f153ca376f3e196cc1 to your computer and use it in GitHub Desktop.
Save micahyoung/df0f3b3f810089f153ca376f3e196cc1 to your computer and use it in GitHub Desktop.
iMovie cut frames
#!/bin/bash
set -o errexit -o pipefail -o nounset
# usage ./cutframes.sh "2000-01-01" "second line" "third line" prefix-
line1=$1
line2=$2
line3=$3
prefix=$4
size=1920x1080
for num in 1 2 3 4; do
text="${line1}\n${line2}\n${line3}\n${num} of 4"
file="${prefix}${num}of4.png"
convert -size $size xc:black \
-fill white \
-font Courier \
-pointsize 96 \
-gravity West \
-annotate +400+0 "$text" \
$file
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment