diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2024-02-12 17:32:48 +0100 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2024-02-12 17:32:48 +0100 |
commit | 5db1ecd3fc2ab0c7942476bae07e57be66e7689c (patch) | |
tree | 30a0a75949c9dd27992f84da481be5d7d35d0fd0 /src/app/bad-apple-stm32f4-ssd1306-128x64/convert | |
parent | 3fffef85de0b780eb26beef5625242355053e872 (diff) |
Add Bad Apple on STM32F4 (WiP; timer is still missing)
Diffstat (limited to 'src/app/bad-apple-stm32f4-ssd1306-128x64/convert')
-rwxr-xr-x | src/app/bad-apple-stm32f4-ssd1306-128x64/convert | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/app/bad-apple-stm32f4-ssd1306-128x64/convert b/src/app/bad-apple-stm32f4-ssd1306-128x64/convert new file mode 100755 index 0000000..7d2ca0e --- /dev/null +++ b/src/app/bad-apple-stm32f4-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 |