Added nokia-media converter
authorTim Pope <code@tpope.net>
Tue, 20 Jul 2004 21:30:37 +0000 (21:30 +0000)
committerTim Pope <code@tpope.net>
Tue, 20 Jul 2004 21:30:37 +0000 (21:30 +0000)
bin/nokia-media-converter [new file with mode: 0755]

diff --git a/bin/nokia-media-converter b/bin/nokia-media-converter
new file mode 100755 (executable)
index 0000000..e856224
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh
+# Author: Tim Pope
+
+# Converts a media file to a format capable of being played on a supported
+# mobile phone, such as the Nokia 3650 and 7650.
+
+# Most software required by this script is fairly standard.  You will need
+# a copy of RealProducer Basic 8.51 for Linux, which is free-as-in-beer,
+# although a bit hard to come by.  A version might be available at
+# <http://www.ezytech.com.cn/real/RealDownload/dlindex.htm>
+
+[ -z "$TMPDIR" ] && TMPDIR=/tmp
+
+if [ -z "$2" ]; then
+    echo "Usage: `basename $0` <infile> <outfile>"
+    exit 1
+fi
+
+IN="$1"
+OUT="$2"
+
+mencoder -oac mp3lame -channels 1 -ovc xvid -xvidencopts bitrate=800:me_quality=6:4mv -ofps 15 -vf scale=176:-2 -sws 2 -o "$TMPDIR/$OUT.avi" "$IN"
+transcode -y mov -F 'raw ',twos -N 0x1 -P 0 -I 3 -k -z -i "$TMPDIR/$OUT.avi" -o "$TMPDIR/$OUT.mov"
+rm -f "$TMPDIR/$OUT.avi"
+realproducer -t 2 -a 1 -r 1 -k 1 -h "Tim Pope" -i "$TMPDIR/$OUT.mov" -o "$OUT" \
+    && rm -f "$TMPDIR/$OUT.mov"