• 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 load AAC/MP4 files and extract raw audio samples?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to load AAC/MP4 files and extract raw audio samples?


  • Subject: Re: How to load AAC/MP4 files and extract raw audio samples?
  • From: Chris Adamson <email@hidden>
  • Date: Fri, 22 May 2015 08:27:08 -0400

Look into AVAssetReader from the AV Foundation framework. On OS X, this is available starting in 10.7, so it’s not quite going to cut it for your Snow Leopard users, but at least it’s 64-bit, unlike QuickTime.

You can single out the audio tracks of an MP3/AAC/MP4/MOV, walk them with the AVAssetReader, and get each sample as a CMSampleBufferRef. From that, you can get timing information, a format description, and the raw data as a CMBlockBufferRef.

[Also, this is now off-topic, so for follow-ups, you should probably go to the AV Foundation devforum at https://devforums.apple.com/community/mac/gandm/av ]

—Chris

On May 22, 2015, at 6:57 AM, Vojtěch Meluzín <email@hidden> wrote:

Hi folks,

I need to load AAC/MP4 (and potentially other iTunes stuff) files and extract the audio samples from them. Using a dedicated cross-platform library would be nice, but it's hard to find one and AAC seems to be trademarked by Apple anyway. So I'd like to use QuickTime for that (any other option?). So I'd first load the file:

QTMovie* movie = [QTMovie movieWithFile: path error: nil];

But then I want to extract sampling rate, number of channels, and the actual samples from it. Any ideas how to do that? Is that even the "right" approach? I need to support 32&64-bit systems from 10.6 to the newest.

Cheers!
Vojtech

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
References: 
 >How to load AAC/MP4 files and extract raw audio samples? (From: Vojtěch Meluzín <email@hidden>)

  • Prev by Date: Re: How to load AAC/MP4 files and extract raw audio samples?
  • Next by Date: Re: How to load AAC/MP4 files and extract raw audio samples?
  • Previous by thread: Re: How to load AAC/MP4 files and extract raw audio samples?
  • Next by thread: Re: How to load AAC/MP4 files and extract raw audio samples?
  • Index(es):
    • Date
    • Thread