Why is my ogg bigger than my m4a?

1

I am using the following commands to encode an audio file to m4a & ogg formats:

ffmpeg.exe -i 0123456789 -ab 192k out.m4a
ffmpeg.exe -i 0123456789 -f wav - | oggenc2.exe - -r -q 6 -o out.ogg

(0123456789 has no extension.)

My m4a output is 14,608kB while my ogg output is 19,809kB.

Why? AFAIK -q 6 is roughly 192kbps. So it should be about even. I could see one file being 1-3MB bigger than the other, but 5MB is pretty large. The m4a is almost 75% of the ogg! Why is this?

user3109

Posted 2010-03-25T20:03:35.067

Reputation:

you're comparing lossy audio compression formats; they do different things to achieve their compressions. "-q 6 is roughly 192kb" captures the crux -- it's "roughly" equivalent according to some subjective tests, but there's no objective proof that a quality level in one codec is the equal of a quality level in another. – quack quixote – 2010-03-25T20:09:56.803

what format is the 0123456789 source? – Shevek – 2010-06-30T11:53:08.027

@Shevek: Any, i cant remember what format it was in this test. Possibly flac, maybe aac. – None – 2010-06-30T19:01:37.823

Answers

2

-q 6 is roughly 192kb

You are specifying a variable bit rate for the ogg, and fixed bit rate for the m4a. While the variable bit rate is nominally 192kb, it is not guaranteed to be 192kb, and for especially complex music, it will be larger.

Adam Davis

Posted 2010-03-25T20:03:35.067

Reputation: 4 327

1

-q 6 has a target of ~192 kbit/s but will actually range from ~192 kbit/s to ~224 kbit/s so if your file is particularly complex it will tend toward the higher end

Info from Hydrogen Audio

Shevek

Posted 2010-03-25T20:03:35.067

Reputation: 15 408

1

Using a quality setting like "-q 6" the encoder will fluxuate the bitrate to keep a certain quality. Certain quality settings may commonly produce a particuarl bitrate (6 may usually end up being 192k) but it will depend on the sound being encoded.

Chris S

Posted 2010-03-25T20:03:35.067

Reputation: 5 907