In the fall of 2005, Apple took their first steps into the portable video market with the fifth-generation iPod with video capabilities. This original “video iPod” sported a 320×240 screen and supported playback of videos encoded only at that maximum resolution using very specific formats. At the same time, the iTunes Store began offering video content in these formats suitable for playing on the iPod.
The limited content available on the iTunes Store, and the limited availability of it outside of the U.S. meant that many iPod owners immediately turned to converting their own videos into a format suitable for viewing on their iPod, and a plethora of utilities became available to automate this process.
The following year came an upgrade to the fifth-generation iPod providing higher-resolution video playback. This was soon followed by the Apple TV to provide playback of video content on your home entertainment system, and then the iPhone, providing a more natural widescreen portable video experience.
Even today, however, the video formats supported by the iPod, Apple TV, and iPhone are relatively limited compared to the number of formats available on the market. This means that just about any content that you want to view on these devices is going to require some type of conversion process. The advent of these new devices has complicated the landscape even further, since more options are now available for both the viewing and encoding of videos, but with these changes come more considerations about how to encode video for the best possible viewing experience.
In later articles, we’ll look at some of the specific tools and options available for converting video to an iPod, iPhone or Apple TV ready format, and some of the pros and cons of each. Before going into that, however, it’s important to start with a discussion of the video formats that are actually supported by each device so that those looking to convert their own video content can make informed decisions about the options available and the best resolution and format to use before starting the lengthy encoding process.
Apple’s Choice of Video Formats
The iPod, Apple TV and iPhone will play back videos encoded using either the MPEG-4 or H.264 codecs. These are open-standard video formats, and not in any way proprietary to Apple, but at the same time do not represent a broad portion of the video content that is currently available outside of the iTunes Store. Further, this does not represent the video standard that is used by most video recording devices, TV recording devices, or commercial DVDs. The result is that finding video content from anywhere other than the iTunes Store that is already encoded in an Apple-ready format is going to be difficult, and much of this content will therefore need to be converted.
For example, most commercial video cameras use either uncompressed Digital Video (or “DV”) or MPEG-2. Commercial DVDs also use MPEG-2 as their format. Videos downloaded from the Internet can be in any number of formats, including DivX, Windows Media Video (WMV) or QuickTime, among others.
Apple’s likely reason for these particular choices of codec is that they are an open, established standard, and they both provide a very high level of video and audio quality for a given file size. MPEG-4 has historically been very good in this regard to begin with, and the H.264 codec has only improved on the quality and file size efficiency.
As one would expect, when developing a portable video playback device, the quality-to-size ratio is very important both in terms of maximizing the amount of content that can fit on the more limited storage of a portable device, as well as maximizing the battery life of the device, as larger content can require additional processing power, thus shortening battery life. The H.264 codec appears to have been a natural fit to address both requirements, as well as providing a stable, open standard for Apple to use for their preferred video format.
Content on the iTunes Store uses the H.264 codec exclusively. Content you encode yourself can be encoded into either H.264 or MPEG-4, although H.264 will generally provide better quality for a given file-size, it also takes longer to encode.
Resolution and Bit-rate
Two other important considerations with video playback and the quality of the resulting file are the resolution and the bit-rate. The resolution simply refers to the dimension of the screen image, in terms of the number of pixels wide by the number of pixels high (ie, “640×480”) while the bit-rate refers to the amount of data that is actually encoded to make up a single second of video playback, normally expressed in either kilobits per second or megabits per second. This is the same concept as bit-rates for audio formats such as AAC and MP3.
Naturally, the higher that both of these numbers are, the better the quality of the resulting image will be. These factors both work together, however, since the resolution simply specifies the number of pixels available in a specific frame, and the bit-rate specifies how much actual information is being used to generate those pixels.
Without getting into too much technical detail, modern lossy video compression formats actually work not by encoding every single pixel of every single frame of a video, but rather simply encoding the information that changes between frames. “Reference frames” are taken at certain points, and the remaining frames are built based on what changes between each frame.
To conceptualize this, imagine watching a pro golfer make a putt: Most of the scenery, the trees, the sky, and the golf course itself remains relatively unchanged throughout the putt, with only some motion from the golfer and of course the little white ball rolling across the green.
Encoding every single frame of this would take up a lot of storage space (the equivalent of several hundred high-resolution JPEG files), when in reality very little is changing between frames. As a result, only the information that is different in each frame actually needs to be stored, and this can later be applied to the original reference frame to build a smooth video playback motion.
The bottom line is that this makes for significantly more efficient file sizes and storage of video content, and in fact is the same technology that DVDs use with the MPEG-2 format. Without MPEG-2 compression, a 90-minute DVD movie would actually occupy well over 167 GB of space, rather than fitting comfortably onto a 4.7 GB DVD.
How it directly affects the concept of bit-rates, therefore, has not to do with how much data is actually being encoded for each frame, but how much data is available to record the differences in frames. A high-resolution video with a low bit-rate will produce a more blurry image as well as visible signs of “artifacting” (distortion, blocking effects and jagged edges) on high-motion action sequences.
So what resolution and bit-rate should you use to encode your video content? Logic would suggest that one should always use the highest settings possible, but much of this has to do with what your source content is, and the limitations of the equipment you’ll be using to watch it.
For example, if you only ever intend to watch video content on the iPod’s 320×240 screen, it would obviously be a waste of disk space and encoding time to convert these videos to any resolution higher than this.
Further, if your original source video is already at a smaller resolution, there is absolutely no point in encoding it in any higher resolution or bit-rate, as you’re not going to magically gain any resolution that wasn’t there in the first place. In our experience, consumer-grade conversion tools that promise “upconversion” of video formats are generally not worth the effort.
Likewise, even though the Apple TV supports a high-definition quality of video output (1280 x 720), if you are converting standard-definition DVDs, there is no sense in encoding them in anything beyond their original resolution.
So what are the different resolutions and formats supported by Apple’s video playback devices? The table below provides an outline of the maximum resolutions supported, as well as the output quality of the device itself:
Naturally if you want to encode content for playback on the iPod and iPhone, you will have to stick to the lower-resolution settings of these devices—640 x 480 at 1.5 mbps. Content encoded in the higher Apple TV resolutions will not play on anything but the Apple TV.
Note that the resolutions above for the iPod and iPhone are the officially supported ones, and have been simplified in Apple’s specs to represent the more standard resolutions. More advanced users have noted that it is possible to push these resolutions and bit-rates slightly, although iTunes itself will not necessarily support the transfer of these files to the iPod or iPhone. For maximum compatibility it is therefore always best to stay within the published specifications.
The “frame rate” of a video clip refers to the number of frames, or still images, for each second of video, normally expressed in “frames-per-second” or fps for short. Normal North American TV (NTSC) is broadcast in approximately 30 fps, while theatrical movies are normally 24 fps due to being shot on film. This means that if you’re encoding a DVD movie, chances are you’ll be looking to use 24 fps, whereas most other video content you record, including your own camera content and broadcast television content will be 30 fps. With the exception of the higher Apple TV resolution noted above, all resolutions support a maximum frame rate of 30 fps.
Bit-rate and File Size
Another important consideration when encoding videos is the size of the resulting file. This will correspond directly to the bit-rate of the file rather than the resolution (although higher resolutions require higher bit-rates), and while the H.264 and MPEG-4 codecs do a very efficient job of producing high-quality video at lower bit-rates, you’re still going to ultimately be constrained by how much space you have available on your particular device and how much content you want to be able to store.
If you’re inclined to do a bit of math, you can get an easy approximation of the file-size of a converted video simply by multiplying the bit-rate by the duration of the video, using a formula like the following:
size = (bit-rate / 8) * (length in minutes * 60)
The resulting size will be in either kilobytes if a kbps bitrate was used, or megabytes if a mbps bit-rate was used. So, for example, to calculate the size of a 90-minute movie being encoded at 1500 kbps, you would plug the numbers in as follows:
1500 / 8 * 90 * 60
187.5 * 5400
= 1,012,500 (KB)
or approximately 1 GB.
A simple rule-of-thumb, however, is that for standard iPod-encoded content (1.5mbps) you’ll be looking at approximately 500MB per hour of video content. Apple TV content at 3 mbps will naturally be twice that size (1GB per hour).
If storage space is of primary concern, encoding at lower bit-rates will naturally save some space, but this will come at the cost of video quality. Any bit-rate less than 1 mbps for 640×480 content will generally be too low to produce reasonably viewable TV output, for example.
Keep in mind as well when determining the best bit-rate to use to always keep the source content in mind. Older TV Shows on DVD, for example, will seldom benefit from using an extremely high bit-rate, since the original video quality was relatively low to begin with. On the other hand, recent blockbuster movies with lots of action and motion should definitely be encoding with as high a bit-rate as reasonably possible for the target device.
This is particularly relevant when considering whether to encode in a bit-rate suitable for the iPod or the Apple TV. Older TV content and analog TV recordings will rarely benefit from the higher-quality settings available for the Apple TV.
Another very important consideration when trying to decide on the optimal format in which to encode your content is the aspect ratio of the original source content.
Aspect ratio simply refers to the ratio of the width of the image to the height of the image as shown on screen.
There are three common aspect ratios in use for commercial video content today:
- 4:3 used for almost all standard-definition TV broadcast content. This is sometimes also referred to as 1.33:1:
- 16:9 used for almost all high-definition TV content (HDTV) and many theatrical DVD releases. This is sometimes also referred to as 1.78:1:
- 2.35:1 used for “Cinemascope” or “Panavision” movies on DVD:
For commercial DVDs, you will generally find the aspect ratio indicated on the back. For other types of video content, you can determine the aspect ratio yourself simply by dividing the width of a video by its height. For example a 640×480 video clip would have a 1.33:1 aspect ratio (640/480 = 1.33).
Since the aspect ratio of the content will not always match the aspect ratio of the actual output device, you will often get either “letterboxing” or cropping, depending on the device and its settings. Letterboxing is more common, which is the practice of adding black bars to the top and bottom of a widescreen video when playing it back on a standard TV.
A widescreen TV show, 16:9 aspect ratio, as shown on a 4:3 screen
A Cinemascope Movie, 2.35:1 aspect ratio, as shown on a 4:3 screen
Conversely, if you were to watch a standard 4:3 TV show on a widescreen TV, you will end up with something referred to as pillarboxing which places black bars at the sides of the image:
A standard 4:3 TV show as shown on a 16:9 widescreen TV
On the other hand, some TVs and other devices (such as the iPod itself) also provide the option for cropping content to fit the aspect ratio of the screen. As the name implies, cropping the content chops off the portion of the image that does not fit, expanding the image to the full size of the screen.
This will result in the loss of detail on the left and right sides when trying to display widescreen content on a 4:3 screen:
A widescreen TV show cropped for 4:3 display
A Cinemascope Movie, 2.35:1 aspect ratio, cropped for 4:3 display
Or, the top and bottom of the image in the case of trying to display 4:3 content to fill a 16:9 screen:
A standard 4:3 TV show cropped for 16:9 display
Some newer video conversion tools now provide support for anamorphic encoding. This basically refers to encoding video content in one aspect ratio but setting it to display using another, through the use of non-square pixels.
A pixel is not necessarily always rendered as a perfectly square element of a picture, and many modern video playback applications and hardware support a pixel aspect ratio (PAR) setting. In fact, the aspect ratio of content as stored on a normal North American DVD is actually 1.5:1 (720 x 480), rather than either 16:9 or 4:3. A DVD player, however, produces an image in the appropriate aspect ratio by reading a flag within the content that tells the player what shape of pixels to use when playing back the video content. The result is that a 720×480 DVD image is actually rendered in 640 x 480 (4:3) or 854 x 480 (16:9).
Without getting into too much technical detail, the short explanation is that the use of anamorphic encoding can provide a proper widescreen presentation of a movie without having to force it to actually be encoded at the higher resolution. Since nothing is truly gained by increasing the encoded resolution of a video, it makes more sense to save the storage space and simply render the frame in its proper aspect ratio, in the same way that a DVD player does.
An anamorphically encoded video, when examined in Quicktime’s Show Movie Inspector dialog, will actually show two different resolutions:
The first number, 720 x 480, is the actual stored resolution of the video image. The second represents the aspect ratio that it will play back in. The 720 horizontal pixels will simply be stretched to fill the width of the screen, resulting in a proper 16:9 presentation.
Note that if you are viewing an anamorphically-encoded video on a device that doesn’t understand pixel aspect ratio (PAR), then the resulting video will appear distorted, as it will simply play back in its actual stored resolution.
At this point, the fifth-generation iPod and Apple TV support pixel aspect ratio and will therefore display an anamorphic video properly. The iPhone does not presently handle pixel aspect ratio, and anamorphic videos will therefore look distorted when viewed on the iPhone.
One other problem that you may encounter is that many DVDs, particularly older ones, were actually in what was known as a “hard letterbox” format, rather than a proper anamorphic widescreen format. In this case, even though the original video format may have been widescreen, the DVD video is not actually encoded in a widescreen aspect ratio. Rather, “letterboxed” movies were basically encoded onto the DVD in a 4:3 aspect ratio with the black bars at the top and bottom actually added to the movie. This would allow these movies to play in a widescreen format even on older DVD players that did not have a widescreen mode.
Unfortunately, however, when these DVDs are converted, most video converters will leave them in their original 4:3 aspect ratio, with the black bars as part of the frame. In this case, the resulting video will be treated as a 4:3 video, with the black bars continuously shown at the top and bottom of the frame. Cropping will not be available on the iPod, and the Apple TV and iPhone will show these videos by default in a black frame:
In this case, the black bars at the top and bottom are not being generated by the output device, but are in reality part of the video image.
When dealing with DVDs, the description on the packaging can often be helpful in determining what the source format is. Although the terminology differs among the different studios, many older DVDs that used the term “Letterboxed” referred to this type of encoding: a 4:3 image with the black bars added to the frame. On the other hand, the term “anamorphic widescreen” almost always refers to videos that are properly encoded in 1.85:1 or 2.35:1 aspect ratio. Note that this will be a much less common issue with DVDs that have been more recently published.
You can also check whether or not your video content is in a proper widescreen format by viewing it in a window on your computer through iTunes or QuickTime.