Results 1 to 4 of 4

Thread: [RESOLVED] audio file attributes

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Posts
    9

    Resolved [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?

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    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

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Posts
    9

    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?

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    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
  •  



Click Here to Expand Forum to Full Width