• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: how to get media data for M4A songs I.E. songs purchased from iTunes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to get media data for M4A songs I.E. songs purchased from iTunes


  • Subject: Re: how to get media data for M4A songs I.E. songs purchased from iTunes
  • From: Chris Adamson <email@hidden>
  • Date: Wed, 18 Apr 2012 21:24:58 -0400

You might want to use the iTunes metadata APIs in AV Foundation instead.

For a file using MP4 container (.m4v, .m4a, .aac, etc.), it wouldn't be too hard to parse the file format by hand and find the user info atom. I did this like 10 years ago with QuickTime files and Java (yes, really), and the only major difference is that MP4 uses C-style nil-terminated strings, whereas QT uses Pascal strings (one byte of length followed by that many characters). Once you get the hang of the tree-of-atoms structure, it's kind of fun.

-Chris

Sent from my iPad

On Apr 18, 2012, at 9:03 PM, Andy Davidson <email@hidden> wrote:


AudioFileGetPropertyInfo (audioFile, kAudioFilePropertyInfoDictionary, &dictionarySize, 0);


Seems to work well with songs in mp3 format.


Any idea how I can get access to the meta information for songs purchased from itunes? The only key returned by my test program was duration.


dictionary: {

    "approximate duration in seconds" = "237.2";

}



I am hoping I can find some sort of iTunes id? I want to make it easy for my users to share their play lists. If someone is missing a song. I want them to be able to purchase it from itunes.

Thanks in advance

Andy
Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: how to get media data for M4A songs I.E. songs purchased from iTunes
      • From: Andy Davidson <email@hidden>
References: 
 >how to get media data for M4A songs I.E. songs purchased from iTunes (From: Andy Davidson <email@hidden>)

  • Prev by Date: how to get media data for M4A songs I.E. songs purchased from iTunes
  • Next by Date: Loading a Core Audio Plugin with SampleUSBAudioOverrideDriver
  • Previous by thread: how to get media data for M4A songs I.E. songs purchased from iTunes
  • Next by thread: Re: how to get media data for M4A songs I.E. songs purchased from iTunes
  • Index(es):
    • Date
    • Thread