summaryrefslogtreecommitdiffstats
path: root/abs/core
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2012-05-18 19:20:43 (GMT)
committerBritney Fransen <brfransen@gmail.com>2012-05-18 19:20:43 (GMT)
commit6a45feda7d6c85c7462a5f9d5919e013b616c03b (patch)
treed5f439fad1fbbd1c025b7060711501d25a1b2365 /abs/core
parent4703b3078c821613c9654ae031a9ed1740a59cd7 (diff)
downloadlinhes_pkgbuild-6a45feda7d6c85c7462a5f9d5919e013b616c03b.zip
linhes_pkgbuild-6a45feda7d6c85c7462a5f9d5919e013b616c03b.tar.gz
linhes_pkgbuild-6a45feda7d6c85c7462a5f9d5919e013b616c03b.tar.bz2
linhes-scripts: myth2mp3: remove / from titles
Diffstat (limited to 'abs/core')
-rw-r--r--abs/core/linhes-scripts/PKGBUILD4
-rwxr-xr-xabs/core/linhes-scripts/myth2mp311
2 files changed, 8 insertions, 7 deletions
diff --git a/abs/core/linhes-scripts/PKGBUILD b/abs/core/linhes-scripts/PKGBUILD
index 9d3b507..8fabce8 100644
--- a/abs/core/linhes-scripts/PKGBUILD
+++ b/abs/core/linhes-scripts/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=linhes-scripts
pkgver=7
-pkgrel=34
+pkgrel=35
pkgdesc="Various scripts that help to make LinHES, LinHES."
arch=('i686' 'x86_64')
license=('GPL2')
@@ -70,7 +70,7 @@ md5sums=('f56985b2d602e11dc1e10d3e7848b2a5'
'1274bad3fb7296f00acd2d44804bad14'
'47225fa9b6c953d56f6ede84d921a300'
'6b6e7d34a4bda6d608d150039adefd07'
- '3fe554dbbf7d09e1f9925032ba888bf5'
+ '4be408c11fc888b703c35062d02c6212'
'18263972b6326e140bbef0bb7dfa2da9'
'410795ef9039e4c6c0484e706ecfd567'
'0750d7c65109d12aa536f312a38410d1'
diff --git a/abs/core/linhes-scripts/myth2mp3 b/abs/core/linhes-scripts/myth2mp3
index 89181c1..504322e 100755
--- a/abs/core/linhes-scripts/myth2mp3
+++ b/abs/core/linhes-scripts/myth2mp3
@@ -1,6 +1,6 @@
#!/bin/sh
# convert recordings to as mp3 audio only
-# version 0.9
+# version 1.0
# usage:
# first parameter must be %DIR%/%FILE% of the recording
@@ -23,13 +23,14 @@ TMPNAME=toMP3-$$
TMPFILE=/myth/tmp/$TMPNAME.mp3
TMPCUTFILE=/myth/tmp/$TMPNAME.mpg
FFINPUTFILE=$1
+TITLE=`echo $2 | sed 's/\//_/g'`
# log file location
LOGFILE=/var/log/mythtv/myth2mp3.log
CDate="`date`"
echo "" >> $LOGFILE
echo $CDate >> $LOGFILE
-echo "File to encode: $1 Name: $2" >> $LOGFILE
+echo "File to encode: $1 Name: $TITLE" >> $LOGFILE
# start timer
beforetime="$(date +%s)"
@@ -46,15 +47,15 @@ fi
# run ffmpeg to do conversion
echo "Encoding..." >> $LOGFILE
-/usr/bin/nice -n19 /usr/bin/ffmpeg -i "$FFINPUTFILE" -vn -acodec libmp3lame -ab $BITRATE -ar 44100 -ac 2 "$TMPFILE"
+/usr/bin/nice -n19 /usr/bin/ffmpeg -i "$FFINPUTFILE" -vn -acodec libmp3lame -ab $BITRATE -ar 44100 -ac 2 -vol 2048 "$TMPFILE"
ERROR=$?
# make output filename unique
-OUTPUTFILE=$OUT_DIR/$2.mp3
+OUTPUTFILE=$OUT_DIR/$TITLE.mp3
i=1
while [ -e "$OUTPUTFILE" ]
do
- OUTPUTFILE=$OUT_DIR/$2-$i.mp3
+ OUTPUTFILE=$OUT_DIR/$TITLE-$i.mp3
i=`expr $i + 1`
done