blob: 65573f49a243d0690626ebf07343b1706e112bf8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
|