Bug 151657 - Album art incorrectly loaded from embedded MP3 ID3
Summary: Album art incorrectly loaded from embedded MP3 ID3
Status: RESOLVED INTENTIONAL
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.4.7
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-31 23:02 UTC by S. Reuillon
Modified: 2008-10-20 14:14 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
My ~/.kde/share/apps/amarok/albumcovers/tagcover/ (438.30 KB, image/png)
2007-11-01 11:04 UTC, S. Reuillon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description S. Reuillon 2007-10-31 23:02:04 UTC
Version:           1.4.7 (using KDE 3.5.8, Kubuntu (gutsy) 4:3.5.8-0ubuntu3.1)
Compiler:          Target: x86_64-linux-gnu
OS:                Linux (x86_64) release 2.6.22-14-generic

The album art embedded in my MP3s are not correctly loaded by Amarok.
Images seem to be wrongly decodded as we can recognize the original image but colors are mixed and horizontal lines appear. We cannot inlcude images in this descrpition but the result is quite ugly.

In my ~/.kde/share/apps/amarok/albumcovers/tagcover/ only 1 or 2 covers are OK.

I use MP3 music files with ID3 V2.4 tag and album art have been added with both Easy Tag (linux) and Mp3Tag (Windows) which, contrary to amarok, display covers correctly. Moreover images includes in MP3s are displayed correctly by both Winamp and iTunes. These 2 elements make me think that sources (MP3 files) are OK.
Comment 1 Seb Ruiz 2007-10-31 23:05:04 UTC

*** This bug has been marked as a duplicate of 151609 ***
Comment 2 S. Reuillon 2007-11-01 11:04:42 UTC
Created attachment 21968 [details]
My ~/.kde/share/apps/amarok/albumcovers/tagcover/

In the following attached file a view of my
~/.kde/share/apps/amarok/albumcovers/tagcover/ to precise the problem that i
apparently did not described clearly enought.
Comment 3 S. Reuillon 2007-11-01 11:11:39 UTC
I have confirmation from Jeff Kerr on one example that the problem i see is not present on his side (which does not mean that i do not see his problem).

I reopen the bug and remove the "duplicate" tag.
Comment 4 S. Reuillon 2007-11-15 09:07:57 UTC
I have a new element in my problem.

A song being loaded in Amarok, i get the properties of the song by right clicking, then, i can see the album art which is still bad as i described in the definition of bug.
But when i right click on the image and see the original image (full size), the image is correctly dispayed !!

I deduce 2 things :
1) image has been correctly loaded by Amarok 
2) the problem would comes from the resizing function used by Amarok that i suppose is included in a generic library

Any known issue coming from the resizing function used by Amarok 1.4.7 on Kubuntu (gutsy) x86_64 using KDE 3.5.8 ???
Comment 5 Sven Krohlas 2007-11-30 10:43:16 UTC
On IRC we now had the second user in only a few days reporting this. Maybe a taglib bug?
Comment 6 Brandon Lake 2007-11-30 10:50:54 UTC
I am experiencing the exact same issue as stated above. However except when Mr. Reuilon said that he right clicks the song, and I am assuming, going into 'Edit Track Information', and then viewing the cover full size, that it appears normally without the distortion. That is not true for me, I see the distortion throughout, including in the Cover Manager, also full size in there.

They are also mp3s with the cover art embedded in them for me, also used the same application, mp3tag v2.38. Running Ubuntu 7.10 and Amarok 1.4.7. Covers work in practically everything in Windows, so I am conceding to the assumption made that there shouldn't be anything wrong with the mp3s or the method of tagging.

Also if it helps any, all the covers that are embedded are equal or greater than 450x450. The tags are written in utf-8 id3v2.4
Comment 7 Mark Kretschmann 2007-11-30 11:23:01 UTC
What happens when you download covers with Amarok itself?
Comment 8 Brandon Lake 2007-11-30 11:30:36 UTC
When I fetch the cover, it will replace out the old cover with the one that is fetched, which works normally. But when I right click on a song in the album that just had the cover fetched, the embedded gibberish is there. However, clicking fullsize brings up the one that was fetched.

I also forgot to mention that the music collection is a network share that is mounted as a read only drive on my laptop from a Windows share (cifs mounted). If that has anything to do with it, though I doubt it.
Comment 9 S. Reuillon 2007-12-02 00:38:12 UTC
The previous comment of Brandon Lake make me think that I forgot to mention my personal configuration is with music collection in a network share that is mounted as a drive (smbfs mounted in read/write) from a debian server in local network. Maybe that will help. 

