Ffmpeg is a great quick way to convert media files. I often use it to convert audio files to the desired format. the simplest way to use it is like the following example;
$ ffmpeg -i input.mp3 output.wav
In the next example I add a codec to convert to mp3;
$ ffmpeg -i input.m4a -acodec libmp3lame -aq 2 output.mp3