khenriks / mp3fs

FUSE-based transcoding filesystem from FLAC to MP3
http://khenriks.github.io/mp3fs/
GNU General Public License v3.0
382 stars 46 forks source link

Vorbis tag for "Album Artist" gets copied twice in id3 tag #76

Open mrproj opened 10 months ago

mrproj commented 10 months ago

Ubuntu 22.04 using mp3fs V1.1.1

When I convert a whole album with multiple flac files, the album artist is converted with an error in most of the cases:

test@pr-de-inc:~/_BACKUP/Audio/flac-mp3/David Bowie/1967 David Bowie$ eyeD3 01\ Uncle\ Arthur.mp3 
/home/test/_BACKUP/Audio/flac-mp3/David Bowie/1967 David Bowie/01 Uncle Arthur.mp3                               [ 5.11 MB ]
-----------------------------------------------------------------------------------------------------------------------------
Time: 02:13  MPEG1, Layer III    [ 320 kb/s @ 44100 Hz - Joint stereo ]
-----------------------------------------------------------------------------------------------------------------------------
ID3 v2.4:
title: Uncle Arthur
artist: David Bowie
album: David Bowie
album artist: David Bowie
recording date: 1967
track: 1/14      genre: Rock (id 17)
disc: 1
FRONT_COVER Image: [Size: 34743 bytes] [Type: image/jpeg]
Description: 

-----------------------------------------------------------------------------------------------------------------------------
test@pr-de-inc:~/_BACKUP/Audio/flac-mp3/David Bowie/1967 David Bowie$ eyeD3 02\ Sell\ Me\ A\ Coat.mp3 
/home/test/_BACKUP/Audio/flac-mp3/David Bowie/1967 David Bowie/02 Sell Me A Coat.mp3                             [ 7.02 MB ]
-----------------------------------------------------------------------------------------------------------------------------
Time: 03:03  MPEG1, Layer III    [ 320 kb/s @ 44100 Hz - Joint stereo ]
-----------------------------------------------------------------------------------------------------------------------------
ID3 v2.4:
title: Sell Me A Coat
artist: David Bowie
album: David Bowie
album artist: David BowieDavid Bowie
recording date: 1967
track: 2/14      genre: Rock (id 17)
disc: 1
FRONT_COVER Image: [Size: 34743 bytes] [Type: image/jpeg]
Description: 

-----------------------------------------------------------------------------------------------------------------------------

As you can see: Album Artist on first track is "David Bowie", but on all other tracks of the album it is "David BowieDavid Bowie". Album Artist on vorbis tag is consistently "David Bowie" in all tracks of this album.

I notice that the input flac file is structured like this:

test@pr-de-inc:~/_BACKUP/Audio/flac/David Bowie/1967 David Bowie$ metaflac --list --block-type=VORBIS_COMMENT 01\ Uncle\ Arthur.flac 
METADATA block #2
  type: 4 (VORBIS_COMMENT)
  is last: false
  length: 211
  vendor string: reference libFLAC 1.2.1 20070917
  comments: 9
    comment[0]: TITLE=Uncle Arthur
    comment[1]: ARTIST=David Bowie
    comment[2]: ALBUMARTIST=David Bowie
    comment[3]: ALBUM=David Bowie
    comment[4]: DISCNUMBER=01
    comment[5]: DATE=1967
    comment[6]: TRACKNUMBER=01
    comment[7]: TRACKTOTAL=14
    comment[8]: GENRE=Rock
test@pr-de-inc:~/_BACKUP/Audio/flac/David Bowie/1967 David Bowie$ metaflac --list --block-type=VORBIS_COMMENT 02\ Sell\ Me\ A\ Coat.flac 
METADATA block #2
  type: 4 (VORBIS_COMMENT)
  is last: false
  length: 459
  vendor string: reference libFLAC 1.2.1 20070917
  comments: 18
    comment[0]: TITLE=Sell Me A Coat
    comment[1]: ARTIST=David Bowie
    comment[2]: ALBUMARTIST=David Bowie
    comment[3]: ALBUM=David Bowie
    comment[4]: DISCNUMBER=01
    comment[5]: DATE=1967
    comment[6]: TRACKNUMBER=02
    comment[7]: TRACKTOTAL=14
    comment[8]: GENRE=Rock
    comment[9]: REPLAYGAIN_ALBUM_GAIN=-3.29 dB
    comment[10]: ISRC=GBFO76700020
    comment[11]: GROUPING=David Bowie
    comment[12]: REPLAYGAIN_TRACK_GAIN=-2.93 dB
    comment[13]: LABEL=Deram
    comment[14]: ALBUM ARTIST=David Bowie
    comment[15]: REPLAYGAIN_ALBUM_PEAK=0.991089
    comment[16]: LABELNO=P25L-25027
    comment[17]: REPLAYGAIN_TRACK_PEAK=0.793945

So, my guess is that mp3fs concatenates... comment[2]: ALBUMARTIST=David Bowie ...with... comment[14]: ALBUM ARTIST=David Bowie ...resulting in a double entry in the id3 tag for album artist.

This seems to be the only difference I see between track 01 and track 02.

My suggestion would be that if both entries exist, "'ALBUM ARTIST'" and "'ALBUMARTIST'",... "'ALBUMARTIST'" takes precedence and "'ALBUM ARTIST'" is ignored.