LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Truncated ID3 Tags (https://www.linuxquestions.org/questions/linux-software-2/truncated-id3-tags-421571/)

Napalm Llama 03-04-2006 10:54 AM

Truncated ID3 Tags
 
Hi there. I've been trying to write a script that turns the horrible filenames you get from www.allofmp3.com into nice ones ("07_-_out_of_space_220_lame_presetextreme.mp3" becomes "The Prodigy - Out Of Space.mp3") by reading the ID3 tags.

I've hit a snag, though. Long titles get truncated after 30 characters. Let me demonstrate:
Code:

nl@splig ~/muzak/aom $ id3info 01-tainted_love_-_where_did_our_love_go_\(original_12___version\)_220_lame_presetextreme.mp3

*** Tag information for 01-tainted_love_-_where_did_our_love_go_(original_12___version)_220_lame_presetextreme.mp3
=== TIT2 (Title/songname/content description): Tainted Love - Where Did Our
=== TPE1 (Lead performer(s)/Soloist(s)): Soft Cell
=== TALB (Album/Movie/Show title): Tainted Love (Vertigo)
=== TYER (Year): 1994
=== COMM (Comments): (ID3v1 Comment)[XXX]: http://www.allofmp3.com
=== TCON (Content type): (0)
*** mp3 info
MPEG1/layer III
Bitrate: 128KBps
Frequency: 44KHz

I've tried all the command-line id3 tools I could find in Portage, and they all yeild the same (lack of) results. Is this a physical limitation in the id3 spec? Because AmaroK seems to have no problem remembering long song titles. I know it uses databases for various things, so that could be it, but if it's possible to retrieve these long titles using command-line tools I'd very much like to hear about it.

Cheers in advance!

maroonbaboon 03-05-2006 06:21 AM

There are two types of id3 tags, called (guess what!) v.1 and v.2. Your output seems to be showing a v.1 tag. This type of tag has a fixed (often inadequate) amount of space available for each field. The data is located at the beginning of the mp3 file, so players will read it first.

V.2 tags are a much more complicated business, and can contain more or less arbitrary amounts of data (e.g. pictures of album covers). I recall seeing somewhere that Windows Media Player did not use v.2 tags for security reasons. Not sure if that has changed.

Anyway, the link belows shows projects using id3v2 tags. Hopefully there is something useful there.

http://freshmeat.net/search/?q=id3v2&section=projects

Napalm Llama 03-05-2006 08:23 AM

Microsoft have disabled something for security reasons? You're kidding me, right? So they'll block off a useful and perfectly safe feature of mp3s, but perfectly happily execute arbitrary code stored in image files... This is why I don't use Windows anymore :p

...and argh! AmaroK doesn't support id3v2 tags either! I used a program (called id3v2) to copy all the id3v1 into id3v2, then used AmaroK to extend the song names - it did so, but when I checked back with the app it had reverted the file back to how it was - no v2 in sight! I think it must use its database - but how annoying that it doesn't support something which seems so obviously better :(

gloomy 03-13-2006 10:28 AM

For a footnote:

I did the exact opposite: cleared all id3v2 tags and maintained id3v1 labels. Amarok works fine, though had to manually check the length of the problematic files.

And I do not really see the point of huge tags in media files, not so much because of possible (MS) security leaks but because these contain mostly useless information. Say, if one user among millions would have few illegal mp3s, who would want to see tags like "ThiS--fiLE--came--from-TORrrenzz.ru". And if one buys a cd, would not the rights be already within the box, not in the information within the files. And which normal user wants tags that contain the name of a internet radio?

Hoh.

b.

Napalm Llama 03-13-2006 11:07 AM

If I download my music (legally) to my hard drive, then copy it to my mp3 player, I want full song name support - my main gripe with id3v1 is that, as the title of this thread says, the song names get truncated.

CDs are inconvenient, so I don't buy them.

gloomy 03-15-2006 01:37 AM

Yes. Like it said, it was a pure footnote.

Which version of Amarok are you using? The new 1.4-beta2 solved most of the problems I had with tags, though UTF-8 and scandinavian and other more exotic sings are stil displayed incorrectly.

The beta release, likewise 1.3.8, is still masked but I had no problems whatsoever with these releases. Surely you got the taglib-1.4? b.

markey 03-16-2006 01:44 AM

amaroK supports ID3-V2 tags just fine. But it always writes ID3-V2.4 tags (which is the current version), while some other applications use outdated ID3 libraries which can only read V2.3. Then they fall back to the old V1 tag, if present, which explains the truncated tags.

Also, yes, upgrading to amaroK 1.4-beta2 is a good idea. It's quite stable.

Napalm Llama 03-16-2006 08:17 AM

Cool - I might unmask it then.

My 1.3.8 keeps crashing :(

gloomy 03-16-2006 02:56 PM

Do you want to give some details about the crashes with 1.3.8?

Just as it was actually unmasked for amd64 yesterday.

EDIT: just downgraded to it few moments ago and noticed a huge memory leak. It starts with ~ 40mb and eats, eats, eats until the whole 1gb is used :).

Napalm Llama 03-17-2006 01:48 AM

Well I haven't noticed any pattern to them yet, but the windows stop responding if there are any open and the tray icon disappears (but leaves an empty space, over which the cursor turns into the "loading" one).

I didn't give any details since I figured that this isn't the thread ask about it. If it does it again I'll upgrade, and if it still does it I'll start a new thread with the right title...

But thanks for your concern!:D


All times are GMT -5. The time now is 10:34 PM.