linuxunixmultimedia

Converting MP3 to Ogg in CentOS


We need to play MP3 files in jPlayer without using Flash as a fallback.

For playing these files with Firefox, I want to convert it to Ogg. Do you guys have any options/alternative for this? I tried to use dir2ogg in CentOS, but it says "no DECODER found for MP3".

Please recommend a tool for converting MP3 to Ogg in CentOS.


Solution

  • I typically use FFmpeg for this:

    ffmpeg -i source.mp3 -codec:a libvorbis -qscale:a 8 output.ogg
    

    Note though that you should really convert from the lossless source, not an MP3. You're losing another level of quality by using a lossy codec on a file that was already compressed with a lossy codec.

    Also, given the time of the question, I assume you wanted to use Vorbis for the codec. For anyone finding this answer now, consider Opus. It will fit in your Ogg container, but has much higher quality for a given bitrate.