Use ReplayGain (and Opus R128 Gain) tags for loudness normalization #2872
Replies: 3 comments 35 replies
-
|
The loudnorm filter is not that heavy, at least other aspects of MA require more powerful hardware than that simple filter so I don't agree on that. Are you running it on a pi3 or even lower perhaps ? Second of all most tags are just the simple replaygain tags to reduce the loudness of the entire track. Most often those calculations are based by a dumb "check the average loudness" algorithm instead of perreceived average loudness (EBU 128) causing issues with tracks with high dynamic range. It needs to be much, much smarter than that. I suggest you look into the loudnorm filter and the guy who wrote it and then realize that its miles better than just adjusting the gain of an entire track based on a single value. That is at least my opinion after comparing them both (we've had the old method that you propose here before btw). We use loudnorm in 2 pass mode, which means that the first time you play something it runs in dynamic mode, basically collecting the measurement. It will not be as good at that point as its dynamically adjusting only with a limited look ahead. Now, once playback completes we store the measurement in the db (which is not a single value but a collection of values) and the very next time you play a track, it will then use those measured values to do the loudness leveling. So I guess what I'm trying to say is that we implemented loudnorm for a reason; its way better than the common/dumb implementations of the replaygain tag. Maybe the Opus R128 tag is a bit better because that is at least the "average perceived loudness" EBU R128 calculation. More background info about the loudnorm we choose to use in MA: And a pointer to our implementation within the stream controller where you can also see what measurements values we store. |
Beta Was this translation helpful? Give feedback.
-
|
So I can't really tell from the replies, but is the 'implemented' tag correct? (if so, how do I enable? :) ) All of my music has replaygain 2.0 tags, and I don't like the idea of listening to thousands of tracks before a 'loudness' value is assigned to a track, when you can do all the processing beforehand and have it stored in a platform-independent manner (ID3 or FLAC metadata). Also, most of my listening is of albums, so all I need is one 'normalisation' value per album (i.e. album gain tag). |
Beta Was this translation helpful? Give feedback.
-
|
Question: if I add ReplayGain tags to my music files after they have already been played in Music Assistant, will MA pick up the new tags or will it keep using the normalization values it previously computed? If MA keeps using its own stored values, how can I clear them and force MA to read my ReplayGain tags? Thanks. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
As far as I can tell, Music Assistant currently uses ffmpeg's
loudnormfilter to do loudness normalization. I'm unclear when that calculation is done (on demand? on import?), but it's a relatively cpu-heavy filter to run, and while the loudnorm filter's one-pass support for dynamic normalization (dynamic range compression, effectively) might be useful for radio or podcast streams, the filter is not always appropriate for local music files. (Note that for determining the integrated loudness of local files, ffmpeg'sebur128filter should run faster.)But all of my music files contain pre-calculated "integrated" loudness adjustment information, stored either in the form of ReplayGain 2.0 tags or Opus R128 Gain tags. It would be great if Music Assistant could retrieve and use this precalculated loudness normalization information, rather than do its own loudness calculations. (Note that the ReplayGain 2.0 tags use a reference level of -18 LUFS, while the Opus R128 tags use a reference level of -23 LUFS.)
Ideally, the ability to select whether to use "track" or "album" normalization would also be provided - the "album" ReplayGain tags provide a single loudness adjustment for the album as a whole, while preserving dynamic differences between tracks within an album (this can be particularly important for concept albums, and ensures that tracks with gapless playback don't have loudness jumps when switching tracks).
Beta Was this translation helpful? Give feedback.
All reactions