#!/bin/bash # # Date: 2009-12-16 # Author: Ole Kristian Lien # License: GNU General Public License # # Convert the sound from the video to Ogg Vorbis. EXT=`echo "$1"|awk -F . '{print $NF}'` BASENAME=`basename $1 .$EXT` BITRATE="64" if [ -z "$1" ]; then echo "Usage: $0 []" 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)..." # --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 $BITRATE=$2 fi oggenc "$BASENAME.wav" --downmix -b $BITRATE \ 2>&1