[vorbis] Is Vorbis prone to clipping?

Graham Mitchell graham at grahammitchell.com
Thu Jul 3 08:23:48 PDT 2003



On Thursday 03 July 2003 09:17, Headless wrote:
> with the Lame MP3 encoder I reduce the amplitude of the input signal
> prior to encoding with the --scale option to prevent clipping that can
> be introduced due to resampling errors.
>
> Is Vorbis prone to this sort of clipping?

Well, Vorbis doesn't get the output volume level *exactly* the same as the 
original, 100% of the time... that's just a problem inherent to lossy codecs.

As Andrew already mentioned, of course the real problem (IMO) is that studios 
compress the crap out of everything and then jack it up so the average volume 
is as high as possible.  Which means an error of 1 dB in the encoder could 
make something clip that didn't before.

If you're asking if Vorbis is naturally worse at this than Lame, then the 
answer is probably not, although lame is a very well-tuned encoder, given the 
constraint that it's having to use the mp3 format.  As far as I can tell, 
oggenc does not have an option built-in to adjust volume of the input before 
encoding like lame does.

If it's a concern, you can just encode your files normally, and use something 
like vorbisgain to tag the files so they play back without clipping and at a 
consistent volume.  (Vorbisgain is at http://sjeng.org/vorbisgain.html)  Of 
course, this only works for decoders that are smart enough to read and use 
vorbisgain tags (which is most of them that handle Ogg Vorbis files anyway, 
but not all of them); less-sophisticated players will play the file back at 
full volume.

Or, if you prefer actually changing the volume of the data before encoding 
(rather than merely tagging like vorbisgain does), you'd want something like 
'normalize' (http://www1.cs.columbia.edu/~cvaill/normalize/) that you can run 
on the WAVs before encoding.  This has the disadvantage that it makes 
irrevocable changes to the file, and you can't get back the "original" volume 
even if you wanted, which bothers some purists.  But it has the advantage 
that the files are played at the same volume everywhere.


-- 
Graham Mitchell - computer science teacher, Leander High School
"Man is the best computer we can put aboard a spacecraft... and the only
one that can be mass-produced with unskilled labor."
	-- Wernher von Braun

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.




More information about the Vorbis mailing list