Setting MP3 ID3 tag renders mp3 file useless

Hi guys,
I'm using the Java MP3 class Library from www.id3.org and am trying to set the artist and title of my mp3s.
If anyone has used this library, do you know how I might set this information?
I've tried using the TagContent object supplied by getArtist() and getTitle(), furthermore I have tried creating a new TagContent and applying the tag to the file, but it just throws exceptions when I next try to read this information from the file.
e.g I have tried this:
MP3File f = new MP3File(new File("D:/"),"1999_Prince.mp3");
TagContent tc = f.getArtist();
tc.setContent("PRINCE");
f.setArtist(tc);
f.update();and also this:
MP3File f = new MP3File(new File("D:/"),"1999_Prince.mp3");
TagContent tc = new TagContent();
tc.setContent("PRINCE");
f.setArtist(tc);
f.update();This example only changes the artist to capital letters (I'm just experimenting with the code), but it means when I come to read the file again, I can't read the artist.
Thanks in advance for any ideas,
Richard

Hi,
I just tried it out too, I was lookin for some java mp3 classes and these look great. I used your code to rename a couple of files as a test and it worked. Onlt difference was I used the single string constructor rather than the (file, String) one. I think that it might be interpreting your D:\ as being the name of the file and it cant find it. I'd try the String,String constructor instead eg ("D:\","file name"). These classes look really interesting. I might create a decent java mp3 editor with um at some stage if I get time!
Kemal Enver
[email protected]

Similar Messages

  • How do you force itunes comments to ID3 tags in MP3 files?

    I have comments all throughout itunes. The mp3 files do not have those comments in the ID3 info.
    How do you force itunes comments to write out to ID3 tags in MP3 files?
    The folder and files all have write permission.

    Yeah, don't do that, you probably also degrade the sound quality... If you've confirmed it is something odd with multiple tags try this.
    Select a group of mp3 files (You might want to start with a smart playlist so you don't mess with any other format)
    Right-click and use Convert ID3 Tags > None (may need to repeat this step if multiple tags)
    Then right-click and use Convert ID3 Tags > v2.3 (v2.4 support still patchy from various accounts)
    Downside is that it will lose any embedded artwork, but it should preserve all other meta-data, both tag-based and stored within the library itself.
    In fact, if you use my CreateFolderArt script before and after updating the tags it should archive any artwork as a local Folder.jpg image for each album and then reinsert that image on the subsequent run... Check it out on a single album first. If it doesn't work as expected let me know and I'll tweak the script to achieve this end.
    tt2

  • Missing ID3 Tags on MP3 CD burned with iTunes

    I have a Sony CD Player in my car. This Player supports mp3 CD's. To Burn such CD's with iTunes is not the Problem.
    iTunes seems not to set the ID3-Tag in it's Libary. Is it possible to set the iTunes-Libary-Informations (as they are displayed on my Screen) as ID3 Tags to the Files ? Are there Risks within ?

    Ooops. You just created a lot of work by erasing the tag info.
    I think there are some scripts out there that can fill in ID3 tags based on file names.
    This page is from an apple discussions regular poster:
    http://samsoft.org.uk/iTunes/scripts.asp
    You could try the "TagFromFilename" script.
    For future, itunes does not have the ability to update tag info like Windows Media Player does. I suppose you could see what WMP will do, before trying that script.
    Since I haven't used either one to do this, I can't say how well either works.

  • MP3 ID3 tags

    I'm looking for some free shareware software to do MP3 ID3 tags to use along with itunes. Can anyone suggest a good one to use?
    Thanks.

    import java.io.*;
    public class ReadID3 {
        public static void main(String[] arguments) {
            try {
                File song = new File(arguments[0]);
                FileInputStream file = new FileInputStream(song);
                int size = (int)song.length();
                file.skip(size - 128);
                byte[] last128 = new byte[128];
                file.read(last128);
                String id3 = new String(last128);
                String tag = id3.substring(0, 3);
                if (tag.equals("TAG")) {
                    System.out.println("Title: " + id3.substring(3, 32));
                    System.out.println("Artist: " + id3.substring(33, 62));
                    System.out.println("Album: " + id3.substring(63, 91));
                    System.out.println("Year: " + id3.substring(93, 97));
                } else
                    System.out.println(arguments[0] + " does not contain"
                         + " ID3 info."); 
                file.close();
            } catch (Exception e) {
                System.out.println("Error — " + e.toString());
    }source : - http://www.informit.com/library/content.asp?b=STY_Java2_24hours&seqNum=218&rl=1

  • Missing ID3 Tags on Song Files

    I have a obscure problem with iTunes that has me very frustrated. I selected my entire music library, then right click -> get info -> check boxes for artist, genre, album, etc and then hit okay. I thought this would look for missing tag information in songs and fill in the blanks, but instead it erased the tag information for all the songs in my library.
    Luckily, my hard drive was spared. When I open up the C: drive and look at my music folder, nothing has changed. All of the mp3 files are still tagged with the correct information. The only problem is that when I try to access songs from iTunes they appear to have no such tag information.
    I have tried fixing this by deleting everything from iTunes and then adding it all back, but this didn't help. Reinstalling iTunes and a full Windows system restore didn't help either.
    The result of this is that I'm afraid to sync my iPod with my computer until this is all resolved. Any insight into the problem would be greatly appreciated. Thanks.

    Ooops. You just created a lot of work by erasing the tag info.
    I think there are some scripts out there that can fill in ID3 tags based on file names.
    This page is from an apple discussions regular poster:
    http://samsoft.org.uk/iTunes/scripts.asp
    You could try the "TagFromFilename" script.
    For future, itunes does not have the ability to update tag info like Windows Media Player does. I suppose you could see what WMP will do, before trying that script.
    Since I haven't used either one to do this, I can't say how well either works.

  • ID3 tags in MP3 files

    Hello everybody!
    How can I read the ID3 tags from an MP3 file? Not just the title, artist and album. All of that. I know the last 128 bytes are reserved for ID3 tags in version 1. But in version 2 (and over) have a lot of other tags, like the album picture (APIC), year (TYER). So how can I do that?
    By Gericop
    P.S.: I don't want to use a 3rd party package...
    Edited by: Gericop on Feb 2, 2008 7:17 PM

    It's not an XML format. If you read this last 128 bytes, you can see title, album and some more infos, but you have to parse it yourself. That isn't hard. But I don't know, how can I determine the v2 tags (and their size).

  • Preserve ID3 tags in MP3/AIF files when importing to FCS

    I've got 7000 music files in a carefully groomed iTunes library, each track donated by a local musician for use in our local television productions. I need to move them out of this lame iTunes storage system and into Final Cut Server for use throughout our facility.
    When I import files, the ID3 tags are not preserved. I don't want to hand enter 7000 artist/album/track names all over again. That's madness.
    Working with AIFF files mostly, a few MP3s. Final Cut Server 1.5.2.
    Anyone got any tips?

    There is a solution that involves pruning Spotlight records of the said audio files. The only catch is that it requires Spotlight indexing to be on, which may not be desirable in an Xsan environment. Another approach is to use AtomicParsley (http://atomicparsley.sourceforge.net/) to retrieve the tags. Either way, you will need to generate XML files that Final Cut Server can read. I would recommend using Ruby and Jim Weirich's excellent Builder gem (http://github.com/jimweirich/builder).
    So, make a subscription for new audio assets, run a script that retrieves metadata from the original file and then write a setMd XML file to a Final Cut Server watch folder. There are a few things you will need to solve, such as retrieving the path of the original media. If coding is not your thing, you might consider Transmogrifier (http://transmogrifier.sourceforge.net/), which I've never tried, but does seem to solve many of these issues.
    Good luck.

  • How to edit ID3 tag of mp3 file?

    Id3INFO but I know it's read-only. How can I change the ID3Tag an mp3? Any tutorial or tips?

    to edit ID3 info in an AIR application? I cannot be of help.
    However, there are many free apps available for mp3 editing- one that I use is Audacity (http://audacity.sourceforge.net/).
    Just open MP3 in Audacity(v1.2.6), go to Project > Edit ID3 tags.

  • Imported MP3s: ID3 tag character encoding recognition issues

    My ID3 tags are encoded in Windows Code Page 932, but iTunes have misinterpreted them as MacRoman encoded. How can I correct this? Fortunately, I also have the pre-import original files aside from the copies managed by iTunes, but I believe iTunes is already smart by not modifying the binary upon import.

    Hopefully, but I'm not too sure. If  one launches Notepad.exe in the Japanese edition of Windows 7, then chooses to save new text in "ANSI" encoding, it still saves the text file in Windows Code Page 932 (which is not ANSI per proper definition of ANSI).
    These ID3 tags were from MP3s that were sleeping in my external harddrive for years, which I finally decided to import into my local drive, now that I have terabytes of storage.

  • CS6: old problem... no ID3 tags in MP3s -- solved in Audition CC?

    Hi,
    known problem: Audition CS6 (Win7) saves ID3 tags only after re-opening a mp3, adding the meta data and saving the file again (as mp3).
    You can not edit a file losless as WAV and save this file as mp3 -- the ID3 tags are lost.
    Not a usual behaviour
    Question: is this bug (in my opinion it's not a feature...) still "implemented" in Audition CC?
    thanks!
    ... a frustrated user

    I use CC and I just had to drop ISRC codes into a heap of wav files as well as update the ID3 and RIFF data
    I converted them all to mp3 files using dbPoweramp (because that's what I'm used to doing) and all the details were there in both the wav & mp3 files
    Hope that helps
    PS: I also opened an mp3 and added some ID3 data and saved it and the data was still there

  • Missing ID3 tags in acc files

    Hi
    If I import music to aac files, I'm missing the the ID3 tags in the music file (in file property). It works with MP3 files.
    Why there are no ID3 tags in the aac files?
    Any solutions to have the ID3 in aac as well?
    Thanks!
    (iTunes Ver. 7.5)
    BR
    ibex

    These are songs you imported from a CD?
    When you insert the CD, does the info show up on the CD in iTunes?

  • Cant change ID3 tags [on certain files]

    Some files I have, after making changes to their tags in iTunes, revert to their original tag info upon playing. Very annoying [especially when/if file contains faulty info].
    I have gone as far as changing the file info in the Finder, with no success. In fact, I can picture scenarios where this would result in a 'missing' file in iTunes. Even if this method were to work, I would only classify it as a workaround - not a soultion, by any means.
    All apologies if this issue has been addressed already. I am running iTunes 4.9, but the problem was first noticed under 4.7 [i believe].
    Thanks in advance,
    -af-

    I had the same problem with some mp3 files that I downloaded. Couldn't change the tag names, and couldn't add album artwork.
    From another post on a seperate topic in relation to the ID3 tags, I think I found an answer that worked for me.
    Select the songs in iTunes, go to Advanced and then "Convert ID3 Tags..."
    Then put a check in the ID3 tag version and make sure that the version is "none". Click OK to change the ID3 tags.
    This clears the ID3 version number, but keeps the data. Then go back through the same process but change the ID3 tag version to the original ID3 tag version (2.2, 2,3, etc).
    As I said, this worked for me, so I hope this works for you.

  • MP3 ID3 tags in non standard character set

    Hello,
    I'm curious as to how I can rip a cd as mp3 and read the tags that have been encoded in a non western or unicode character set. Right now I'm using the LANG environment variable and setting it to the locale that matches the character set, ripping the songs, and then writing the tags using easytag as unicode before resetting the LANG variable. This is fine, but it gets annoying as once I change the language a lot of my programs also start using that language and I would like them to remain english.
    Is there a simpler and more straight-forward way of doing this?
    --Nan

    nan wrote:
    Hello,
    I'm curious as to how I can rip a cd as mp3 and read the tags that have been encoded in a non western or unicode character set. Right now I'm using the LANG environment variable and setting it to the locale that matches the character set, ripping the songs, and then writing the tags using easytag as unicode before resetting the LANG variable. This is fine, but it gets annoying as once I change the language a lot of my programs also start using that language and I would like them to remain english.
    Is there a simpler and more straight-forward way of doing this?
    --Nan
    Just guessing, but what if you only set LC_CTYPE to whatever language you need?

  • ID3 Tags and MP3 player

    Hello,
    I can't afford a new iPod at the moment so brought an Archos MP3 player. It is a drag and drop device so all I need to do is drop the MP3 file in the music folder on the MP3 player. The only issue I am having is that the songs are not labeled correctly once I go to play them on the MP3 player despite being labeled correctly in iTunes. Can anyone suggest why this may be happening and how I can fix the problem?
    Thanks
    MAtt

    Can't say I really know. MP3 tags come in different versions, iD3 version 1, then ID3 versions 2.1-2.4 Maybe your player needs a different version? You could try making copies of a file with different versions. Oh, a file can have both version 1 and 2, but I'm not sure if iTunes is the most flexible editor when it comes to doing that. You can assign versions under the advanced menu.
    Even given the above, I think there are still incompatibilities in tagging. I know people have reported seeing tags in some programs but them not being there in iTunes. I have viewed tags with one application only to have a perfectly understandable comment filed entry turn into gibberish in iTunes.
    Musorg is a free tagger (not the smoothest interface IMHO). You could make a copy of a file, edit, and see if the tags appear on your player. The problem with Musorg is it has a very limited set of fields and will delete any others, so I don't see this as a real solution. MediaRage is a lot more capable but is shareware. OSX is sorely lacking on the free tagger options since most people just use iTunes (which has its limitations when it comes to tagging).

  • MP3 ID3 Tags + Lyrics

    Just wanted to pose this question to people who have experienced first hand or know for sure whether the lyrics you add to an MP3 file in iTunes will stay and embed itself like the album artwork?

    V1.x and v2.x
    http://id3.org/?action=fullsearch&context=180&value=lyric&titlesearch=Titles

Maybe you are looking for