FFmpegis a  command line program for transcoding multimedia files. You could e.g. convert mp4 to mp3.