Sven Krohlas is it your type of file system too ?
Comment 10 Brandon Lake 2007-12-02 12:38:19 UTC
Just for the sake of being thorough, which is of course always better, this is what the entry in my fstab looks like:
# Music network storage
//idrones/My\040Documents/My\040Music /media/music cifs auto,iocharset=utf8,uid=charonidrones,gid=users,credentials=/root/.cifscredentials,file_mode=0444,dir_mode=0555 0 0

Also looking back at Mr. Reuillon's first post on this issue, my tags are also written with mp3tag in id3v2.4 (utf-8). Kind of funny that we have a rather similar setup, with a rather similar problem!
Comment 11 Brandon Lake 2007-12-02 13:14:04 UTC
I should have done this before I made my previous post, but hindsight is always twenty/twenty. In light of the idea that it could possibly be due to either mp3tag or the network share, I transfered an album into my home folder, resaved the tags with EeasyTAG (still id3v2.4 utf-8) though the album cover appeared just fine in EasyTAG before saving them and after.

Then of course, once I tried to view the album cover in Amarok, it did the same distortion as before, even closing Amarok all the way out and then trying to do it, still produces the same results unfortunately. That may not completely discredit that theory, however that is the process I went through to see if it would on my side at least.
Comment 12 Shane King 2007-12-10 04:33:17 UTC
I'm just guessing here, but the fact iTunes (and Winamp) displays it correctly suggests to me the image has been embedded not according to the id3 v2.4 standard (see http://id3.org/iTunes) but rather to cater to iTune's brokenness.

The version of taglib in svn as of a few days ago now supports working around images that adhere to iTune's broken way of writing id3 v2.4 tags.
Comment 13 Brandon Lake 2007-12-10 07:42:27 UTC
No, the program used for tagging in my scenario was mp3tag v2.38 (www.mp3tag.de) which wrote the tags in id3v2.4 (utf-8). One of the previous commentators also used EasyTAG in *nix.
Comment 14 Shane King 2007-12-10 09:58:38 UTC
Never mind, I checked mp3tag and it writes normal id3 tags, not iTunes style. My guess was wrong. :)
Comment 15 Jonas Norlander 2008-01-16 13:32:56 UTC
I got this bug to on my Kubunty 7.10. I tagged my files with Easytag. I can import/export the pictures from the tags and the look ok but in amarok they for most of the times show distorted. Kid3 can't view or export them either.
Sometimes when i "view full size" i see the pictures as it should.

Amarok 1.4.7
EasyTAG 2.1.2
Comment 16 S. Reuillon 2008-01-16 18:24:19 UTC
Jonas Norlander, in order to collect all elements of the problem, could you please tell us additional information like :
1) version of tag (ex : id3v2.4)
2) text coding (ex : utf-8)
3) special config like music directory mounted as smbfs/cifs drive from local network PC (this is the case for at least 2 users having the pb).
 
I'm not able to correct this bug but maybe this information can be useful for other developpers...
Thanks.
Comment 17 Jonas Norlander 2008-01-16 22:19:26 UTC
I Started with a new rip so I can verify all steps.
My system is Kubuntu 7.10 amd64 with locale sv_SE-UTF8.

I ripped a record with kaudiocreator, encoded it with lame, rewrote/edited and
added a jpeg picture (Text Encoding: UTF-8, Mimetype: image/jpeg, Picture type:
Cover front, Description: Cover-Front.jpeg) to the tags with EasyTAG.

I added it to my Amarok collection, locally on a reiserfs filesystem with sqllite backend.
I did not download any cover from from within Amarok.
And the Cover-picture in Amarok and Kid3 is ruined.
I can still export it from Easytag and it is ok.

I think that thus times i can see them ok in Amarok is when it has a local copy
in the cache downloaded or added manually from within Amarok.

The tags are:
ID3v2.4.0 encoded in UTF-8

Programs:
Amarok 1.4.7 (I see version 1.4.8 in backports will try that later)
Easytag 2.1.2
Kid3 0.9
TagLib 1.4-8

To me it looks like it could be some of the libraries used with KDE/Amarok that is the problem as Kid3 has same problem. Perhaps Taglib as both Amarok and Kid3 is using it or libid3tag that Easytag using?

I will later try to view the tags from windows with Foobar2000, Winamp and Windows Media Player.


