diff options
Diffstat (limited to 'tools/convert2vorbis')
-rw-r--r-- | tools/convert2vorbis | 38 |
1 files changed, 9 insertions, 29 deletions
diff --git a/tools/convert2vorbis b/tools/convert2vorbis index b3e3809..2a7b2d2 100644 --- a/tools/convert2vorbis +++ b/tools/convert2vorbis @@ -1,58 +1,38 @@ #!/bin/bash # -# Date: 2009-12-10 +# Date: 2009-12-16 # Author: Ole Kristian Lien # License: GNU General Public License # # Convert the sound from the video to Ogg Vorbis. -#./require oggenc vorbis-tools - -# todo: add tag license and copyright metadata (-c tag=value), more tags? -# * language, publisher, copyright -# legg til require EXT=`echo "$1"|awk -F . '{print $NF}'` BASENAME=`basename $1 .$EXT` BITRATE="64" -DATE=`./csv $2 $1 date` -TITLE=`./csv $2 $1 title` -WHAT=`./csv $2 $1 what` -NAME=`./csv $2 $1 name` -GENRE=`./csv $2 $1 genre` -LOCATION=`./csv $2 $1 location` -LICENSE=`./csv $2 $1 license` - if [ -z "$1" ]; then - echo "Usage: $0 <video-file> [<csv-file>]" + echo "Usage: $0 <video-file> [<audio-quality>]" exit 1 fi +./require oggenc # vorbis-tools + if [ ! -f $BASENAME.wav ]; then echo "File $BASENAME.wav does not exists" ./audio_extract $1 fi -echo "Generating $BASENAME.ogg ($BITRATE kbps)" +echo "Generating $BASENAME.ogg ($BITRATE kbps)..." # --downmix #Downmix stereo to mono. Only allowed on stereo input. # sjekke om det er stero først? hvis ja, legg på downmix.. if [ "$2" ]; then -echo "test" - oggenc "$BASENAME.wav" --downmix -b $BITRATE \ - --date "$DATE" \ - --title "$TITLE" \ - --album "$WHAT" \ - --artist "$NAME" \ - --genre "$GENRE" \ - 2>&1 -# > "$BASENAME.ogg-compresslog" 2>&1 -else - oggenc "$BASENAME.wav" --downmix -b $BITRATE \ - 2>&1 - #> "$BASENAME.ogg-compresslog" 2>&1 + $BITRATE=$2 fi + +oggenc "$BASENAME.wav" --downmix -b $BITRATE \ + 2>&1 |