GNOME Bugzilla – Bug 320767
lame may insert id3v1 tag structures inside of mp3 data
Last modified: 2006-05-06 11:53:39 UTC
I found the mp3 files generated by lame plugins, which is launched by
sound-juicer, have much leading or trailing garbage.
They contains signature of encoder (LAME), or even id3v1 tag structure!
Especially, id3v1 tag pattern annoys some player using gstreamer mad plugin,
such as rhythmbox.
Are anything wrong around usage of libmp3lame?
I use sound-juicer-2.12.2 and gstreamer-0.8.11 with lame-3.97b.
And set 'audio/x-raw-int,rate=44100,channels=2 ! lame name=enc' as mp3 encoding
pipeline. Older soundjuicer and lame cause same problem, even with
Created attachment 54356 [details]
Top 4.75lB of mp3 files
It has ID3v1 tag structure from the point of offset 0x3DC, but it is still in
Created attachment 54357 [details]
Bottom 28.5kB of mp3 file.
It has many 'LAME' signatures.
Yes, it holds ID3v1 tag correctly at the bottom of file.
The signatures, like "LAMEx.yy", are not garbages, sorry.
They are inserted by LAME encoder (as a paddings?).
This problem is that ID3v1 tags can be inserted inside MP3 data.
LAME sets ID3 tags when lame_encode_flush() is called,
Gstreamer lame plugin calls this when it gets GST_EVENT_FLUSH.
I suppose it is harmful.
Now I change the summary of this bug.
Created attachment 54389 [details] [review]
This patch makes the lame plugin ignore GST_EVENT_FLUSH event.
Using sound-juicer with the lame plugin with this patch
can avoid inserting ID3v1 tag structures inside mp3 files,
but I don't understand whether this solution is right.
I'm not sure what is sending so many flush events. However I do know that 0.8 is not maintained any more :) Ross is porting sound-juicer to 0.10 these days, so when he finishes with that can you give 0.10 a try to see if you have the same issue?
*** Bug 326438 has been marked as a duplicate of this bug. ***
This is at the end of a MP3 file generated by SJ 2.13 with GStreamer 0.10:
Tag writing support has been removed completely from lame, which means the bug described here shouldn't happen any longer. Please re-open if it still does.
2006-05-06 Tim-Philipp Müller <tim at centricular dot net>
* ext/lame/gstlame.c: (gst_lame_get_type),
(gst_lame_release_memory), (gst_lame_init), (gst_lame_sink_event),
Remove tag writing from lame (which was completely broken
anyway, #329184). Leaving GstTagSetter interface around for
now, albeit non-functional. Should be removed completely
in 0.11. Use the 'id3v2mux' plugin from -good for writing