Let me know if it something else i can try?
Comment 18 Mark Kretschmann 2008-01-16 22:25:06 UTC
TagLib issue most likely, yeah.
Comment 19 Jonas Norlander 2008-01-16 22:41:15 UTC
2 more notes.

1) Amarok 1.4.8 has the same broblem.

2) Running from a console give this output that I think could be relevant:
QImage::smoothScale: Image is a null image
Corrupt JPEG data: 44 extraneous bytes before marker 0xdb
Corrupt JPEG data: 44 extraneous bytes before marker 0xdb
Corrupt JPEG data: 332 extraneous bytes before marker 0xd8
Invalid JPEG file structure: two SOI markers
Comment 20 Jonas Norlander 2008-01-17 13:33:23 UTC
Foobar2000 v0.9.5 showing the embedded cover art just fine, winamp and
Windows media player dont show any cover art but i never use them so i dont know what they support.

I hope we can work this out as it is kind of anoying to have crippled cover arts
in the best player.
Is there some other program than Easytag i can test to add Cover arts into the ID3v2.4 tags?
Comment 21 Veith Becker 2008-02-14 17:33:15 UTC
Same Problem here, covers added with mp3Tag v2.39 (ID3v2.4) and I'm using kubuntu gutsy (KDE 3.5.8; Amarok 1.4.7). 
My collection is located on a local ntfs-volume.
Comment 22 Mark Kretschmann 2008-02-14 17:53:20 UTC
Try TagLib 1.5 RC1
Comment 23 S. Reuillon 2008-07-06 14:11:54 UTC
Hey!

As the initial bug reporter, i did some tries and i have found (in my case) a workaround to this problem. 

The procedure is simple :
1) Start with a MP3 file with embedded id3v2.4 album art (normally incorrectly displayed with Amarok)
2) Use Easytag and select the version for writing ID3 tag to id3v2.3 unicode UTF-16 (Settings->Preferences->tab 'ID3 Tag Setting'->'ID3v2 tag version : id3v2.3' and 'Charset : Unicode'). Verify that 'Automatically convert old ID3v2 tag versions' is selected.
3) With Easytag, select the MP3 and remove the embedded picture with '-' button.
4) Save the file with 'Ctrl-S'
5) Add the same picture from an image file (.jpeg or .png whatever) with '+' button
6) Save again with 'Ctrl-S'
7) Try to read again the file with Amarok, the embedded album art should be displayed correctly.

Warning : if the initial id3v2.4 MP3 file is directly converted to id3v2.3 without suppressing image->save->re-embed image->save then, the embedded image is still incorrectly displayed by Amarok (even if supposed to be in tag version id3v2.3)

Could you please confirm this workaround really works in your cases ?
If it is confirmed, we can deduce 2 bugs :
1) Amarok is unable to correctly manage id3v2.4 embedded album art 
2) When converting tag from id3v2.4 to id3v2.3 format, Easytag leaves album art in id3v2.4 format.

My config :
- Kubuntu 8.04
- Amarok 1.4.9.1
- Easytag 2.1.4
- MP3 files in a mounted disc, my fstab looks like this :
/192.168.0.X/username      /mnt/samba/username       cifs    user=username%password,iocharset=utf8        0       0

Do this workaround works for u ???
Comment 24 Hubert Teo 2008-10-20 13:29:46 UTC
Hello.

I have encountered the same problem in my Ubuntu 8.04 (Hardy) (Gnome) machine.
After switching from Windows to Linux (and enjoying it much, much more than Windows), I had to find the Linux way to tag (automatically) my mp3's and add album art. I found MusicBrainz Picard to be a very effective solution and I use EasyTAG to stick the album art in. This works perfectly, except that Amarok corrupts the album art... Note that all the album art in all my other old mp3's show correctly, only those I encoded with EasyTAG get corrupted in Amarok (but get displayed correctly everywhere else).

However, after trying your (S. Reuillon) solution, suddenly Amarok reads the album art properly again! Could it be a problem with the way Amarok reads the album art frames in id3v2.4 tags?

Looking forward to getting this bug fixed as Amarok really 'rok's better than iTunes in my opinion. Willing to try any solution.

Regards,
Hubert
Comment 25 Mark Kretschmann 2008-10-20 14:14:16 UTC
I'm closing this report, because Amarok 1.x is no longer actively maintained.

If the problem still applies to Amarok 2 (with TagLib 1.5), you may reopen it.