Transcoding from Ogg to MP3
You have a bunch of Ogg files and want to listen to them on a device that can only play MP3s? FFmpeg is the ultimate tool to help you. Save this as an executable shell script "ogg2mp3_all.sh" and it will transcode all files in the current directory:
#!/bin/bash
for file in *.ogg
do ffmpeg -i "${file}" -ab 128k -map_meta_data outputfile:inputfile "${file%.ogg}.mp3"
done
The nice thing about this approach is that it will keep the metadata intact. It also deals correctly with spaces in file names. Please note that FFmpeg might output the message "Audio encoding failed". This does not mean anything. Simply ignore it.