View Full Version : Get iTunes MetaData to Flash (any method)
Flash Gordon
02-26-2007, 04:27 AM
Does anyone know how to get the MetaData that has been put into a .mp3 from iTunes to Flash? I don't care if I use php or what. I just need to read that data to a flash application that will be online. HERE (http://www.modernmusicians.com/help/song.zip) is the song that I am trying to read if you need an sample file.
I have tried reading the ID3 tags in Flash and PHP, but I don't think iTunes uses ID3 tags because Flash and PHP comes up empty.
Any help?
Thanks
:)
Not sure if this is what you want, but I got this from the helpfile:
this.createTextField("display_txt", this.getNextHighestDepth(), 0, 0, 100, 100);
display_txt.autoSize = "left";
display_txt.multiline = true;
var song_sound:Sound = new Sound();
song_sound.onLoad = function() {
song_sound.start();
};
song_sound.onID3 = function():Void {
display_txt.text += "Artist:\t" + song_sound.id3.artist + "\n";
display_txt.text += "Song:\t" + song_sound.id3.songname + "\n";
};
song_sound.loadSound("http://www.helpexamples.com/flash/sound/song1.mp3");
Keep in mind that because ID3 2.0 tags are located at the beginning of an MP3 file (before the sound data), they are available as soon as the file starts downloading. So, you have to have that listener (.onID3) to receive the data.
Flash Gordon
02-26-2007, 07:43 PM
I have tried reading the ID3 tags in Flash and PHP, but I don't think iTunes uses ID3 tags because Flash and PHP comes up empty.
Thanks anyway.
haha!
My apologies. I misunderstood you.
As far as I know iTunes uses an XML file to populate all that data... Might be worth locating the dir it is in...?
Flash Gordon
02-26-2007, 08:10 PM
Someone sent me an .mp3 file that they inserted metadata into via iTunes. I can right click on the mp3 itself (from Windows) and view the metadata in its properties. That's means it is self contained an not an xml file. Please download the file I linked to to see that for yourself.
Thanks again.
:)
CyanBlue
02-26-2007, 08:15 PM
A quick google came up with these... Can you use these PHP classes to read the ID3 tag and pass it back to Flash???
http://www.phpclasses.org/browse/package/1440.html
http://getid3.sourceforge.net/
Flash Gordon
02-27-2007, 01:58 AM
Yea. like I said, I don't think it is ID3. I have already tried with php and it comes up null (just as flash does).
I looked at the getid3 site earlier, there is a crap load of script and docs to read for something I'm not getting paid too well for and for something that I don't even know it will work since once again, I'm not convienced it is ID3 tags.
Thanks everyone :)
CyanBlue
02-27-2007, 02:12 AM
I've got no clue on this cuz I don't use iTunes at all... and google does not really give me much... Does iTune have something like developer channel or something???
Flash Gordon
02-27-2007, 04:47 AM
you can basically put metadata into an MP3 by right clicking on it (using M$) and hit properties and then going to the summary tab. This is what I'm trying to read.
CyanBlue
02-27-2007, 11:46 AM
Yeah... I can see that it is not saved into the ID3 tag... If I open up the file into the text editor, I do see that info in the beginning of the file but that is not ID3 tag... Interesting...
Flash Gordon
02-27-2007, 03:39 PM
Great! At least we know it isn't ID3 and I don't have to waste my time with that.....hm...
Flash Gordon
03-01-2007, 09:45 PM
Any more ideas?
Later I'm going to try and read it like a .jpg file and try to read that info. I remember a thread like that about a year ago.
Still looking for a solution though.
:)
sunlis
03-02-2007, 06:31 PM
Doesn't iTunes use a database for that stuff?
I took a quick look in my Music directory, and in the iTunes folder, it has an iTunes Database file, called iTunes Library, might be stored in there.
Also,if I open up Finder (I'm on a Mac) and right click an mp3 in my iTunes library and go to Get Info, I can read what I'm assuming would be an ID3 tag, because it shows me the artist, song name, album, duration, and even channel count.
Not sure if this gets you anywhere, or if it is at all usefull, but I thought I would lend my input.
EDIT: Nevermind that, it's definately xml. I just found the file, it lists all of that fun ID3 stuff in it.
Flash Gordon
03-02-2007, 09:31 PM
no......
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.