|
-
Jun 1st, 2010, 01:38 PM
#1
Thread Starter
New Member
[RESOLVED] audio file attributes
So, i'm trying to read the details information from various audio formatted files, most of which are mp3s. specifically i'd like to be able to read the title, artist, and # for a few hundred files that need renaming and resorting, so i'm trying to start with a single file.
basically, if you view the properties of any mp3, and go to the details tab, all of this information is listed. i need to grab it programatically using visual studio 2010.
and in case anyone is wondering, the reason for this is that the music was backed up from an itunes library where all of the filenames had been set to simple numbers...i assume for indexing purposes. all of the files still have the detail information though, so i want to write a little program that will pilfer through the music folder and rename all of the music appropriately and then move it all into folder structures that will represent the artist and album...
so yeah...anyone have any suggestions?
-
Jun 1st, 2010, 02:43 PM
#2
Re: audio file attributes
Each different type of music file will store this data differently. For an MP3, this data is stored in what is called an ID3 tag. There are a few different versions of ID3 tags, so you can read about that here:
http://en.wikipedia.org/wiki/ID3
You could search around the web (or maybe in the codebank here) to find some code that shows how to read this data out of an MP3 file, or there are some prebuilt libraries you may be able to utilize to do this for you, so you can spend your time coding the rest of what you need for your end result.
Here is one example of a prebuilt library to do this:
http://developer.novell.com/wiki/index.php/TagLib_Sharp
-
Jun 4th, 2010, 09:59 PM
#3
Thread Starter
New Member
Re: audio file attributes
thanks a lot for the help, with your information/suggestions I've got my application working perfectly now...with 1 slight little annoyance. I want to embed the taglib dll in my exe file, just to keep it clean :P, but it doesn't like me doing that, returning as an error for me this:
Reference to class 'File' is not allowed when its assembly is linked using No-PIA mode.
I've added the taglib dll to resources and set it to embed interop types without success, and i've also tried simply adding the file as a resource, also with no improvement.
i need to add it as a resource, and then reference the resource i think...is that possible? or is there a better way to not have to tote around an external dll with the exe?
it's not vital i suppose that this all be packed up in a since little package, but it would be really nice 
thoughts?
-
Jun 8th, 2010, 01:49 PM
#4
Re: [RESOLVED] audio file attributes
Do you set a reference to this DLL now from your program? Do you know if the DLL is .NET based or COM based?
You may be able to include it in the exe, and then extract it at runtime for use, but I guess that would depend on exactly how the DLL worked.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|