summaryrefslogtreecommitdiff
path: root/src/app/pervasive-aurora-mb-bad-apple/convert
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-11-01 19:41:57 +0100
committerDaniel Friesel <derf@finalrewind.org>2021-11-01 19:41:57 +0100
commitbd2b2541a7b00a2520ea5a3eabcb90a0bbb35b28 (patch)
tree6729d6528abc4a295531ad304f92bde5a72bb294 /src/app/pervasive-aurora-mb-bad-apple/convert
parent8668036aeab09b580d19b1113c1ba5450637ccfc (diff)
add pervasive aurora mb bad apple (not really working yet)
Diffstat (limited to 'src/app/pervasive-aurora-mb-bad-apple/convert')
-rwxr-xr-xsrc/app/pervasive-aurora-mb-bad-apple/convert16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/app/pervasive-aurora-mb-bad-apple/convert b/src/app/pervasive-aurora-mb-bad-apple/convert
new file mode 100755
index 0000000..10dec48
--- /dev/null
+++ b/src/app/pervasive-aurora-mb-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 160x160 -threshold 50% -- tmp/*.png
+
+echo "const unsigned char frame_rate = $3;" > frames.cc
+./frames-to-cc tmp/*.png >> frames.cc
+
+rm -rf tmp