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 459226 - New plugin: ID3 tagger which writes version 2.3
New plugin: ID3 tagger which writes version 2.3
Status: RESOLVED DUPLICATE of bug 583383
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 568122 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-07-22 06:51 UTC by Emmanuel Rodriguez
Modified: 2009-05-21 10:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ID3 v.2.3 tagger (21.28 KB, patch)
2007-07-22 06:53 UTC, Emmanuel Rodriguez
none Details | Review
Header file for the plugin (3.00 KB, patch)
2007-07-22 06:54 UTC, Emmanuel Rodriguez
none Details | Review
Custom makefile (1.58 KB, patch)
2007-07-22 06:57 UTC, Emmanuel Rodriguez
none Details | Review
ID3 v.2.3 tagger - Implemented through gsttaglibmux (16.00 KB, text/x-c++src)
2008-10-07 18:49 UTC, Emmanuel Rodriguez
  Details
Header file for the plugin (2.97 KB, text/x-chdr)
2008-10-07 18:52 UTC, Emmanuel Rodriguez
  Details
Makefile used to compile the plugin (1.94 KB, application/octet-stream)
2008-10-07 19:00 UTC, Emmanuel Rodriguez
  Details
Easily buildable source code (13.83 KB, application/x-compressed-tar)
2008-11-16 09:06 UTC, Emmanuel Rodriguez
  Details
Patch for Debian Etch (and old versions of GStreamer 0.10) (665 bytes, patch)
2008-11-19 07:53 UTC, Emmanuel Rodriguez
none Details | Review
gst-id3v23mux-tags-0.0.6.tar.gz - Easily buildable source code (12.34 KB, application/x-compressed-tar)
2008-11-19 19:41 UTC, Emmanuel Rodriguez
  Details
Easy to read changes for the maintainers (same as in the tar.gz 0.0.6) (19.96 KB, text/plain)
2008-11-19 19:46 UTC, Emmanuel Rodriguez
  Details
Plugin moved to http://gst-id3v23mux-tags.googlecode.com/ (84 bytes, text/plain)
2009-04-04 06:17 UTC, Emmanuel Rodriguez
  Details

Description Emmanuel Rodriguez 2007-07-22 06:51:38 UTC
I have a portable MP3 player (Sansa e250) that can't handle ID3 v2.4 but is able to handle well ID3 1.0 and ID3 2.3. I seems that gstreamer is only able to encode ID3 1.0 and ID3 2.4, I find ID3 1.0 to be quite limited (no support for UNICODE) and in my case ID3 2.4 is not usable.

I have written a GST plugin that's able to render ID3 2.3 tags, the tags are rendered through the library id3 (http://id3lib.sourceforge.net/). I have made some rudimentary tests and the plugin works fine. I'm able to encode my personal MP3 collection and the plugin handles very well the encoding for french, spanish and slovak CD tracks. The plugin was tested with both gst-launch and sound-juicer.

Can some one please review the plugin and give me some feedback?

I'm sure that other people could be interested in such plugin.

(A patch will follow)
Comment 1 Emmanuel Rodriguez 2007-07-22 06:53:44 UTC
Created attachment 92144 [details] [review]
ID3 v.2.3 tagger

The main code of the ID3 v 2.3 tagger.
Comment 2 Emmanuel Rodriguez 2007-07-22 06:54:30 UTC
Created attachment 92145 [details] [review]
Header file for the plugin

The header file.
Comment 3 Emmanuel Rodriguez 2007-07-22 06:57:54 UTC
Created attachment 92146 [details] [review]
Custom makefile

The makefile used to compile the code. The project assumes that the source files are in the folder src/ the plugin will be in the folder target/build.
Comment 4 Tim-Philipp Müller 2007-07-24 20:31:12 UTC
Nice! I'm sure lots of people will be grateful for this, even if it's not quite as featureful as the taglib-based id3 writer yet.

Changing component to -bad, since that's where new plugins usually get added.

I think it might make sense to split out the GstTaglibMux base class in -good/ext/taglib/, prop it up a little (add padding and docs and maybe support for rendering end tags) and then move it into gst-plugins-base, so the code can be shared with your new element and you only have to implement the render vfunc.

Comment 5 Emmanuel Rodriguez 2007-07-25 06:01:40 UTC
Thanks for the comment. I know that the plugin is quite limited for the moment but it covers the most important tags, at least the ones that make it more useful for an MP3 player.

