GNOME Bugzilla – Bug 557587
crash or damaged ID3 tag when reencoding from flac->mp3 using gst-launch
Last modified: 2009-05-07 17:00:29 UTC
I have my CDs collection encoded in FLAC. Files are encoded as regular FLAC (not OGG FLAC) and tagged with FLAC tag (not ID3). I am trying to reencode them to tagged MP3 using gst-launch. Conversion is done, but tags are damaged (ID3v1 contain nonsense, ID3v2 is not created). It happens for both ASCII and non-ASCII/non-ISO-8859-1 comments. FLAC decoder seems to work correctly. It sometimes crashes. If it does not crash, it creates an MP3 with damaged ID3 tag. gstreamer-0_10-0.10.21 gst-plugins-base-0.10.21 gst-plugins-good-0.10.10.4 (prerelease build from released snapshot) gst-plugins-bad-0.10.8 gst-plugins-ugly-0.10.9 Older versions (-1) crash as well. gst-launch filesrc location=CD/Rūp\ Verma/चेतना\ -\ chētnā\ -\consciousness\ -\ vědomí/02\ -\ Rāga\ Gujrī\ Tōḍī.flac ! flacdec ! audioconvert ! lame ! id3mux name=tag v2-tag=true v1-tag=true ! filesink location=music.mp3 Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Caught SIGSEGV accessing address 0x772000
+ Trace 208588
gst-launch filesrc location=CD/Rūp\ Verma/चेतना\ -\ chētnā\ -\ cosciousness\ -\ vědomí/02\ -\ Rāga\ Gujrī\ Tōḍī.flac ! flacdec ! fakesink -t Setting pipeline to PAUSED ... Pipeline is PREROLLING ... FOUND TAG : found by element "flacdec0". audio codec: FLAC title: Rāga Gujrī Tōḍī artist: Rūp Verma album: चेतना - chētnā - consciousness - vědomí date: 1993-01-01 track number: 2 track count: 2 genre: Meditative Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock Got EOS from element "pipeline0". Execution ended after 5654329432 ns. Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... FREEING pipeline ... id3v2 -l music.mp3 id3v1 tag info for music.mp3: Title : �������!���!���� Artist: �������A���������� Album : �������������� Year: ���1, Genre: Other (12) Comment:
Could you try if it works better with id3v2mux (id3mux is more or less deprecated nowadays). Also, could you install debug packages for glib, gstreamer, gst-plugins-base, gst-plugins-good and gst-plugins-ugly and try to get a better backtrace? I've tried (on a 32 bit system) to do the same as you did but it didn't crash for me and the tags looked fine too.
id3v2mux does not crash, but ID3 tag is empty: gst-launch filesrc location=CD/VA/Café\ Del\ Mar\ Ibiza/01\ -\ José\ Padilla\ -\ Agua.flac ! flacdec ! audioconvert ! lame ! id3v2mux name=tag ! filesink location=music.mp3 id3v2 -l music.mp3 music.mp3: No ID3 tag
Hey Sebastian, you set this bug to NEEDINFO in comment #1. I think the question has been answered in comment #2 and I am thus reopening this issue. Feel free to ask further questions :)
Also, could you attach the first few kB of that flac file so we can investigate why the ID3v2 tag is empty? head --bytes=500k foo.flac > head.flac should get you just the beginning (100k might be enough as well if it the tag is small).
Created attachment 134196 [details] head.flac With the latest released gstreamer packages on openSUSE 11.2 Factory (Milestone 1) x86_64. Starting program: /usr/bin/gst-launch filesrc location=head.flac \! flacdec \! audioconvert \! lame \! id3mux name=tag v2-tag=true v1-tag=true \! filesink location=music.mp3 [Thread debugging using libthread_db enabled] Executing new program: /usr/bin/gst-launch-0.10 [Thread debugging using libthread_db enabled] Setting pipeline to PAUSED ... [New Thread 0x7ffff4096950 (LWP 11212)] Program received signal SIGSEGV, Segmentation fault.
+ Trace 215216
Thread 140737287645520 (LWP 11212)
This is a bug in libid3tag IMHO as it crashes on something that seems to be valid UCS4 data. Closing as NOTGNOME... you should use id3v2mux anyway :)
Well, id3mux is in -ugly, so it's supposed to be reliable and work well. We need to do something about that (I have a plan, work in progress). Will create a clone bug to keep track of this.
What's this plan? Another problem here is that the FLAC contains vorbiscomments in ISO-8859-1 or something and not UTF8...
Note that it still may be a problem of gstreamer, as it sometimes show: *** glibc detected *** /usr/bin/gst-launch-0.10: malloc: top chunk is corrupt: 0x0000000000821e00 *** After setting breakpoint to id3_ucs4_copy and stepping in gdb by "n" it generated a different backtrace: Program received signal SIGSEGV, Segmentation fault. 0x00007ffff40a231c in id3_frame_render (frame=0x6500000076, ptr=0x0, options=0) at frame.c:513 513 if ((frame->flags & ID3_FRAME_FLAG_TAGALTERPRESERVATION) || (gdb) bt
+ Trace 215221