[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: convert m4a audio files to mp3?




--- On Thu, 6/11/09, Kevin Kempter <kevin kevinkempterllc com> wrote:

> From: Kevin Kempter <kevin kevinkempterllc com>
> Subject: convert m4a audio files to mp3?
> To: "Community assistance, encouragement, and advice for using Fedora." <fedora-list redhat com>
> Date: Thursday, June 11, 2009, 10:07 AM
> #yiv600762138 p, #yiv600762138 li
> {white-space:pre-wrap;}Hi all;
> 
> 
> My son who has been running a mac for a few years has
> finally had it and wants to return to the land of Linux.
> 
> 
> He's copied the entire itunes library/directory
> from his mac to his new Linux box.
> 
> 
> How can I convert all these m4a files to mp3?  I tried
> lame but it gives me an 'unsupported format' error.
> 
> 
> 
> Thanks in advance..
> -----Inline Attachment Follows-----


http://www.linuxquestions.org/questions/linux-general-1/converting-m4a-to-mp3-170553/

or you can copy + paste following code: from

http://flodhest.net/files/linux/m4a2mp3.sh?embed=1


#!/bin/sh
 
MPLAYER=mplayer
LAME=lame
 
for m4a in *.m4a; do
    mp3=`echo "$m4a" | sed -e 's/m4a$/mp3/'`
    wav="$m4a.wav"
 
    if [ ! -e "$mp3" ]; then
        [ -e "$wav" ] && rm "$wav"
 mkfifo "$wav" || exit 255
        mplayer "$m4a" -ao pcm:file="$wav" &>/dev/null &
        lame "$wav" "$mp3"
        [ -e "$wav" ] && rm "$wav"
    fi
 done
 
exit 0;

Save it as m4a2mp3 and chmod +x and run ./m4a2mp3 in directory



      


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]