Moonbase59 / loudgain

ReplayGain 2.0 loudness normalizer based on the EBU R128/ITU BS.1770 standard (-18 LUFS, FLAC, Ogg, MP2, MP3, MP4, M4A, AAC, ALAC, Opus, ASF, WMA, WAV, AIFF, WavPack, APE)
Other
190 stars 23 forks source link

--tagmode=e writes reference loudness as LUFS instead of dB #46

Open okuuva opened 3 years ago

okuuva commented 3 years ago

AFAICS there's no way to write reference loudness tag as dB. IMO --help output implies that --tagmode=e should write it as dB (and it would be consistent with other written tags):

-s i, --tagmode=i       Write ReplayGain 2.0 tags to files. 
-s e, --tagmode=e       like '-s i', plus extra tags (reference, ranges).
-s l, --tagmode=l       like '-s e', but LU units instead of dB.

loudgain output:

❯ loudgain --album --tagmode=e 01_-_Hiekka.mp3
[✔] Scanning '01_-_Hiekka.mp3' ...
[✔] Container: MP2/3 (MPEG audio layer 2/3) [mp3]
[✔] Stream #0: MP3 (MPEG audio layer 3), 44100 Hz, 2 ch, stereo
 100% [=========================================================================]

Track: 01_-_Hiekka.mp3
 Loudness:    -6.95 LUFS
 Range:        4.63 dB
 Peak:     1.116540 (0.96 dBTP)
 Gain:       -11.05 dB

Album:
 Loudness:    -6.95 LUFS
 Range:        4.63 dB
 Peak:     1.116540 (0.96 dBTP)
 Gain:       -11.05 dB

eyeD3 ouput:

❯ eyeD3 01_-_Hiekka.mp3
./01_-_Hiekka.mp3                                                                                                                                                                                     [ 10.14 MB ]
-------------------------------------------------------------------------------------------------------------
Time: 04:21     MPEG1, Layer III        [ 320 kb/s @ 44100 Hz - Joint stereo ]
-------------------------------------------------------------------------------------------------------------
ID3 v2.4:
title: Hiekka
artist: Apulanta
album: Hiekka
recording date: 2002
track: 1/10
UserTextFrame: [Description: REPLAYGAIN_TRACK_GAIN]
-11.05 dB
UserTextFrame: [Description: REPLAYGAIN_TRACK_PEAK]
1.116540
UserTextFrame: [Description: REPLAYGAIN_ALBUM_GAIN]
-11.05 dB
UserTextFrame: [Description: REPLAYGAIN_ALBUM_PEAK]
1.116540
UserTextFrame: [Description: REPLAYGAIN_REFERENCE_LOUDNESS]
-18.00 LUFS
UserTextFrame: [Description: REPLAYGAIN_TRACK_RANGE]
4.63 dB
UserTextFrame: [Description: REPLAYGAIN_ALBUM_RANGE]
4.63 dB
FRONT_COVER Image: [Size: 193422 bytes] [Type: image/jpeg]
Description:

Runnin on Debian Testing with loudgain 0.6.8 installed from apt:

❯ apt info loudgain
Package: loudgain
Version: 0.6.8+ds-1+b1
Priority: optional
Section: sound
Source: loudgain (0.6.8+ds-1)