Is plugin the right way to go?

I am curious which way I need to go to extend picard, plugin or some other way?

I want to use ffmpeg’s loudnorm function to be able to normalize my audio files to the EBU-R-128 standard through picard.

I was wondering if the way to do this would be to make it a file_post_save_processor() event?

I do not see any tags related to normalization other than replayGain. I was considering adding custom tags as comments and then allowing my music player software to check for those tags in the comments.

1 Like

Yes, a plugin would be the right thing. However, you have to consider a bit how to do this. Using the file post save processor allows you to update this completely, which is great. But if you want to calculate the loudness adjustment also for the entire album it will be difficult. There is not yet a post album save processor unfortunately. For this you’d register manual context menu action with register_album_action, see http://picard-docs.musicbrainz.org/en/extending/plugins.html

For the tags I would actually recommend following the Replaygain 2.0 Spec, which is based upon EBU R-128. That way you automatically get good player support, no need to invent your own. The tags for this are supported by Picard even.

You can of course use ffmpeg, than write the tags with your plugin. But there are also some great tools which do this, e.g. I use loudgain by @Moonbase, or there is the very similar regained by @kepstin.

I would love to see a good plugin for Replaygain 2.0 handling and get rid of the old Replaygain plugin that still exists.

1 Like

My intention is to normalize each audio file to -23 LUFS as per the EBU R-128, so normalizing across an album wouldn’t be necessary, would it? Maybe I’m misunderstanding normalization?

Most players have a ‘smart gain’ play back mode.
(or you can set them to use ‘album’ gain’ instead of ‘track gain’)
Then if an album is played, the album as a whole will have the loudness as set when analysing it.
Without that setting/tag, every song will be played at it’s own loudness, which will not be how it was intended for the album.
Also there could be a sudden jump in loudness when playing gap-less songs that have track gains that are far apart.

1 Like

The RG2 spec also has a nice explanation for this:

Under some listening conditions, it’s useful to have every track sound equally loud. The problem with a track-by-track approach is that tracks which should be quiet in the context of the album on which they reside will be brought up to the level of all the rest. For casual listening, or in a noisy background, this can be a good thing. For serious listening, it does not respect the intent of the artist or mastering engineer; a tender ballad track will be blasting at the same loudness as a hard rock track on the same album. It’s generally ideal to leave the intentional loudness differences between tracks in place, yet still correct for unmusical and annoying loudness differences between albums. To accomplish this, ReplayGain suggests that two different gain adjustments should be stored as metadata with each sound file.

So the album mode basically treats all tracks on an album as one large piece of audio and calculates a single gain adjustment for it.

1 Like