When trying to convert either an mp3 or flac file to ogg, the output ogg file is actually a flac file with a large file size.

For instance: running for file in *.mp3; do ffmpeg -i "${file}" "${file/%mp3/ogg}"; done and then checking the file with mediainfo output.ogg gives:

Complete name                            : 06 - Magma.ogg
Format                                   : Ogg
Format/Info                              : Free Lossless Audio Codec
File size                                : 47.0 MiB
Duration                                 : 6mn 42s
Overall bit rate mode                    : Variable
Overall bit rate                         : 980 Kbps

ID                                       : 1238237382 (0x49CE00C6)
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
Duration                                 : 6mn 42s
Bit rate mode                            : Variable
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 44.1 KHz
Bit depth                                : 16 bits
Writing library                          : Lavf57.37.100

The input mp3 in my case was 6 megabytes, but the ogg file is for some reason 47 megabytes. Why is this happening, and is there a why to convert files to ogg without this happening?


As you can see in the output, you encoded your audio into Format : FLAC. This is a format with lossless compression. ogg is just a container, and can hold different formats. To keep a similar size and quality as your mp3 you can choose the more usual vorbis format explicitly:

ffmpeg -i in.mp3 -c libvorbis out.ogg

The fact that it did not do this by default may mean you need to install a libvorbis package, depending on your system.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.