Audio format conversion
How to convert audio files (MP3, ogg vorbis) in Linux
Sources:
- Convert FLAC files to OGG Vorbis
- ffmpeg man page
- Convert FLAC to mp3 with ffmpeg, keeping all metadata
FLAC to OGG Vorbis
Using value 7 for quaility (-q) setting:
$ ffmpeg -i audiofile.flac -q 7 audiofile.ogg
FLAC to MP3
Now if we want to convert from FLAC to MP3 keeping all metadata (ID3) and 320kbps quality, the following command can be used:
$ ffmpeg -i inputfile.flac -ab 320k -map_metadata 0 -id3v2_version 3 outputfile.mp3
Conclusion
Converting audio files with ffmpeg is not so complicated. Enjoy! :D