summaryrefslogtreecommitdiffstats
path: root/tools/convert2theora
diff options
context:
space:
mode:
Diffstat (limited to 'tools/convert2theora')
-rwxr-xr-xtools/convert2theora39
1 files changed, 12 insertions, 27 deletions
diff --git a/tools/convert2theora b/tools/convert2theora
index 93f464f..98b049a 100755
--- a/tools/convert2theora
+++ b/tools/convert2theora
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Date: 2009-12-10
+# Date: 2009-12-16
# Author: Ole Kristian Lien
# License: GNU General Public License
#
@@ -9,42 +9,27 @@
EXT=`echo "$1"|awk -F . '{print $NF}'`
BASENAME=`basename $1 .$EXT`
-WHAT=`./csv $2 $1 what`
-DATE=`./csv $2 $1 date`
-LOCATION=`./csv $2 $1 location`
-TITLE=`./csv $2 $1 title`
-NAME=`./csv $2 $1 name`
-LICENSE=`./csv $2 $1 license`
-ORGANIZATION=`./csv $2 $1 organization`
-CONTACT=`./csv $2 $1 contact`
+VIDEOQUALITY=8
+AUDIOQUALITY=4
if [ -z "$1" ]; then
- echo "Usage: $0 <video-file> [<csv-file>]"
+ echo "Usage: $0 <video-file> [<video-quality> <audio-quality>]"
exit 1
fi
+if [ "$3" ]; then
+ $VIDEOQUALITY=$2
+ $AUDIOQUALITY=$3
+fi
+
# todo: pass på å behold 4:3/16:9 i x:y..
if [ ! -f "$BASENAME.ogv" ] ; then
- echo "Generating $BASENAME.ogv"
-
- if [ $2 ]; then
- ffmpeg2theora $1 -o $BASENAME.ogv \
- --width 384 --height 288 \
- --artist "$NAME" \
- --title "$TITLE" \
- --date "$DATE" \
- --location "$LOCATION" \
- --organization "$ORGANIZATION" \
- --copyright "$COPYRIGHT" \
- --license "$LICENSE" \
- --contact "$CONTACT" \
+ echo "Generating $BASENAME.ogv..."
+ ffmpeg2theora $1 -o $BASENAME.ogv \
+ --videoquality $VIDEOQUALITY --audioquality $AUDIOQUALITY \
> "$BASENAME.ogv-compresslog" 2>&1
- else
- ffmpeg2theora $1 -o $BASENAME.ogv \
# --width 384 --height 288
- > "$BASENAME.ogv-compresslog" 2>&1
- fi
else
echo "$BASENAME.ogv allready exist!"
exit 1