[ create a new paste ] login | about

Link: http://codepad.org/H10rXB2a    [ raw code | fork ]

jpjacobs - Plain Text, pasted on Oct 23:
any2any() {
# arguments: $1 output dir without trailing slash
    SOURCE=${1:-"./"}
    DEST=${2:-"./"}
    FROM=${3:-"mp3"}
    TO=${4:-"ogg"}
    if [ -z $5]
    then
        case $TO in
            "ogg" )
                CODEC="libvorbis";;
            "mp3" )
                CODEC="mp3";;
        esac
    else
        TO=$5
    fi  

    for file in $SOURCE*.$FROM
    do
        FN=${file##*/}
        avconv -i "$file" -ab 192k -acodec $CODEC "$DEST${file%.*}.$TO"
    done
}



Create a new paste based on this one


Comments: