×
Create a new article
Write your page title here:
We currently have 3,189 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,189Articles

    Wma2mp3 script unsing mplayer and lame

    since you have installed mplayer and mp3encoder lame, you can use this script to convert the .wma files in your current directory into .mp3 - files.

    #!/bin/sh
    # name: wma2mp3.sh
    # hundfred
    # date: june 2004
    # converts .wma files in the current directory to .mp3 files
    #
    # requires lame mp3 encoder and to decode the wma-files;
    #mplayer is needed
    for i in `ls | sed 's/ /_123BLANK_/g' | grep .wma` ; do {
            wma=$(echo $i | sed 's/_123BLANK_/ /g'); #fileman wmafile
            wav=$(echo $wma | sed 's/.wma/\.wav/g'); #filenname wavfile
            mp3=$(echo $wma | sed 's/.wma/\.mp3/g'); #filenname mp3
            mplayer "$wma" -ao pcm -aofile "$wav" && lame "$wav" "$mp3" && rm "$wav" && rm "$wma";
            }
    done;
    
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.