After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 424629 - handle multiple id3 tag sets better
handle multiple id3 tag sets better
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: general
HEAD
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
: 391544 508655 554331 601077 613433 641356 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-03-30 20:52 UTC by Sven Arvidsson
Modified: 2011-07-18 12:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mp3 file (450.06 KB, audio/mpeg)
2007-03-30 20:53 UTC, Sven Arvidsson
Details

Description Sven Arvidsson 2007-03-30 20:52:34 UTC
I'm having trouble editing the tags of the attached mp3 file in Rhythmbox. When I change the artist field from "At The Gates" to "At the Gates", it seems to work ok, but reverts back to the old spelling after a while, similar to the behaviour in bug 362876.

I guess this is a GStreamer problem, or a badly mangled file, as other tools such as tagtool does not detect any tags at all.

GStreamer versions,
gstreamer0.10-alsa       0.10.12-1
gstreamer0.10-ffmpeg     0.10.2-1
gstreamer0.10-gnomevfs   0.10.12-1
gstreamer0.10-lame       0.10.5-0.0
gstreamer0.10-plugins-base       0.10.12-1
gstreamer0.10-plugins-good       0.10.5-4
gstreamer0.10-plugins-really-bad         0.10.3-0.5
gstreamer0.10-plugins-ugly       0.10.5-1
gstreamer0.10-x          0.10.12-1
libgstreamer0.10-0       0.10.12-2
libgstreamer0.10-dev     0.10.12-2

gst-launch-0.10 -t filesrc location=file.mp3 ! decodebin ! fakesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
FOUND TAG      : found by element "id3demux0".
           title: The Fevered Circle
          artist: At the Gates
           album: Terminal Spirit Disease
            date: 1994-01-01
        track ID: 96b352f0-7b3f-4e69-af5f-da0d02132d2b
           genre: Death Metal
         comment: Exact Audio Copy Secure Mode
     ID3v2 frame: buffer of 33 bytes, type: application/x-gst-id3v2-txxx-frame, version=(int)4
                : buffer of 32 bytes, type: application/x-gst-id3v2-txxx-frame, version=(int)4
                : buffer of 32 bytes, type: application/x-gst-id3v2-txxx-frame, version=(int)4
                : buffer of 31 bytes, type: application/x-gst-id3v2-txxx-frame, version=(int)4
                : buffer of 18 bytes, type: application/x-gst-id3v2-tdrl-frame, version=(int)4
                : buffer of 48 bytes, type: application/x-gst-id3v2-txxx-frame, version=(int)4
                : buffer of 30 bytes, type: application/x-gst-id3v2-tdtg-frame, version=(int)4
                : buffer of 57 bytes, type: application/x-gst-id3v2-txxx-frame, version=(int)4
                : buffer of 23 bytes, type: application/x-gst-id3v2-tsop-frame, version=(int)4
                : buffer of 34 bytes, type: application/x-gst-id3v2-txxx-frame, version=(int)4
                : buffer of 12 bytes, type: application/x-gst-id3v2-tcmp-frame, version=(int)4
     track count: 9
    track number: 5
        album ID: 9f94cc0e-c50c-4fab-8702-0fc57f4cafe9
 album artist ID: 35f92c4a-69d0-4ed1-ab9e-05259db89d14
FOUND TAG      : found by element "id3demux1".
           title: The Fevered Circle
          artist: At The Gates
           album: Terminal Spirit Disease
            date: 1994-01-01
    track number: 5
     ID3v2 frame: buffer of 28 bytes, type: application/x-gst-id3v2-tden-frame, version=(int)4
                : buffer of 44 bytes, type: application/x-gst-id3v2-tenc-frame, version=(int)4
         comment: Exact Audio Copy Secure Mode
           genre: Death Metal
FOUND TAG      : found by element "mad0".
        duration: 251000000000
         bitrate: 200428
FOUND TAG      : found by element "mad0".
           layer: 3
            mode: joint
        emphasis: none
     audio codec: MPEG-1 layer 3
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 347493000 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
FREEING pipeline ...
Comment 1 Sven Arvidsson 2007-03-30 20:53:47 UTC
Created attachment 85593 [details]
mp3 file
Comment 2 Jonathan Matthew 2007-04-01 12:05:32 UTC
The file has somehow acquired two sets of id3v2 tags.  Rhythmbox edits the first tag set, then when it rereads the file, it uses the values from the second set.

There are two bugs here: we probably should ignore the second tag set in this instance; and we should only write one set of tags when rewriting tags in a file.
Comment 3 Benjamin Otte (Company) 2007-04-10 10:04:48 UTC
The original idea I had for handling this case is to use gst_tag_list_insert(first_tag, next_tag, GST_TAG_MERGE_KEEP) - that way all existing tags are kept and new ones are added. This seems to be the case that covers most things, like:
- multiple ID3 tags (or ID3 and ape tags or whatever).
In this case the outermost tag seems to be the most recently added tag most of the time. Since the outermost tag arrives first at the sink, you keep its values with the given merge mode.
- multiple different tags from different gstreamer elements (think ID3 tag and mad element)
Since those tags are different, the merge mode unions them into one tag.
Comment 4 Alex Lancaster 2007-04-23 08:12:06 UTC
This problem of not preserving existing tags (if there were additional tags) is basically the same as a bug I filed a while back: bug #348761.
Comment 5 Jonathan Matthew 2008-01-12 10:02:02 UTC
*** Bug 508655 has been marked as a duplicate of this bug. ***
Comment 6 mmcg069 2008-01-12 22:00:15 UTC
Perhaps in properties the user could be made aware of the multiple tag sets, and asked to choose which they prefer/ or if they want to delete other tag sets.
Comment 7 mmcg069 2008-01-13 00:51:53 UTC
As a stop gap measure.  Does anyone know what the best way is to scrub duplicate id3 tags?
Comment 8 Jonathan Matthew 2008-06-08 01:38:12 UTC
*** Bug 391544 has been marked as a duplicate of this bug. ***
Comment 9 Jonathan Matthew 2008-10-01 23:14:59 UTC
*** Bug 554331 has been marked as a duplicate of this bug. ***
Comment 10 Jean-François Fortin Tam 2008-10-23 23:45:56 UTC
It was suggested to me to try this:

gst-launch-0.10 filesrc location=file-to-fix.mp3 ! id3demux ! filesink location=fixed-version.mp3

This cleans the file and keeps only one set of tags, it seems (but you have no control over which set of tags is kept). Can be used to ease the suffering in the meantime. However, ideally I'd like this to run over all the files of a folder, and run in place so that no new files are created (just in case some of you have scripting skills?).
Comment 11 Jonathan Matthew 2009-11-07 15:53:25 UTC
*** Bug 601077 has been marked as a duplicate of this bug. ***
Comment 12 Jonathan Matthew 2010-03-21 21:26:09 UTC
*** Bug 613433 has been marked as a duplicate of this bug. ***
Comment 13 Jonathan Matthew 2011-02-03 21:02:05 UTC
*** Bug 641356 has been marked as a duplicate of this bug. ***
Comment 14 Jonathan Matthew 2011-07-18 12:09:59 UTC
fixed as part of commit 90b7496.