mark speeds given to go as constant
[challenge-bot] / guide / convert-JPG-to-640x480-ogv.bash
CommitLineData
abe3f940 1#! /usr/bin/env bash
2# tldr; AGPLv3+
3# copyright info at bottom
4
5
6number=0
7
16b197b4 8for i in $(find . -iname "*.jpg" -o -iname "*.png"|sort)
abe3f940 9do
10 if test -f "$i"
11 then
12 echo "convert -resize 640x480 \\
13 \"$i\" \\
14 \"`printf %02d $number`.png\""
15 convert -resize 640x480 \
16 "$i" \
17 `printf %02d $number`.png
18 fi
19 number=$((number + 1))
20done
21
22echo "converting pngs to ogv"
23theora_png2theora \
24 --framerate-numerator 1 \
25 --framerate-denominator 1 \
26 --output out.ogv \
27 %02d.png
28
29# Copyright 2016 daniel watson
30
31# This file is part of challenge-bot.
32
33# challenge-bot is free software: you can redistribute it and/or modify
34# it under the terms of the GNU Affero General Public License as
35# published by the Free Software Foundation, either version 3 of the
36# License, or (at your option) any later version.
37
38# challenge-bot is distributed in the hope that it will be useful,
39# but WITHOUT ANY WARRANTY; without even the implied warranty of
40# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41# GNU Affero General Public License for more details.
42
43# You should have received a copy of the GNU Affero General Public
44# License along with challenge-bot. If not, see
45# <http://www.gnu.org/licenses/>.