diff options
author | Greg Frost <gregfrost1@bigpond.com> | 2009-08-04 01:22:18 (GMT) |
---|---|---|
committer | Greg Frost <gregfrost1@bigpond.com> | 2009-08-04 01:22:18 (GMT) |
commit | e85c92735d5ce5f790cf95a0ea02e08c264e170a (patch) | |
tree | 037a1921e8f6899fea9b5daaaf998ec746367298 /abs/core-testing/linhes-scripts/src/770-wrapper.sh | |
parent | 82af083e07eb189ac930678224a5748551cf69f8 (diff) | |
parent | 120212bdd438d98c52aaab5b43443258be81a7e4 (diff) | |
download | linhes_pkgbuild-e85c92735d5ce5f790cf95a0ea02e08c264e170a.zip linhes_pkgbuild-e85c92735d5ce5f790cf95a0ea02e08c264e170a.tar.gz linhes_pkgbuild-e85c92735d5ce5f790cf95a0ea02e08c264e170a.tar.bz2 |
Merge branch 'master' of ssh://gregfrost@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Diffstat (limited to 'abs/core-testing/linhes-scripts/src/770-wrapper.sh')
-rwxr-xr-x | abs/core-testing/linhes-scripts/src/770-wrapper.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/abs/core-testing/linhes-scripts/src/770-wrapper.sh b/abs/core-testing/linhes-scripts/src/770-wrapper.sh new file mode 100755 index 0000000..65573f4 --- /dev/null +++ b/abs/core-testing/linhes-scripts/src/770-wrapper.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# 770-wrapper.sh by Cecil Watsona +# Modifed from +# pdatranscode +# +# created by Jeff Volckaert (inspired by Zach White) +# modified 01/16/06 +VIDEODIR=$1 +FILENAME=$2 +TITLE=$3 +# Remove non-alpha characters from TITLE +TITLE=${TITLE//[^a-zA-Z0-9]/} +STARTTIME=$4 +DIROUT=/myth/n770 + +# Sanity checking, to make sure everything is in order. +if [ -z "$VIDEODIR" -o -z "$FILENAME" ]; then + echo "Usage: $0 <VideoDirectory> <FileName> "<Title>" <Starttime>" + exit 5 +fi +if [ ! -f $VIDEODIR/$FILENAME ]; then + echo "File does not exist: $VIDEODIR/$FILENAME" + exit 6 +fi + +# Transcode the file + + +perl /usr/local/bin/770-encode.pl -q -p mplayer $VIDEODIR/$FILENAME $DIROUT/$TITLE-$STARTTIME.avi + +chmod 664 $DIROUT/$TITLE-$STARTTIME.avi + +ERROR=$? +if [ $ERROR -ne 0 ]; then + echo "Transcoding failed for ${FILENAME} with error $ERROR" + exit 3 +fi |