Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Audio conversion questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Audio conversion questions




On Jan 19, 2009, at 5:54 PM, Mike Kobb wrote:

Greetings,

I'm new to the QuickTime API and I've spent the last several hours reading the list archive and hammering on Google, so please forgive me if I've somehow missed the obvious answer to these rather basic questions. I've seen a number of folks ask similar questions, but didn't come across conclusive answers.

Let me quickly explain the application that I'm building. I have a network device that uses little-endian 16-bit 44.1kHz PCM audio (basically CD-type audio). I need to build an application for both Mac and Windows that can:

1) Take a PCM audio file from this device and write out a sound file in MP3, AAC, Apple Lossless, AIFF or Wave file formats, according to a user selection.

You're mixing audio compression formats and file formats. They are separate things. For instance, you can't write the mp3 compression format or the aac compression format or the apple lossless compression format to an AIFF file or WAV file. These are all variable bit rate formats. They can be written to other file formats such as mp4, m4a, mov, caf, etc.




2) Take a user-supplied audio file in one of those formats and decode to PCM to send to my device.

I'm confident from what I've read so far that I can accomplish #2 with the QuickTime API.

Yes. That should be no problem cross-platform using the QT api.



The questions are:

A) I understand that Apple does not ship an MP3 *encoder* with Mac OS X, so I had planned to use LAME to do the MP3 encoding. Am I correct about the absence of MP3 encoding?

Correct. We don't license an MP3 encoder for general system use.



B) Can I use QuickTime to simply export the compressed data for AAC or ALAC as an .m4a file? Older postings suggest that the answer at least used to be "no" (that I could only write a .mov), but I'm not sure if that's still the case in Leopard.

Quicktime has a lot of exporters. Movie->Apple TV, Movie->iPhone, Movie->iPod would all export AAC to an m4v (or m4a if audio only). There's also the Movie->MPEG4 which writes .mp4 files. Again, if it's a simple audio only export then mp4 and m4a are equivalent.




C) If it's not possible to directly export, is there some other QuickTime API that would allow taking the resulting .mov and then "wrapping" the compressed data into the proper format?

D) Am I correct that QuickTime does not really provide utilities to read and write the various track metadata information for MP3, AAC, ALAC and AIFF files?

In the QuickTime programming model, importers are used to convert non- QuickTime movies to QuickTime movies in memory, so when you use the QT api's to open up an mp3 file or aif file, for instance, an importer is creating a QuickTime movie referencing the data in those files. And yes, there are generally QT api's available to read the metadata from those formats.


If you're writing a Mac OS X only app, you can also use CoreAudio's AudioFile API to parse metadata from various audio file types.

-Brad Ford
QuickTime Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Audio conversion questions (From: Mike Kobb <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.