Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Working with MPEG-4 Files

QuickTime 6 provides transparent access to MPEG-4 files. You can open .mp4 files using API functions that support importers, such as NewMovieFromFile or NewMovieFromDataRef. End users can open .mp4 files using QuickTime Player's Open or Import commands, or by drag-and-drop. The process is similar to working with an .avi file or other playable non-movie file. Double-clicking an .mp4 file from the desktop may or may not open the file in QuickTime, as other applications can register to handle this file type.

Currently, in order to save an .mp4 file, you use the new QuickTime MPEG-4 movie exporter. The exporter offers basically two ways of working:

In this section:

How The Process Works
New Dialogs for Handling MP4 Files


How The Process Works

Typically, when you open a movie, QuickTime finds the movie atom in the file, processes it, and creates a movie object, i.e., instantiates it. When you use MP4, you have to invoke the importer. What the importer does is scan the file, find the 'moov' atom, and then conform the 'moov' atom––which is an MPEG-4-style movie atom––into a 'moov' atom that is QuickTime-style. QuickTime then creates the movie object.

In the case of exporting, where the data is already in MPEG-4 format––MPEG-4 video or audio––the exporter has QuickTime flatten the data to the file. This produces the movie atom, which points to the file. The exporter once again conforms the movie atom, which is QuickTime-style, into a movie atom which is MPEG-4-style. The exporter then writes this to the file. This is pass-thru.

For an encoding or re-encoding export, the exporter compresses and then writes the MPEG-4 data to a file, whose movie is subsequently made to conform to MPEG-4 style.

New Dialogs for Handling MP4 Files

QuickTime 6 introduces a new set of dialogs in QuickTime Player (illustrated in this section with examples from Mac OS 9 and Mac OS X) that enable end users to open MP4 files.

To work with MP4 files, end users or content authors need to perform a series of import-export operations, using QuickTime Pro. The steps are as follows:

  1. Open a .mov file in QuickTime Player.

  2. In the File menu, click Export.

  3. A dialog appears with a list of export options. Choose Movie to MPEG-4.

  4. Save the .mov to a .mp4 file.

  5. The .mp4 file can now be played on any player that supports MPEG-4.

Figure 1-3 shows the dialog (in Mac OS 9) that appears when you want to save a QuickTime movie, in this case “cool sunset” to a .mp4 file. From the list of options in Export, you choose Movie to MPEG-4.


Figure 1-3  The dialog that appears when you want to save a QuickTime movie to an MPEG-4 file in Mac OS 9 by exporting

Figure 1-3 The dialog that appears when you want to save a QuickTime movie to an MPEG-4 file in Mac OS 9 by exporting

If you click the Options button in the dialog shown in Figure 1-3, the MPEG-4 Settings dialog appears, as shown in Figure 1-4. In this dialog, you can set the basic video track, the physical size of current movie, and the audio track as necessary. If Basic is selected, the video will make use of the basic settings for MPEG-4 and ensure the widest possible range of playback on MPEG-4 compatible devices.

Note that Profile 0, in the text of the dialog, is the ISMA-specified Profile 0, and not the MPEG-4 defined Profile 0. For more information about ISMA and Profile 0, refer to the section “ISMA and Definitions of Profile 0.”


Figure 1-4  The MPEG-4 settings dialog in Mac OS X, with the General pane selected

Figure 1-4 The MPEG-4 settings dialog in Mac OS X, with the General pane selected

Note that the lower portion of the dialog in Figure 1-4 contains additional description and explanation about the choices that are available to the user. Audio can be optimized for music––in this case, AAC. (Note AAC can handle a full range of music and other audio.)

In the Video settings dialog in Mac OS X shown in Figure 1-5, the end user can adjust specific settings for video, such as the number of kbits per second, or the frame rate––for example, 15 frames per second, if that is the rate desired.


Figure 1-5  The MPEG-4 settings dialog, with the Video pane selected

Figure 1-5 The MPEG-4 settings dialog, with the Video pane selected

Figure 1-6 shows the settings available for audio in Mac OS X––for stereo or mono encoding. If the user selects music in the basic panel, it automatically selects a high data rate and selects stereo.


Figure 1-6  The MPEG-4 settings dialog in Mac OS X, with the Audio pane selected

Figure 1-6 The MPEG-4 settings dialog in Mac OS X, with the Audio pane selected

Figure 1-7 shows the settings dialog for streaming, which enables the user to select the type of hinting required, as well as maximum packet size and maximum packet duration.


Figure 1-7  The MPEG-4 settings dialog in Mac OS X, with the Streaming pane selected

Figure 1-7 The MPEG-4 settings dialog in Mac OS X, with the Streaming pane selected

Figure 1-8 shows the Compatibility settings dialog in Mac OS X. By default, QuickTime produces a generic MPEG-4 stream. QuickTime does not check for any specific layer compatibility features that might be required by ISMA or other organizations. Nor does QuickTime check if the overall data rate of the MPEG-4 you’re producing is any particular data rate.

The user can select ISMA compliance, and also select the speed at which you want to stream the file––for example, at a medium data rate.


Figure 1-8  The MPEG-4 settings dialog in Mac OS X, with the Compatibility pane selected

Figure 1-8 The MPEG-4 settings dialog in Mac OS X, with the Compatibility pane selected



< Previous PageNext Page > Hide TOC


Last updated: 2002-07-01




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice