Rockbox

Tasklist

FS#2616 - Arbitrary vorbis comments and ID3v2 TXXX/COMM text in wps

Attached to Project: Rockbox
Opened by Mark Arigo (lowlight) - Friday, 05 August 2005, 18:40 GMT
Last edited by Frank Gevaerts (fg) - Saturday, 04 June 2011, 21:05 GMT
Task Type Patches
Category ID3 / meta data
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch allows for the display of arbitrary vorbis
comments (besides the supported artist, album, year,
etc) in the wps. Vorbis comments take the form
TAGNAME=VALUE, so a new wps variable is used:
%ix"TAGNAME"
quotes included. TAGNAME should match exactly.

For example, I sometimes use a PERFORMER tag if
there are guest artists on a particular track by an artist.
This wps line will display the PERFORMER tag,
otherwise defaults to the artist.
?%ix"PERFORMER"<%ix"PERFORMER"|%ia>

This only works for non-supported tags...%ix"ARTIST"
will not display anything.

The following files were changed:
apps/metadata.c
apps/wps-display.c
firmware/replaygain.c
firmware/exports/id3.h

Currently, only 8 arbitrary vorbis comments are stored
(beyond the supported ones) if they all fit in the buffer.
Since I store the vorbis comments in the
mp3entry.id3v2buf[], I increased its size from 300 to 500
(for iriver), this may be overkill, and can be reduced.

This patch works for both OGG and FLAC files with
vorbis comments. I'm sure somebody could modify the
apetag metadata handling to do something similar.
This task depends upon

Closed by  Frank Gevaerts (fg)
Saturday, 04 June 2011, 21:05 GMT
Reason for closing:  Out of Date
Additional comments about closing:  Since the WPS code was also totally redone since this patch, there's probably nothing at all still useful in it
Comment by Mark Arigo (lowlight) - Monday, 08 August 2005, 21:02 GMT


UPDATE 8/8:
Patched screens.c to display extra vorbis comments
in "Show ID3 Info" menu.
Comment by Mark Arigo (lowlight) - Thursday, 11 August 2005, 07:08 GMT

UPDATE 8/11:
A fix and changed the id3v2buf size to 400.
Comment by Mark Arigo (lowlight) - Friday, 12 August 2005, 20:47 GMT

UPDATE 8/12:
Update for the recent changes in "ID3 Info" display. I added a
space between ID3 entries on the display for readability.
Comment by Mark Arigo (lowlight) - Monday, 15 August 2005, 19:35 GMT

UPDATE 8/15:
Separated the screens.c patch since there are cosmetic
changes that not everyone may want.
Comment by Mark Arigo (lowlight) - Friday, 02 September 2005, 18:46 GMT

UPDATE 9/2:
Synced to current cvs.
Comment by Mark Arigo (lowlight) - Wednesday, 05 October 2005, 20:21 GMT

UPDATE 10/5:
Synced to current cvs.
Split out the patch for screens.c. Apply this to display the
tags in "Show ID3 Info" (also adds a space between id3
items for readability).
Comment by Mark Arigo (lowlight) - Monday, 31 October 2005, 20:45 GMT

UPDATE 10/31:
1. Synced to current cvs.

2. Parses ID3v2 TXXX fields. Like vorbis comments, these are
name/value pairs and are displayed in wps with %ix"NAME".

3. Parses ID3v2 COMM field (comment). Use wps code %
ix"COMMENT" to display this value. Does not work with
ID3v1 comments. This should probably be a hard coded tag
like artist, album, etc.

4. Parses ID3v2 TDAT field (date). This is a 4-digit date of the
form DDMM. This field combines with TYER (year) to make a
year string of the form YYYY-MM-DD.
Comment by Mark Arigo (lowlight) - Tuesday, 01 November 2005, 18:53 GMT

Switched from using two arrays (name & value) to a single
array. Doesn't change the functionality of the patch.
Comment by Mark Arigo (lowlight) - Wednesday, 02 November 2005, 18:05 GMT

There was a problem with the screens patch showing half a
line for some fonts. I've removed that patch until I figure it out.
screens.c is still patched to dislay the user comments.
Comment by Mark Arigo (lowlight) - Wednesday, 02 November 2005, 21:28 GMT

Fixed a mistake.
Comment by Mark Arigo (lowlight) - Thursday, 10 November 2005, 16:14 GMT

The comment field is now handled with the %im wps syntax
(too bad %ic is already used for composer). This includes
id3v1, id3v2, and vorbis comments (and maybe ape tags)
named "comment" (any case).

Other user defined comments are handled as before: %
ix"TAGNAME" (here case matters, although I could change
that).

All tags are displayed in the "Show ID3 Info" screen.
Comment by Mark Arigo (lowlight) - Wednesday, 23 November 2005, 20:42 GMT

UPDATE 11/23:
Synced to current cvs. Also "fixes" the "Show ID3 Info"
screen.
Comment by Mark Arigo (lowlight) - Wednesday, 23 November 2005, 21:56 GMT

WARNING...I may have been too hasty to update this...it's
locking up my player. Wnfortunately, it will be next week
until I can look at it again.
Comment by Mark Arigo (lowlight) - Friday, 02 December 2005, 21:52 GMT

