add attach breadboard to deck video
[challenge-bot] / guide / convert-JPG-to-640x480-ogv.bash
diff --git a/guide/convert-JPG-to-640x480-ogv.bash b/guide/convert-JPG-to-640x480-ogv.bash
new file mode 100755 (executable)
index 0000000..0d4a649
--- /dev/null
@@ -0,0 +1,45 @@
+#! /usr/bin/env bash
+# tldr; AGPLv3+
+# copyright info at bottom
+
+
+number=0
+
+for i in *.JPG
+do
+  if test -f "$i"
+  then
+    echo "convert -resize 640x480 \\
+         \"$i\" \\
+         \"`printf %02d $number`.png\""
+    convert -resize 640x480 \
+            "$i" \
+            `printf %02d $number`.png
+  fi
+  number=$((number + 1))
+done
+
+echo "converting pngs to ogv"
+theora_png2theora \
+  --framerate-numerator 1 \
+  --framerate-denominator 1 \
+  --output out.ogv \
+  %02d.png
+
+# Copyright 2016 daniel watson
+
+# This file is part of challenge-bot.
+
+# challenge-bot is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+
+# challenge-bot is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+
+# You should have received a copy of the GNU Affero General Public
+# License along with challenge-bot.  If not, see
+# <http://www.gnu.org/licenses/>.