LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-04-2006, 10:54 AM   #1
Napalm Llama
Member
 
Registered: Nov 2004
Location: Bristol, UK
Distribution: Gentoo 2005.0
Posts: 224

Rep: Reputation: 30
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!
 
Old 03-05-2006, 06:21 AM   #2
maroonbaboon
Senior Member
 
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
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
 
Old 03-05-2006, 08:23 AM   #3
Napalm Llama
Member
 
Registered: Nov 2004
Location: Bristol, UK
Distribution: Gentoo 2005.0
Posts: 224

Original Poster
Rep: Reputation: 30
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

...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
 
Old 03-13-2006, 10:28 AM   #4
gloomy
Member
 
Registered: Jan 2006
Location: Finland
Distribution: Mainly Gentoo
Posts: 119

Rep: Reputation: 15
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.
 
Old 03-13-2006, 11:07 AM   #5
Napalm Llama
Member
 
Registered: Nov 2004
Location: Bristol, UK
Distribution: Gentoo 2005.0
Posts: 224

Original Poster
Rep: Reputation: 30
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.
 
Old 03-15-2006, 01:37 AM   #6
gloomy
Member
 
Registered: Jan 2006
Location: Finland
Distribution: Mainly Gentoo
Posts: 119

Rep: Reputation: 15
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.

Last edited by gloomy; 03-16-2006 at 03:06 PM.
 
Old 03-16-2006, 01:44 AM   #7
markey
LQ Newbie
 
Registered: Jan 2005
Posts: 7

Rep: Reputation: 0
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.
 
Old 03-16-2006, 08:17 AM   #8
Napalm Llama
Member
 
Registered: Nov 2004
Location: Bristol, UK
Distribution: Gentoo 2005.0
Posts: 224

Original Poster
Rep: Reputation: 30
Cool - I might unmask it then.

My 1.3.8 keeps crashing
 
Old 03-16-2006, 02:56 PM   #9
gloomy
Member
 
Registered: Jan 2006
Location: Finland
Distribution: Mainly Gentoo
Posts: 119

Rep: Reputation: 15
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 .

Last edited by gloomy; 03-16-2006 at 03:03 PM.
 
Old 03-17-2006, 01:48 AM   #10
Napalm Llama
Member
 
Registered: Nov 2004
Location: Bristol, UK
Distribution: Gentoo 2005.0
Posts: 224

Original Poster
Rep: Reputation: 30
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!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting ID3 tags from v2.3 to v2.4 dotancohen Linux - Software 2 02-17-2006 02:41 PM
id3 tags don't seem to appear Valhalla Linux - Software 1 12-13-2005 11:17 AM
Reading Id3 tags jpc82 Programming 7 10-10-2005 08:50 AM
Program for ID3 Tags Boffy Linux - General 1 02-17-2005 02:16 PM
Accessing ID3 Tags oulevon Programming 2 11-15-2002 03:13 AM


All times are GMT -5. The time now is 12:00 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration