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

ID3v1 information not transferred to ID3v2 when stripping tags (-S) #60

Open bjorn-wiberg opened 1 year ago

bjorn-wiberg commented 1 year ago

When using -S on ID3v1-only MP3 input files, the track information from ID3v1 does not appear to be transferred to the new ID3v2 tag:

bwiberg@glimmer:/tmp/bw$ loudgain -v
loudgain 0.6.8 - using:
  libebur128 1.2.5
  libavformat 58.45.100
  libswresample 3.7.100

bwiberg@glimmer:/tmp/bw$ apt-show-versions loudgain
loudgain:amd64/bullseye 0.6.8+ds-1+b1 uptodate

bwiberg@glimmer:/tmp/bw$ eyeD3 *.mp3
eyed3.plugins:WARNING: Plugin '('lastfm.py', '/usr/lib/python3/dist-packages/eyed3/plugins')' requires packages that are not installed: No module named 'pylast'
eyed3.id3:WARNING: Invalid numeric genre ID: 255
eyed3.id3.tag:WARNING: Invalid numeric genre ID: 255
/tmp/bw/James Brown - Living in America.mp3                                                                                                                                                                                     [ 10.79 MB ]
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Time: 04:43     MPEG1, Layer III        [ 320 kb/s @ 44100 Hz - Joint stereo ]
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ID3 v1.0:
title: Living in America
artist: James Brown
album:
track:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

bwiberg@glimmer:/tmp/bw$ loudgain -d -5 -I 3 -k -L -S -s e *.mp3
[✔] Scanning 'James Brown - Living in America.mp3' ...
[✔] Container: MP2/3 (MPEG audio layer 2/3) [mp3]
[✔] Stream #0: MP3 (MPEG audio layer 3), 44100 Hz, 2 ch, stereo
 100% [=====================================================================================================================================================================================================================================]

Track: James Brown - Living in America.mp3
 Loudness:   -11.48 LUFS
 Range:        3.51 dB
 Peak:     1.090028 (0.75 dBTP)
 Gain:       -11.52 dB

bwiberg@glimmer:/tmp/bw$ eyeD3 *.mp3
eyed3.plugins:WARNING: Plugin '('lastfm.py', '/usr/lib/python3/dist-packages/eyed3/plugins')' requires packages that are not installed: No module named 'pylast'
/tmp/bw/James Brown - Living in America.mp3                                                                                                                                                                                     [ 10.79 MB ]
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Time: 04:43     MPEG1, Layer III        [ 320 kb/s @ 44100 Hz - Joint stereo ]
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ID3 v2.3:
title:
artist:
album:
track:
UserTextFrame: [Description: replaygain_track_gain]
-11.52 dB
UserTextFrame: [Description: replaygain_track_peak]
1.090028
UserTextFrame: [Description: replaygain_reference_loudness]
-23.00 LUFS
UserTextFrame: [Description: replaygain_track_range]
3.51 dB
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
bwiberg@glimmer:/tmp/bw$

I would have expected the track information (title and artist) to be transferred to the ID3v2 tag, as https://github.com/Moonbase59/loudgain#user-content-strip-unwanted-id3v1apev2-tags--s---striptags states that /../ loudgain will try to keep content from other tag types as far as possible /../ and transport it over into appropriate ID3v2 tags /../ (if we consider ID3v1 a different tag type from ID3v2).