I would like to add support for the following tags:
  - comments
  - images
  - musicbrainz	
  - bitrate
  - length

The thing is that I don't have a lot of time and that the library ID3 can be quite a hell to use some times!

Extending taglib crossed my mind since there are already there two taggers, but I though that I wasn't allowed since the two plugins use the same C++ library. In fact, some of my code was inspired by the taggers provided by taglib. If my plugin could be refactored into the taglib 'framework' then it would most likely fix a bug with my plugin: I was never able to set the source pad as  "application/x-id3", for a strange reason the pipeline couldn't be connected.
Comment 6 Emmanuel Rodriguez 2008-10-07 18:49:00 UTC
Created attachment 120148 [details]
ID3 v.2.3 tagger - Implemented through gsttaglibmux

This version is using gsttaglibmux as parent class and has a few memory management fixes that where revealed by valgrind.

Note that gsttaglibmux has no dependency with taglib. It's just provides code to make any tagger simple enough. Ideally gsttaglibmux will be refactored and made public. When it happens I will update the code in order to reflect the new changes.
Comment 7 Emmanuel Rodriguez 2008-10-07 18:52:09 UTC
Created attachment 120149 [details]
Header file for the plugin
Comment 8 Emmanuel Rodriguez 2008-10-07 19:00:26 UTC
Created attachment 120152 [details]
Makefile used to compile the plugin

The plugin assumes that all files are in the folder src. In order to build the plugin copy the config.h, gsttaglibmux.c and gsttaglibmux.h from gst-plugins-good into the src folder.
Comment 9 Emmanuel Rodriguez 2008-10-18 15:44:32 UTC
Ping. Any comments on the patch. Is there a change to see this plugin land in Gstreamer?
Comment 10 Jeremy Wilkins 2008-11-15 18:19:21 UTC
Does this now support adding images to the tags.

What are the instructions for building it? I've currently got the whole gstreamer stack installed from ubuntu's packages - is it possible to just add this element in or do I need to replace the whole stack.

If I can get this build I'm happy to do some testing?

jebw
Comment 11 Emmanuel Rodriguez 2008-11-16 09:06:46 UTC
Created attachment 122772 [details]
Easily buildable source code

For the moment this plugin doesn't support adding images. The reason is that I don't have an existing source with images. If someone could provide me with an original file that has image tags or tell me which program inserts image tags the I could try to add support for this.

More testers for the plugin are welcome! The files currently attached to this bug don't make the build easier. Specially since rewrote the code to use a fake version of gsttaglibmux.

I have attached a .tar.gz bundle that makes the compilation and installation easier. All that's needed is gcc, make and the dev packages for gstreamer0.10, streamer-plugins-base0.10 and libid3 (3.8.3). The plugin is installed locally in the current's user account and should work with all gstreamer applications.

Under Ubuntu the dependencies for building the plugin can be downloaded with:

sudo apt-get update && sudo apt-get install build-essential libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libid3-3.8.3-dev 

For compiling and installing the plugin simply do:
make plugin install

Please provide me all feedback or feature requests.
Comment 12 Jeremy Wilkins 2008-11-16 22:44:52 UTC
Thanks - I'll have a test and give some feedback.

As for generating images in v2.3 - Easytag when built with libid3 rather than libid3tag (the normal easytag version in Ubuntu Intrepid, rather than the easytag-aac variant) lets you choose the id3 version and can attach images. I was able to generate id3 tags with images that a modern Walkman could read happily, including the album art.
Comment 13 Emmanuel Rodriguez 2008-11-19 07:53:08 UTC
Created attachment 123014 [details] [review]
Patch for Debian Etch (and old versions of GStreamer 0.10)

Old versions of Gstreamer 0.10 are missing the function gst_element_class_set_details_simple(). Debian Etch is including a version of Gstreamer that's missing that function.

This patch allows the plugin to compile with all versions of Gstreamer 0.10.
Comment 14 Emmanuel Rodriguez 2008-11-19 19:41:37 UTC
Created attachment 123062 [details]
gst-id3v23mux-tags-0.0.6.tar.gz - Easily buildable source code