UPDATE: 12/02
Synced to current cvs.
I tested it this time and it appears to function as it
should.
Comment by Anonymous Submitter - Saturday, 21 January 2006, 14:31 GMT

How does it handle multiple fields with same tagname? For
example, vorbiscomment allows "ARTIST=Megumi Hayashibara"
and "ARTIST=Masami Okui" in the same file (for a song with
multiple singers).
Comment by Mark Arigo (lowlight) - Wednesday, 08 February 2006, 22:10 GMT

UPDATE: 2006-02-08
Synced to current cvs.

In response to the previous question about multiple fields
with the same name...only the first one encountered will
be displayed. You could use ARTIST, ARTIST1, ARTIST2, etc
to differenciate.
Comment by Mark Arigo (lowlight) - Thursday, 09 February 2006, 14:57 GMT

UPDATE: 2006-02-09
Small bug fix.
Comment by Mark Arigo (lowlight) - Friday, 10 February 2006, 21:19 GMT

UPDATED DESCRIPTION:
This patch adds support for user defined tags and allows
you to reference them in the WPS by the %ix"Name" syntax.
Vorbis Comments, APEv2 tags, and ID3v2 TXXX tags are
supported in this way.

Support has also been added for the "Comment" field in all
tag formats which uses the %im syntax.

New with this patch is support for ID3v2 fields that are
not supported by Rockbox. They can now be referenced by
their native frame name, e.g., TCON, TCOP, TDAT, etc. (for
the whole list, see
http://www.id3.org/id3v2.3.0.html#sec4.2.1). For example: %
ix"TDAT".

The "Show ID3 Info" screen (long button press on wps
screen) will display all the tag names and values.
Comment by Mark Arigo (lowlight) - Tuesday, 21 March 2006, 19:32 GMT
UPDATE: 2006-03-21
Synced to current cvs.
Comment by Matthias Mohr (aka Massa) (mmohr) - Friday, 24 March 2006, 15:07 GMT
UPDATE: 2006-03-24
Because lowlight doesn't seem to have time this week,
I produced a synced patch to the current cvs
Comment by Matthias Mohr (aka Massa) (mmohr) - Tuesday, 28 March 2006, 14:12 GMT
UPDATE: 2006-03-28
It now also works on targets with hardware codec (I tested Archos recorder).
And I changed the behaviour a bit:
%ix|tagname|
%?ix|tagname|<true|false>
are now also allowed (makes it IMHO more consistent to other tags)
e.g.
%?ix|LOCATION|<%ix|LOCATION||No location available>
%?ix|LOCATION|<%ix"LOCATION"|No location available>

Also allowed are now already available tags, e.g.
%ix|TALB|
will display the album (same as %ia).

Internally I changed a lot ;)
I also highered the number of possible user tags to 10
and the bufsize to 512 (for devices with memory <= 4M)
and to 1024 (for devices with memory > 4M)
Maybe it's a bit big - but I wanted to see more about my comments :-)

It still only displays ID3v2 information and no ID3v1 information
but it should be no problem to extend it... (maybe I'll do it later)

Known bug: In my tests with the simulator, the comment tag shows a
few strange characters at the beginning.
I don't know why :(
Maybe lowlight or somebody else can have a look at it?
(may have something to do with unicode mapping???)
Comment by Matthias Mohr (aka Massa) (mmohr) - Friday, 31 March 2006, 06:40 GMT
Forget my last patch - it works in principle,
but it wastes a lot of memory!

I learned, that the mp3entry structure will
be used for 32 tracks -> so highering anything
inside is really no good idea!
And to make it even 1024 bytes large is an
absolutely waste of space...

I think the whole thing should be build into
the audiobuffer and therefore only loaded once
when loading a new track.
With that could also use as much memory as is
needed and not waste something where e.g. no
tag exists for...

So my suggestion is to work on that and put
it in after 3.0 - when the number of relevant
changes hopefully calm down :)
Comment by Ioannis Koutoulakis (Genre9mp3) - Tuesday, 06 June 2006, 12:22 GMT
I can't get this to work....any updates maybe?? Thanks in advance
Comment by Imre herceg (imre_herceg) - Monday, 29 January 2007, 15:29 GMT
I think this is a good patch, sorry it does not work with current daily builds.
Could someone please sync it to a recent version, please.
Comment by Mark Arigo (lowlight) - Monday, 29 January 2007, 17:38 GMT
I will rework this once "metadata-on-the-buffer"...a framework for storing arbitrary amounts of metadata (tags, album art, etc) on the audio buffer...has been implimented.
Comment by Xinlu Huang (polygonal) - Wednesday, 21 November 2007, 18:13 GMT
"I will rework this once "metadata-on-the-buffer"...a framework for storing arbitrary amounts of metadata (tags, album art, etc) on the audio buffer...has been implimented." -- still valid interest? Would love to see it implemented with MoB.
Comment by Mark Arigo (lowlight) - Wednesday, 21 November 2007, 19:50 GMT
Yes, I still plan to revisit this, I just need the time. But I've got "real" work and some other Rockbox things I want to do first.

Loading...