Important: The information in this document is obsolete and should not be used for new development.
This section discusses the various ways that you can use MPEG-4 in QuickTime, as well as how to create, compress, and play MP4 files on the Web. It also provides an example of how to embed an .mp4 file in a Web page so that it will be played only by QuickTime. The section concludes with a discussion of some of the issues involved in creating ISO-compliant MP4 files to ensure that they are interoperable with players other than QuickTime.
If you are a developer who creates websites, website authoring tools, or QuickTime movies intended for distribution over a network or the Internet, you will want to read this section.
Ways To Use MPEG-4 In QuickTime
Why Use MPEG-4 On The Web?
Creating QuickTime Movies With MPEG-4 Compression
Creating .mp4 Files
Playing .mp4 Files in QuickTime
ISO Compliance
There are three different ways you can use MPEG-4 in QuickTime.
You can create QuickTime movies (.mov) that use the MPEG-4 video and/or audio codecs. These are not .mp4 files, and MP4 players will not play them. They are QuickTime movies and they require QuickTime 6 or later to play.
You can create MPEG-4 files (.mp4) that are ISO-compliant. These are MP4 files. They are not QuickTime movies. All ISO-compliant players should be able to play these files with no difficulty. QuickTime Player is an ISO-compliant player and can play ISO-compliant MP4 files created on any platform.
You can create MPEG-4 files (.mp4) that are not ISO-compliant. These MP4 files may not play on other MP4 players, but they will play in QuickTime 6. (For more information about issues involving ISO compliance, see the section “ISO Compliance.”)
QuickTime 6 allows you to create both fast-start and streaming versions of your movies in both .mov and .mp4 format. Movies that use MPEG-4 codecs can be hinted for streaming, exported to .mp4 files, or both, without recompressing the audio or video.
MPEG-4 is an ISO standard supported by a wide range of companies in a variety of industries, as discussed in the section “Support for MPEG-4.” This means that an MPEG-4 file can be played by many different players in addition to QuickTime, not only on personal computers, but also on cell phones, PDAs, and television set-top boxes. This is a huge step forward from the current proprietary environment, which may lead you to deliver your movies using different compressors and multiple formats––such as Real, Windows Media, and QuickTime––just to serve your Mac and Windows customers.
QuickTime movies compressed using MPEG-4 audio and video codecs
can be exported to MPEG-4 file format without recompression, allowing
you to serve your movies in multiple formats (.mov and
.mp4) without sacrificing quality or time.
At typical Internet data rates, the MPEG-4 simple video codec is comparable to Sorenson3 video. This a good reason for using a codec in itself, but there are other advantages. The MPEG-4 video codec scales very well at extremely low bitrates, making it suitable for cell phones and PDAs with data rates even lower than dialup modems. In addition, MPEG-4 video compression can be very fast, making it suitable for live broadcasts and decreasing the time spent compressing movies.
Note: The current release of QuickTime 6 includes only the MPEG-4 simple video compressor. Higher quality and lower bitrates can be expected from the advanced video compressor.
MPEG-4 audio uses the Advanced Audio Codec (AAC), as discussed in the section “MPEG-4 Audio Support.” This codec provides better quality than mp3 audio at any given bitrate, or equivalent quality at a lower bitrate (typically about 30% lower). At higher bitrates, AAC supports multichannel surround-sound audio. Like MP3 before it, MP4 audio is a standard, so it is entirely possible that devices currently supporting MP3 (MP3 players, CD players, DVD players) will soon be available for MP4 as well. This is a premium quality audio codec for ISDN data rates and above.
For low bandwidth audio suitable to dialup modems or portable wireless connections, however, the QDesign2 music codec and Qualcomm Purevoice codecs remain better choices.
The MPEG-4 specification includes a low bandwidth audio codec based on CELP (codebook excited linear predictive) algorithms similar to the Purevoice codec.
Note: The current release of QuickTime 6 supports AAC audio at 44.1 and 48 kHz in mono or stereo. It does not currently support multichannel sound or other sampling rates for AAC audio, as discussed in the section “Defining AAC.”
You can use the MPEG-4 audio and video compressors as you would any other QuickTime codecs, as explained in the section “New Video Codec for MPEG-4.” The MPEG-4 video and audio codecs are available in the standard QuickTime compression dialog box.
From QuickTime Player, choose Export (File menu), Movie to QuickTime Movie (pop-up menu), and click the Options button. Click the Settings button for audio or video and choose MPEG-4 from the compressor list. There are a variety of settings for audio and video, such as frame rate, quality, and data rate limit. Click the Size button to change the pixel dimensions of the video track. Click Okay, then Save.
Other applications that use the standard file compression dialog automatically gain the ability to use MPEG-4 compression when you install QuickTime 6.
To create .mp4 files from QuickTime Player, choose Export (File menu), Movie to MPEG-4, (pop-up menu), and click the Options button. This opens a dialog box with tabs for General, Video, Audio, Streaming, and Compatability. Use this dialog box to select your MPEG-4 compression settings. These panels are described and illustrated in the section “New Dialogs for Handling MP4 Files.”
The General settings allow you to export audio, video, or both. You can make some choices about audio and video compressor settings here as well.
One of your compression choices is Pass Through. Use this setting to export a QuickTime movie with MPEG-4 compression to the .mp4 file format without recompressing the data. This is a very fast operation and does not degrade audio or video quality.
The Size menu gives you three choices in the current release of QuickTime 6––Current, 320 x 240, and 160 x 120. If you need a different frame size, you can resize the movie and choose Current.
Note: In QuickTime Player, you can resize a movie by opening the properties window (Movie menu, Get Movie Properties), choosing a video track from the left pop-up menu, and choosing Size from the right pop-up. Click the Adjust button and resize the track by dragging with the mouse (the properties pane shows the pixel dimensions as you drag). Click the Done button when you have the correct size. If there are multiple video tracks, resize the largest track and repeat as necessary until all the tracks are within the desired bounds.
The Video settings allow you to set a video bitrate limit, frame rate, and keyframe rate.
The Audio settings allow you to set an audio bitrate limit and number of channels.
Text at the bottom of each pane changes as you choose settings to help you undertand the options and monitor ISO compliance. The Compatability pane lets you override audio and video settings to ensure ISO compliance. For more information, see the section “ISO Compliance.”
The Streaming pane lets you create a fast-start or streaming .mp4. If you choose streaming, QuickTime will add a hint track. You can choose this option with the codecs set to Pass Through to turn a fast-start movie with MPEG-4 compression into a hinted .mp4 without recompressing.
Note: Optimizing hints for server is no longer recommended. It greatly expands the file size of the streaming movie, and optimizations in the streaming server make it unnecessary.
You can stream .mp4 files using the QuickTime Streaming Server (version 4 or later), the Darwin Streaming Server (version 4 or later), or any ISO-compliant streaming server. QuickTime 6 can also play MP4 streams from any ISO-compliant source.
Double-clicking .mp4 files from the desktop may launch QuickTime Player, or it may launch some other application that is registered for .mp4 files on your computer.
Files created on the Mac OS have a creator code as well as a file type, so the operating system will usually call QuickTime Player for an .mp4 file created locally on a Mac. This creator code is normally lost, however, if a file is stored on Windows or Unix file systems, something which commonly occurs when a file is transferred over the Internet.
To deliver .mp4 files
over the Internet, your Web server needs to be configured for the
.mp4 MIME type (video/mp4). Once this is done, a browser will play
.mp4 files using the plug-in or ActiveX control registered for video/mp4.
If you post your .mp4 file to the Web and attempt to view it using
QuickTime, an error stating that “This is not a file that QuickTime
understands,” or an attempt to display the file as text, generally
indicates that the Web server is not configured for the mp4 MIME
type.
Note: For audio-only .mp4 files, the optional MIME type audio/mp4 can be used. These files can also use the video/mp4 MIME type, however.
To embed an .mp4 file in a Web page so that it will be played
only by QuickTime, use both the OBJECT tag––specifying
the QuickTime ClassID and Codebase––and
the EMBED tag, with SRC set
to a QuickTime MIME type––such as .qtif or .pntg––and QTSRC
set to the .mp4 file, as shown in the following example.
<OBJECT |
CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" |
CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab" |
WIDTH="320" HEIGHT="256" > |
<PARAM NAME="src" VALUE="My.mp4" > |
<PARAM NAME="autoplay" VALUE="true" > |
<EMBED SRC="QTMimeType.pntg" TYPE="image/x-macpaint" |
PLUGINSPAGE="http://www.apple.com/quicktime/download" |
QTSRC="My.mp4" WIDTH="320" HEIGHT="256" |
AUTOPLAY="true" > |
</EMBED> |
</OBJECT> |
Note: This is the same
technique you would use to be sure that any non-QuickTime file (such
as an .mp3 or .aiff file)
is played by the QuickTime browser plug-in.
The OBJECT tag
works with Internet Explorer 4 and later on Windows. The ClassID specifies the
QuickTime ActiveX control, and the Codebase tells
Explorer where to find the ActiveX control if it is not installed.
The PARAM tag with name="src" has
the URL of your MP4 file as its value.
The EMBED tag works
with all other Windows browsers and all Mac browsers including Internet
Explorer. The SRC parameter
is set to a file whose MIME type is used exclusively by QuickTime,
such as .pntg (image/x-macpaint)
or .qtif (image/x-quicktime).
You can also use .mov (video/quicktime). This file must exist and
is downloaded by the browser, but it is not displayed. The browser
uses the QuickTime plug-in to handle any file of this MIME type.
The PLUGINSPAGE parameter
tells the browser where to find the QuickTime plug-in if it is not
installed. The QTSRC parameter
holds the url of your MP4 file, and this is what QuickTime plays.
The MPEG-4 specification is more than just a video codec or an audio codec. It defines a rich set of multimedia, including such things as text and facial animation, as discussed in the section “Support for MPEG-4.”
No software is currently able to display all the different media described in the MPEG-4 specification. Consequently, MPEG-4 defines profiles (discussed in the section “Profiles and Levels Defined,” which describe the subset of MPEG-4 features a particular player supports, and the feature set a particular movie requires.
A Profile 0 player, for example, can play simple MPEG-4 video at speeds up to 64 kbit/second, and AAC audio at 44.1 and 48 kHz in mono or stereo. A Profile 0 movie does not require any other features for correct playback. A Profile 0 player can play any Profile 0 movie.
A Profile 1 player has a larger required feature set that includes everything in Profile 0 as well as features such as multichannel sound and higher bitrate video.
If an MP4 movie uses even one feature of theProfile 1 set (that is not also part of the Profile 0 set), it is a Profile 1 movie, because it requires a Profile 1 player for reliable playback.
If an MP4 player is missing even one feature required for Profile 1, it is a Profile 0 player, even though it may be able to play many Profile 1 movies.
QuickTime 6 is a Profile 0 player. It can play any Profile 0 movie. QuickTime 6 also has some features of a Profile 1 player, such as the ability to handle higher bitrate video, but it does not have the full Profile 1 feature set and cannot play all Profile 1 movies.
QuickTime can create and play Profile 0 movies that use video at higher bitrates than 64 kbit/second. If you know your movie will be played by QuickTime, you may want to take advantage of the higher bitrates available, but be aware that this produces files which are not ISO-compliant. Other Profile 0 players may not be able to play these files, even though QuickTime can.
To ensure interoperability with other players, use only ISO-compliant MP4 files.
Last updated: 2002-07-01