Re: What's the value range of float samples?
Gregory Maxwell <[email protected]> Fri, 11 Jan 2013 11:53:03 -0500
| Newsgroups | gmane.comp.multimedia.ogg.vorbis.general |
|---|---|
| Message-ID | <CAAS2fgSrn6JH2QtHZ9tqxYjGafdf7+gAj29kDAUxaBbUSxpbxQ@mail.gmail.com> |
On Fri, Jan 11, 2013 at 10:41 AM, Nikos Chantziaras <[email protected]> wrote: > Are there any smarter strategies for doing this? Yes, a limiter. Updating your gain adjustment only when you would have otherwise clipped doesn't tend to damage the audio much, as the clipping tends to mask the volume change. > I thought of searching the current playback buffer to find the peak, but This is called a look-ahead limiter. I'm somewhat skeptical of the value of lookahead in limiters because while they reduce the objective distortion at least when the lookahead is not infinite they may be replacing a less audible distortion with a more audible one (a kind of pre-echo). > I suppose ReplayGain could help here for files that do have that information in them? Using the replaygain peak normalization will result in wildly inconsistent volume levels, as the peak differences created by lossy compression are pretty random. For opusfile (the analogs api to vorbisfile for vorbis) we've talked about including a limiter— Opus' more sophisticated lossy compression tends to cause a bit more peak inflation than Vorbis' does— and we'll probably do that eventually. Generally my recommendation for best practics is twofold: Encode things at a pre-normalized loudness that has enough headroom (either at replaygain or EBU R128 levels) so that clipping is almost never a concern, and apply a limiter just in case. _______________________________________________ Vorbis mailing list [email protected] http://lists.xiph.org/mailman/listinfo/vorbis