crelf Posted March 10, 2007 Report Share Posted March 10, 2007 From wikipedia: QUOTE ID3 is a metadata container most often used in conjunction with the MP3 audio file format. It allows information such as the title, artist, album, track number, or other information about the file to be stored in the file itself. Does anyone know how to read a file's ID3 tag? I'm not interested in editing the tags, just reading them. For example, I'd like to scan a folder for all the mp3 files and compile a list of, say, artists. Here's some more info on ID3 from wikipedia and the ID3 foundation. Quote Link to comment
Ton Plomp Posted March 10, 2007 Report Share Posted March 10, 2007 What is this homework???? Sorry, it's friday night over here..... Maybe some DLL's? Quote Link to comment
crelf Posted March 10, 2007 Author Report Share Posted March 10, 2007 QUOTE(tcplomp @ Mar 10 2007, 09:22 AM) What is this homework???? Actually, yes it is I'm backing up my iPod, and when copying files from it (it's mounted as an external drive) they're all named xxxx.mp3 (where x = aplha character) and I'd like to rename them something human-friendly like ArtistName_AlbumName_TrackNumber_TrackName.mp3 Quote Link to comment
Ton Plomp Posted March 10, 2007 Report Share Posted March 10, 2007 aaah, the good old homework. sorry, forget LV and start using Tagscanner, does it nice and quick and versatile Ton Quote Link to comment
jaegen Posted March 10, 2007 Report Share Posted March 10, 2007 http://sourceforge.net/projects/id3lib/ The windows binaries download contains a dll. No idea how to use it, but it should work. Jaegen Quote Link to comment
crelf Posted March 11, 2007 Author Report Share Posted March 11, 2007 QUOTE(tcplomp @ Mar 10 2007, 09:37 AM) ...forget LV and start using Tagscanner, That's perfect - thanks Ton! QUOTE(jaegen @ Mar 10 2007, 09:40 AM) The windows binaries download contains a dll. No idea how to use it, but it should work. Thanks - I was thinking of using those, but now Ton's come up with the perfect substitute Quote Link to comment
Michael Aivaliotis Posted March 11, 2007 Report Share Posted March 11, 2007 I'm not sure what you want here. Itunes does all this for you already, and on top of that it puts all you rmusic in logical folders. Quote Link to comment
crelf Posted March 11, 2007 Author Report Share Posted March 11, 2007 QUOTE(Michael_Aivaliotis @ Mar 10 2007, 12:30 PM) I'm not sure what you want here. Itunes does all this for you already, and on top of that it puts all you rmusic in logical folders. Not on my old old old iPod - it's all in folders called F00, F01, F02... and they're named in seemingly quasi-randomly named four letter files. Quote Link to comment
Ton Plomp Posted March 11, 2007 Report Share Posted March 11, 2007 At least ID3 v1 tags are quite easy according to tst (dark side alert) Ton Quote Link to comment
crelf Posted March 11, 2007 Author Report Share Posted March 11, 2007 QUOTE(tcplomp @ Mar 10 2007, 08:13 PM) At least ID3 v1 tags are quite easy http://sine.ni.com/niforum/niforum?forumDU=http://forums.ni.com/ni/board/message?board.id=170&message.id=124924&requireLogin=False' target="_blank">according to tst (dark side alert)QUOTE An ID3 tag is just the last 128 bytes of a file and most of it is plain ASCII, so you can read that using Read File and then change it and write back That's interesting - very interesting. 128 bytes isn't a whole lot of room to jam in artist, album, title, track number, etc, although I s'pose it was only version 1... Quote Link to comment
Jeff Plotzke Posted March 11, 2007 Report Share Posted March 11, 2007 QUOTE(crelf @ Mar 10 2007, 09:52 AM) That's interesting - very interesting. 128 bytes isn't a whole lot of room to jam in artist, album, title, track number, etc, although I s'pose it was only version 1... Yup -- ID3v1 is only 128 bytes at the end of the file, however you're limited to 30 bytes for title, artist, etc. ID3v2 gives much more flexibility by assigning "frames" of information of a given type. These frames can be variable length, so you can store text, images, even other MP3 files inside the tag! These of course of much harder to read directly, since each field isn't in a static position in the file. If you're looking for the exact specs, ID3.org is a good site to visit: http://www.id3.org/Developer_Information''>http://www.id3.org/Developer_Information' target="_blank">http://www.id3.org/Developer_Information Quote Link to comment
Mikkel Posted March 13, 2007 Report Share Posted March 13, 2007 QUOTE(crelf @ Mar 10 2007, 12:32 AM) Actually, yes it is I'm backing up my iPod, and when copying files from it (it's mounted as an external drive) they're all named xxxx.mp3 (where x = aplha character) and I'd like to rename them something human-friendly like ArtistName_AlbumName_TrackNumber_TrackName.mp3 I did this a couple of years ago (in C using id3lib) for exactly the same reason... If you consider reading MP3 headers yourself, take a look at the id3lib code - it's quite convulted... -Mikkel Quote Link to comment
orko Posted March 13, 2007 Report Share Posted March 13, 2007 QUOTE(Mikkel @ Mar 11 2007, 02:54 PM) I did this a couple of years ago (in C using id3lib) for exactly the same reason... I've done this in other languages as well, but I've honestly thought that having an MP3 library in LabVIEW might prove useful. Especially since going back to Perl or PHP for me would be similar to a Lexus owner getting back into his rusty 1970 http://www.youtube.com/watch?v=1Sn9L94YrNk' target="_blank">Toyota Hilux from High School... (bugger) For instance, I have a library of MP3s that are added to weekly (for my church) on a web site. We need to get a podcast going so that people can set their iPods to download the updates automatically. Well, there are about 9.5Gb of MP3s that need to be tagged since no one there knew about tagging when they started the process years ago on audio cassette... Would the tool mentioned (Tagscanner) be suitable for this? What about something else that is automated to tag and update an RSS XML file as MP3 files are dropped into the website? It seemed like I could do this in LV, but I haven't tried yet. Quote Link to comment
Ton Plomp Posted March 13, 2007 Report Share Posted March 13, 2007 QUOTE(orko @ Mar 12 2007, 06:15 AM) Would the tool mentioned (Tagscanner) be suitable for this? Most likely: Yes. Tagscanner can create tags based on directory structure/filename and create a directory structure/filename based on tags. What I normally do is check the tags, update them from the directory structure if needed, and then apply my own directory structure based on the tags. Ton Quote Link to comment
Mikkel Posted March 17, 2007 Report Share Posted March 17, 2007 QUOTE(orko @ Mar 12 2007, 06:15 AM) I've done this in other languages as well, but I've honestly thought that having an MP3 library in LabVIEW might prove useful. Especially since going back to Perl or PHP for me would be similar to a Lexus owner getting back into his rusty 1970 Quote Link to comment
orko Posted March 18, 2007 Report Share Posted March 18, 2007 QUOTE(Mikkel @ Mar 16 2007, 02:39 PM) I've made a few interface VIs for the ID3LIB dll, which should make it possible to extract basic information from ID3 headers. Wow! Thanks Mikkel! :thumbup: That's what I like about these forums, if you research and ask the right questions, there is bound to be someone that can help you out! I'll take a look at these next week!! PS. Hey!!! This is my 100th post! Quote Link to comment
Mikkel Posted March 20, 2007 Report Share Posted March 20, 2007 QUOTE(orko @ Mar 17 2007, 11:30 PM) Wow! Thanks Mikkel! :thumbup: That's what I like about these forums, if you research and ask the right questions, there is bound to be someone that can help you out! I'll take a look at these next week!! PS. Hey!!! This is my 100th post! It's nice to hear, that you can use this for something I mostly made it as an experiment to see if I could get ID3Lib to work with LabVIEW... I've updated the download, as the original one had a memory leak in the demo vi (if you make a new tag, you better delete it afterwards, else you are leaking tags). Congrats on your hecto-post! -Mikkel Quote Link to comment
crelf Posted May 28, 2007 Author Report Share Posted May 28, 2007 FYI: Tagscanner has moved to a new home - the page is in Russian, but if you mouse-over the links at the top, you'll see one for downloading (the software is still in English). Quote Link to comment
Eugen Graf Posted May 28, 2007 Report Share Posted May 28, 2007 QUOTE(crelf @ May 27 2007, 10:49 PM) FYI: Tagscanner has moved to a new home - the page is in Russian, but if you mouse-over the links at the top, you'll see one for downloading (the software is still in English). Here the english version of this site: http://www.xdlab.ru/en/index.htm Eugen Quote Link to comment
crelf Posted May 28, 2007 Author Report Share Posted May 28, 2007 QUOTE(Eugen Graf @ May 28 2007, 07:18 AM) Here the english version of this site :thumbup: Thanks Eugen! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.