This new version adds support for images and compiles with older versions of GStreamer 0.10, such as the one shipped in Debian Etch.
Comment 15 Emmanuel Rodriguez 2008-11-19 19:46:47 UTC
Created attachment 123064 [details]
Easy to read changes for the maintainers (same as in the tar.gz 0.0.6)

The source code of the plugin as found in gst-id3v23mux-tags-0.0.6.tar.gz. This version adds support for images.
Comment 16 Rob 2009-01-16 22:37:29 UTC
(In reply to comment #15)

I have installed all the dependencies under Hardy Heron.  But when I try to compile the plugin, I get this error.  Any ideas?

ubuntu@ubuntu:~/Desktop/gst-id3v23mux-tags-0.0.6$ make plugin
/bin/sh: svn: not found
mkdir -p target/build 2> /dev/null || true
g++ -DHAVE_CONFIG_H -fPIC -c -Isrc -g -Wall -Werror -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2   -o target/build/gstid3v23mux.o src/gstid3v23mux.cc
src/gstid3v23mux.cc:86:21: error: id3/tag.h: No such file or directory
src/gstid3v23mux.cc:161: error: expected initializer before ‘*’ token
src/gstid3v23mux.cc:167: error: expected initializer before ‘*’ token
src/gstid3v23mux.cc:172: error: expected initializer before ‘*’ token
src/gstid3v23mux.cc:179: error: expected initializer before ‘*’ token
src/gstid3v23mux.cc:196: error: expected ‘,’ or ‘...’ before ‘*’ token
src/gstid3v23mux.cc:199: error: ISO C++ forbids declaration of ‘ID3_Frame’ with no type
src/gstid3v23mux.cc:205: error: expected initializer before ‘*’ token
src/gstid3v23mux.cc: In function ‘GstBuffer* gst_id3v23_mux_render_tag(GstTagLibMuxPriv*, GstTagList*)’:
src/gstid3v23mux.cc:258: error: ‘ID3_Frame’ was not declared in this scope
src/gstid3v23mux.cc:258: error: ‘title’ was not declared in this scope
src/gstid3v23mux.cc:258: error: ‘ID3FID_TITLE’ was not declared in this scope
src/gstid3v23mux.cc:258: error: ‘tags_tag_to_frame’ was not declared in this scope
src/gstid3v23mux.cc:259: error: ‘album’ was not declared in this scope
src/gstid3v23mux.cc:259: error: ‘ID3FID_ALBUM’ was not declared in this scope
src/gstid3v23mux.cc:260: error: ‘artist’ was not declared in this scope
src/gstid3v23mux.cc:260: error: ‘ID3FID_LEADARTIST’ was not declared in this scope
src/gstid3v23mux.cc:261: error: ‘genre’ was not declared in this scope
src/gstid3v23mux.cc:261: error: ‘ID3FID_CONTENTTYPE’ was not declared in this scope
src/gstid3v23mux.cc:264: error: ‘track_number’ was not declared in this scope
src/gstid3v23mux.cc:264: error: ‘ID3FID_TRACKNUM’ was not declared in this scope
src/gstid3v23mux.cc:264: error: ‘tags_composed_tags_to_frame’ was not declared in this scope
src/gstid3v23mux.cc:265: error: ‘part_in_set’ was not declared in this scope
src/gstid3v23mux.cc:265: error: ‘ID3FID_PARTINSET’ was not declared in this scope
src/gstid3v23mux.cc:269: error: ‘frame_year’ was not declared in this scope
src/gstid3v23mux.cc:270: error: ‘frame_date’ was not declared in this scope
src/gstid3v23mux.cc:277: error: ‘ID3FID_YEAR’ was not declared in this scope
src/gstid3v23mux.cc:277: error: ‘tags_text_to_frame’ was not declared in this scope
src/gstid3v23mux.cc:286: error: ‘ID3FID_DATE’ was not declared in this scope
src/gstid3v23mux.cc:286: error: ‘tags_text_to_frame’ was not declared in this scope
src/gstid3v23mux.cc:294: error: ‘image’ was not declared in this scope
src/gstid3v23mux.cc:294: error: ‘ID3FID_PICTURE’ was not declared in this scope
src/gstid3v23mux.cc:294: error: ‘tags_image_tag_to_frame’ was not declared in this scope
src/gstid3v23mux.cc:295: error: ‘image_preview’ was not declared in this scope
src/gstid3v23mux.cc:299: error: ‘ID3_Tag’ was not declared in this scope
src/gstid3v23mux.cc:299: error: expected `;' before ‘tag’
src/gstid3v23mux.cc:300: error: ‘tag’ was not declared in this scope
src/gstid3v23mux.cc:301: error: ‘tag’ was not declared in this scope
src/gstid3v23mux.cc:302: error: ‘tag’ was not declared in this scope
src/gstid3v23mux.cc:303: error: ‘tag’ was not declared in this scope
src/gstid3v23mux.cc:304: error: ‘tag’ was not declared in this scope
src/gstid3v23mux.cc:305: error: ‘tag’ was not declared in this scope
src/gstid3v23mux.cc:306: error: ‘tag’ was not declared in this scope
src/gstid3v23mux.cc:307: error: ‘tag’ was not declared in this scope
src/gstid3v23mux.cc:308: error: ‘tag’ was not declared in this scope
src/gstid3v23mux.cc:309: error: ‘tag’ was not declared in this scope
src/gstid3v23mux.cc:312: error: ‘tag’ was not declared in this scope
src/gstid3v23mux.cc:312: error: ‘unicode_t’ was not declared in this scope
src/gstid3v23mux.cc:312: error: ‘uchar’ was not declared in this scope
src/gstid3v23mux.cc:313: error: ‘data’ was not declared in this scope
src/gstid3v23mux.cc:313: error: expected type-specifier before ‘uchar’
src/gstid3v23mux.cc:313: error: expected `;' before ‘uchar’
src/gstid3v23mux.cc:314: error: ‘ID3TT_ID3V2’ was not declared in this scope
src/gstid3v23mux.cc:318: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
src/gstid3v23mux.cc:320: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
src/gstid3v23mux.cc:321: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
src/gstid3v23mux.cc:322: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
src/gstid3v23mux.cc:323: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
src/gstid3v23mux.cc:324: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
src/gstid3v23mux.cc:325: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
src/gstid3v23mux.cc:326: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
src/gstid3v23mux.cc:327: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
src/gstid3v23mux.cc:328: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
src/gstid3v23mux.cc:329: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
src/gstid3v23mux.cc: At global scope:
src/gstid3v23mux.cc:356: error: expected initializer before ‘*’ token
cc1plus: warnings being treated as errors
src/gstid3v23mux.cc:188: warning: ‘gchar* tags_tag_to_string(const GstTagList*, const gchar*)’ declared ‘static’ but never defined
src/gstid3v23mux.cc:193: warning: ‘GDate* tags_tag_to_date(const GstTagList*, const gchar*)’ declared ‘static’ but never defined
src/gstid3v23mux.cc:199: warning: ‘void tags_set_frame_field_to_unicode(int)’ declared ‘static’ but never defined
src/gstid3v23mux.cc:203: warning: ‘size_t tags_utils_number_length(guint)’ declared ‘static’ but never defined
src/gstid3v23mux.cc:211: warning: ‘gboolean tags_buffer_has_data(const GstBuffer*)’ declared ‘static’ but never defined
make: *** [target/build/gstid3v23mux.o] Error 1
Comment 17 Rob 2009-01-17 00:10:30 UTC
Never Mind.  I found the problem.  I installed the wrong dependency by mistake.  Now I can compile.  
Comment 18 Sebastian Dröge (slomo) 2009-01-22 13:02:28 UTC
*** Bug 568122 has been marked as a duplicate of this bug. ***
Comment 19 Per Thomas Jahr 2009-03-29 19:57:10 UTC
I tried to compile this plugin on Fedora 9, but gets an error about "ambiguous 'else'" in the code. Not sure what it means though, as it seems to be no braching in line 275 of gsttaglibmux.


$ make plugin
svn: '.' is not a working copy
g++ -DHAVE_CONFIG_H -fPIC -c -Isrc -g -Wall -Werror -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2   -o target/build/gstid3v23mux.o src/gstid3v23mux.cc
g++ -DHAVE_CONFIG_H -fPIC -c -Isrc -g -Wall -Werror -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2   -o target/build/gsttaglibmux.o src/gsttaglibmux.c
cc1plus: warnings being treated as errors
src/gsttaglibmux.c: In function ‘GstFlowReturn gst_tag_lib_mux_priv_chain(GstPad*, GstBuffer*)’:
src/gsttaglibmux.c:275: error: suggest explicit braces to avoid ambiguous ‘else’
src/gsttaglibmux.c:275: error: suggest explicit braces to avoid ambiguous ‘else’
make: *** [target/build/gsttaglibmux.o] Error 1
Comment 20 Emmanuel Rodriguez 2009-03-30 06:38:02 UTC
(In reply to comment #19)
> I tried to compile this plugin on Fedora 9, but gets an error about "ambiguous
> 'else'" in the code. Not sure what it means though, as it seems to be no
> braching in line 275 of gsttaglibmux.
> 
Line 275 has a macro that expands to a lot of code.

Edit the file Makefile and remove "-Werror" from the variable "CPPFLAGS". You should be able to compile the plugin.
Comment 21 Emmanuel Rodriguez 2009-04-04 06:15:50 UTC
Almost two years have passed since the plugin was first submitted for inclusion into Gstreamer and there's nothing suggesting that it will ever be accepted.

I know that the plugin is useful I have been enjoying it myself and so have at least 4 other users. That's why I have decided to release the plugin as an open source project making it's code easier to get and to install. Perhaps, more people will use it this way.

I've reset the version number of the plugin to 0.0.1. I figured out that existing user base (the 4 of us) can delete the previous installation of the plugin and reinstall it following the instructions.

The project is now hosted in Google Code:
http://gst-id3v23mux-tags.googlecode.com/
Comment 22 Emmanuel Rodriguez 2009-04-04 06:17:51 UTC
Created attachment 132060 [details]
Plugin moved to http://gst-id3v23mux-tags.googlecode.com/

The project is now hosted in Google Code:
http://gst-id3v23mux-tags.googlecode.com/
Comment 23 Per Thomas Jahr 2009-04-07 07:56:38 UTC
>Almost two years have passed since the plugin was first submitted for inclusion
>into Gstreamer and there's nothing suggesting that it will ever be accepted.

Do you know why it isn't accepted? And who decides?
Comment 24 Emmanuel Rodriguez 2009-04-07 09:05:10 UTC
> Do you know why it isn't accepted?
I know that adding an extra dependency is not helping too much the cause, specially adding a dependency to id3lib which is a nightmare to work with.

On irc I got told by one of the gst developers that he plans to write a proper ID3 tag writer that will not use an external library. Obviously, Gstreamer needs his precious resources somewhere else and his plugin has never seen the light. In the meanwhile there's no plugin in Gstreamer that addresses the ID3 tagging issue.

> Who decides?
I don't know who decides for the inclusion of new plugins. I tried various times to ask for comments on the bug on irc and I got told that this will be checked but nothing so far.

The plugin is released as Open Source and could be packaged by Linux distributions independently of what's provided by Gstreamer. Gstreamer is modular enough to accept foreign plugins easily. What would be nice is that people with "deficient" MP3 players can enjoy proper tagging. I don't mind how they get the plugin nor which plugin provides this functionality.
Comment 25 Christoph Leuzinger 2009-05-11 09:54:23 UTC
Just wanted to let you know that I think this plugin is really useful. My portable audio player wouldn't display ID3v2.4 tags created by id3v2mux, and this plugin proved to be a very nice way to circumvent that problem.

Comment 26 Michael Smith 2009-05-20 23:14:11 UTC
See bug 583383 for another id3 tag muxer that does NOT require any additional external dependencies, supports id3v1, v2.3, and v2.4 (defaults to v1 and v2.3)
Comment 27 Tim-Philipp Müller 2009-05-21 10:35:19 UTC
> Almost two years have passed since the plugin was first submitted for
> inclusion into Gstreamer

Well, I guess that's true in a way, but as far as I can see you did get almost immediate feedback on your first patch and then submitted an updated patch only 15 months later in October 2008, so it's not all our fault.

Since this is something a lot of people have been asking for, we should just have cleaned it up and committed it until we come up with something better. However, no one seems to have had the time or motivation to do this between all the bug fixing, module freezes and the cvs to git transition. Or maybe it's because we already have too many unloved ID3 tagging plugins. Who knows. I admit we could have handled this a bit better. I hope you don't let that discourage you from submitting any other GStreamer plugins you might have in your drawer.

In any case, I think the plugin from bug #583383 is the way forward, so I'll close this bug ("duplicate" so the CCs get transfered).

*** This bug has been marked as a duplicate of 583383 ***