diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-02-10 22:11:25 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-02-10 22:11:25 +0100 |
commit | 467b1b587811a2091d04a5faab20d6430313cd51 (patch) | |
tree | 496f43b1b3ca16a1e0995267623914db4136e70c /src/app/bad-apple-msp430fr-ssd1306-128x64/convert | |
parent | b5b506c97469f1917de4e7b7bd291f68b6d8d897 (diff) |
rename ssd1306-bad-apple to bad-apple-msp430fr-ssd1306-128x64
Diffstat (limited to 'src/app/bad-apple-msp430fr-ssd1306-128x64/convert')
-rwxr-xr-x | src/app/bad-apple-msp430fr-ssd1306-128x64/convert | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/app/bad-apple-msp430fr-ssd1306-128x64/convert b/src/app/bad-apple-msp430fr-ssd1306-128x64/convert new file mode 100755 index 0000000..7d2ca0e --- /dev/null +++ b/src/app/bad-apple-msp430fr-ssd1306-128x64/convert @@ -0,0 +1,16 @@ +#!/bin/sh + +# [size=WxH] ./convert.sh <file> -r <frame rate> [additional ffmpeg args] + +set -eu + +mkdir -p tmp + +ffmpeg -i "$@" tmp/frame%4d.png + +parallel mogrify -resize "${size:-128x64}" -threshold 50% -- tmp/*.png + +echo "const unsigned char frame_rate = $3;" > frames.cc +./frames-to-cc tmp/*.png >> frames.cc + +rm -rf tmp |