summaryrefslogtreecommitdiff
path: root/src/app/sharp96-bad-apple/convert
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-02-03 18:10:30 +0100
committerDaniel Friesel <derf@finalrewind.org>2021-02-03 18:10:30 +0100
commit30431427adbf05a3e5cc17f6fb4b1b1cbc105b39 (patch)
tree7f18fcf31cecd520ca0a4d6515df5a08bafe564a /src/app/sharp96-bad-apple/convert
parent31a918533ce2b5a2796a671b14c82b9f2c1dd5df (diff)
bad apple: increase frame rate to 7 FPS. now running at actual speed.
Diffstat (limited to 'src/app/sharp96-bad-apple/convert')
-rwxr-xr-xsrc/app/sharp96-bad-apple/convert16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/app/sharp96-bad-apple/convert b/src/app/sharp96-bad-apple/convert
new file mode 100755
index 0000000..d357faa
--- /dev/null
+++ b/src/app/sharp96-bad-apple/convert
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# ./convert.sh <file> -r <frame rate> [additional ffmpeg args]
+
+set -eu
+
+mkdir -p tmp
+
+ffmpeg -i "$@" tmp/frame%4d.png
+
+parallel mogrify -resize 96x96 -threshold 50% -- tmp/*.png
+
+echo "const unsigned char frame_rate = $3;" > frames.cc
+./frames-to-cc tmp/*.png >> frames.cc
+
+rm -rf tmp