Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exporting MP3 file using QT... What a doc!



On Mar 19, 2004, at 1:38 PM, Mathieu Godart wrote:

Hi all!

I'm sorry for what -I think- will a really stupid and simple question. I've
never used the QT API, but I need it for a Cocoa program I'm writing.

This application needs to import a MP3 file and then convert it to AAC file.
I guess using QT for that is the best way to do, but I didn't though it
would be so complex to get what I need from the API.

I'm not exactly sure what you mean by an AAC file. Do you mean AAC in an
MPEG-4 container, which is also called .m4a? This is what iTunes will
create when it encodes a file. Or do you mean one of the various raw
AAC formats? <http://www.audiocoding.com/wiki/index.php?page=AAC> has
some minimal information if you scroll down to packaging.

If you want .m4a, you are in luck, QuickTime has an exporter for that. If
you want some raw AAC variant, you will need to handle the file format
yourself, either via the app or by writing an exporter.

I'm importing a movie using NSMovie object. I can get the QTMovie from it
but I don't know what to do with it next. I'm lost in the various component,
API functions... I've tried to read the Quick Start and a lot of other docs,
but it seems dark to me. And, as I read them on, the docs appear far from
what I want to do.

Often the easiest way to figure out how to do something with QuickTime is to
find the sample program that does what you want and steal from it. In this
case, there is a sample called ImportExport part way down the page:

<http://developer.apple.com/samplecode/QuickTime/idxImportExport- date.htm>

Near the bottom of the function exportMovie() you'll find the basic
recipe you are looking for to export. Use ConvertMovieToFile(). You can
either have it use the default exporter config, or open the exporter component
first and call the UI to configure the exporter and then pass the configured
exporter to ConvertMovieToFile().

The last piece of the puzzle is which exporter to use. A quick trip to
QuickTimeComponents.h yields the MPEG-4 component is kQTFileTypeMP4.

Some examples:
- I try to understand how to save a movie in a file, I understand that it's
not what I want: I need my file to be a AAC and not a MooV file.
- I try to understand the exporters, but it's all about imaging, not sound.

Exporters work for movies. Movies can consist of images and sound (and other
things as well.)

I often feel like I'm going too deep in the API. I just want to use QT as a
hig-level tool. I don't need to know what a Atom is or how to handle the
movie data... It seems to me the doc lacks of abstraction.

Applications generally don't have to get too deep into the API unless they
have fairly special requirements.

One of the bigger problems I see folks getting in to QuickTime programming
make is to confuse the in-memory Movie data structure with the Movie file
format. In memory, everything QuickTime deals with is a Movie, even if
the data is in some weird file format.

Steve
_______________________________________________
quicktime-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/quicktime-api
Do not post admin requests to the list. They will be ignored.


References: 
 >Exporting MP3 file using QT... What a doc! (From: "Mathieu Godart" <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.