[ create a new paste ] login | about

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

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

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



Create a new paste based on this one


Comments: