Manifest Technology
        Making Sense of Digital Media Technology
        By Douglas Dixon
  BLOG
  ARTICLES
 - PC Video
 - Web Media
 - DVD & CD
 - Portable Media
 - Digital
     Imaging
 - Wireless
     Media
 - Home Media
 - Technology
     & Society
  GALLERIES
 - Video - DVD
 - Portable
  TECHNICAL
     RESOURCES
  ABOUT
 - What's New
<<< HOME 

 

  PC VIDEO ARTICLES

  Manifest Technology Blog -- Site: | Articles | Galleries | Resources | DVI Tech | About | Site Map |
    Articles: | PC Video | Web Media | DVD & CD | Portable Media | Digital Imaging | Wireless Media | Home Media | Tech & Society |
    PC Video: | PC Video Articles | Video Software Gallery | Video Editing Resources |

Video Format Conversion:
  AVI and QuickTime and MPEG (8/1999)

    by Douglas Dixon

AVI and QuickTime and MPEG -- Oh my! There are just too many different file formats, and it's getting too confusing to deal with them. I make AVI video files on my PC, but you want QuickTime files on your Mac. And what's this about MPEG? It's a "standard" file format that older PC's don't even know how to handle? What's going on here anyway?

As usual in the PC world, different systems were designed to do very similar things in contradictory ways, and now we're trying to deal with the mess. Digital video is complicated enough on a PC, with a wide range of formats with different pixel depths, color representations, and compression algorithms. But even the file formats used to store the video data on disk are different too.

winqtavi.jpg (14923 bytes)
  Windows QuickTime 3 Movie Player
  Playing Quicktime Movie
winactivemoviempeg.jpg (15373 bytes)
  Windows ActiveMovie player
  Playing MPEG file

File Formats: The Package

Basically, AVI and QuickTime are file formats, a collection of file headers and control information wrapped around some video (and audio) data to define the contents of a video file. In order to play a video file, you first need to know what it contains. The file can have one stream of video, or an audio stream (mono or stereo), or both, or even more than one of each. Each stream can then be stored in different ways: with different video resolutions and compression formats, and different audio formats and quality.

The AVI and QuickTime file formats define the contents of a video file -- the number of streams, their type, and format. Along with the stream descriptions, the file formats also contain timing information for synchronizing the streams, particularly so the video and audio can be played in sync. The file formats also provide different mechanisms for interleaving the video and audio data within the file so that they can be processed efficiently and played, in sync, in real time.

Playing AVI and QuickTime files requires system software on the Windows and Mac platforms that can read and play video files in their supported formats. In order for your system to play a file, it's not enough for the file format to describe how to separate out the data for each video and audio stream; it also needs to provide information about the format of the data in the stream. Video data can be stored at different resolutions, with different amounts of color information, and with different compression algorithms. The compression algorithms squish down and mix up the video so that it can be incomprehensible without the corresponding decompression algorithm. AVI and QuickTime provide extensible architectures for adding new compression algorithms to your system. These are called "codecs," for compressor-decompressor.

AVI and QuickTime and MPEG

Apple originally developed the QuickTime Movie (.MOV) video file format for the Macintosh, but then extended it into a cross-platform video data format that also can be used on the PC. As a result, QuickTime has been widely adopted as a portable format for cross-platform applications; an application can be shipped on one CD-ROM and contain a single set of video files which will play on both Mac and PC. The QuickTime format is also commonly used for posting video files on the Web for downloading. The QuickTime file format also has been selected as the basis for MPEG-4, the next-generation audio/video standard.

The current release, QuickTime 3, was released in March 1998. It supports over 30 different audio and video file formats, and offers real-time streaming of digital content over the Internet. The QuickTime format also supports integrating other dynamic components with audio and video, including 3D animation, real-time special effects, and virtual reality. Apple is distributing the base version of QuickTime 3 for free, with the option of updating to a Pro version that enables multimedia authoring for $30.

In April 1999, Apple announced the public beta release of their next generation, QuickTime 4. It includes support for streaming of live and recorded video and audio with a wide variety of compression algorithms, for playback even over 28.8 Kbps modems. It also supports playback of the MP3 compressed audio (MPEG-2, level 3) format that is becoming popular for audio distribution over the Web.

Audio Video Interleave (.AVI) format is Microsoft's counter to Apple's QuickTime. AVI is the file format used by Microsoft's first video system, Video for Windows (VfW), and now used by its successor architectures, ActiveMovie and DirectShow. The big advantage to AVI on the PC is that it is built in to Windows. To use QuickTime on the PC, you need to first install it, which requires an additional step when you install a new application that uses QuickTime, or a rather large download from the Internet. QuickTime 4 makes this easier by allowing you to download it in smaller components.

Theoretically, AVI should mean an end to file format worries for PC users: If you create AVI files using the built-in compression formats, you can be sure that any other Windows user can play the file. However, this only works if you stick to the built-in compression formats. Once you start using newer, better compression algorithms to get higher quality or smaller file sizes, the file will not play on other machines unless you provide the corresponding codec to be installed along with the file.

Meanwhile, the MPEG (Motion Picture Experts Group) standard is becoming more popular, especially for high-end video applications. Support for the first version of MPEG, the MPEG-1 format, is now built in to Windows and QuickTime. MPEG video is typically stored in its own common MPEG file format (.MPG). The second version of MPEG, the MPEG-2 format, provides better quality and smaller file sizes, and is starting to be supported in some video tools. As a result, in order to play a "MPEG" file, you may need to check further to see if it contains MPEG-1 or MPEG-2 format video.

Playing Video Files on the Macintosh and Windows

Since QuickTime is the native video file format on the Macintosh, you can play a QuickTime file by just opening it, or double-clicking on it. This will bring up the built-in Movie Player application to play through the file. In addition, QuickTime 3 provides built-in support for the AVI format, so it also can play Windows AVI files. However, since AVI is just a file format, the file may not be playable if the video was compressed with a codec that is not available on your system. QuickTime can also play MPEG-1 (.MPG) files. Note that if you transfer video files from Windows to the Mac, the Finder does not know what kind of file they are, so you will need to open then from within the Movie Player.

macqtmov.jpg (13026 bytes) Macintosh QuickTime Movie Player

Playing Movie file

Similarly, since AVI is the native video file format under Windows, you can play an AVI file under Windows by just opening it, or double-clicking it under Windows Explorer. This will bring up the default Windows ActiveMovie file player to play the file. You can right-click on the window to change its Properties and show the VCR-like play controls. (You can also access the file player from the Windows Start menu: Start / Programs / Accessories / Multimedia / ActiveMovie Control).

winactivemovie.jpg (14768 bytes)

Windows ActiveMovie file player
Playing AVI file

winactivemoviempeg.jpg (15373 bytes)

Windows ActiveMovie player
Playing MPEG file

To experiment with playing both Windows video and audio files, you can also use the Media Player application. (You can also access this from the Start menu: Start / Programs / Accessories / Multimedia / Media Player). The Open menu lists a variety of video and audio file formats that you can play. The Edit and Scale menus provide a variety of options for controlling the playback sequence and window display.

winmediaplayer.jpg (20454 bytes) Windows Media Player

Playing AVI file

Windows 95 (and 98) now includes built-in support for the MPEG format. As a result, both the ActiveMovie Control and Media Player also can play MPEG files (.MPG).

Once you have installed QuickTime for Windows, you can play a QuickTime Movie (.MOV) file the same way: just open it, or double-click it under Windows Explorer. This will bring up the QuickTime Movie Player application to play the file. The QuickTime Movie Player can also play MPEG files, and QuickTime VR files, which contain a 360-degree view of a scene or around an object. QuickTime for Windows also includes a Web plug-in for the Netscape and Microsoft browsers to play streaming video over the Web. Note that if you transfer movie files from a Macintosh to the PC, you need to make sure the file name has the right suffix (i.e., .MOV), so that Windows knows what to do with it.

Windows QuickTime 3 Movie Player

winqtavi.jpg (14923 bytes)
Playing Quicktime Movie

winqtmov.jpg (14411 bytes)
Playing Windows AVI file

winqtdv.jpg (12976 bytes)
Playing DV sequence

Simple File Conversion

OK, so now you can play these three kinds of files on the Macintosh and under Windows, but how do you convert them between different formats? What if you want to view the file on another system in its native format, or share it with a friend who may not have the latest system software installed?

Since the AVI and QuickTime file formats are basically control information wrapped around the audio and video data, it would seem logical that you could convert files by simply stripping off one kind of control information, and then pasting back on the same information in a different format. In fact, this strategy does work, but with some strong limitations.

Intel has released a free utility called "SmartVid" for Windows to convert between AVI and QuickTime format by changing around the file header information. SmartVid converts video files regardless of the codec used to compress them; it simply copies the data streams without attempting to decompress the video. A similar program, "TRMOOV", has been made available by the San Francisco Canyon Company and can be downloaded from various sites on the Web. You can also perform batch conversions of groups of files using these tools from a DOS command-line interface.

    Converting Movie files to AVI

smartvid.gif (5769 bytes)

Intel SmartVid user interface

trmoov.jpg (14470 bytes)
Canyon TrMoov user interface

Since these tools do not change the video or audio data, the converted file cannot be played if the new system does not contain the necessary codecs for the video and audio compression formats. To be sure a file will play with no problems on any system, use uncompressed or common formats.

For video data, use the Radius Cinepak codec, since it is built into both Windows and QuickTime. Another common choice is the Intel Indeo Video format, since Intel has widely distributed versions of Indeo with Windows, and for QuickTime on both the Macintosh and Windows. For audio data, use uncompressed PCM audio, with 8- or 16-bit audio sample sizes, and standard audio sampling rates (multiples of 11.025 KHz). You can also get into problems with different interleave formats, color palettes, or with files with non-standard synchronization timing.

If your files are compressed in different formats, or need to be trimmed or changed, then you need to use a video editing tool to convert the file format and also process the video and audio data formats. In addition, AVI files should have the audio and video data interleaved every frame, while QuickTime files should be interleaved in half-second blocks, so the files will play better if the audio data is re-interleaved when changing formats.

Simple Video Editing

If you do need to edit your file or change the video or audio file formats, you can use a simple video editing tool. There are a number of shareware video editing programs available for the Macintosh and Windows for opening QuickTime or AVI files, selecting clips, and then saving them as new files with different video and audio compression formats. The simple tools are basically user interfaces that provide access to the video and audio compression and decompression codecs that are installed on your system. If you install new codecs, you then will be able to open, edit, and create files in the associated compressed format.

For Macintosh users, the Movie Player application can convert AVI files into QuickTime format. Another option for both the Macintosh and Windows is to upgrade to Apple's QuickTime "Pro" version, which provides the ability to edit files with cut and paste operations, and to save them in a variety of formats. The new QuickTime 4 Pro also supports editing and saving files in AVI and DV formats.

winqtproavi_export.jpg (13513 bytes) Apple QuickTime 3 Pro for Windows:

Read Movie and AVI files
Export Movie and DV sequences

QuickTime for Macintosh files must be "flattened" before they can be played on Windows. Flattening a movie removes its separate Mac resource data and puts all video and audio information into a single data block, making the file self-contained.

However, as with any video editing task, do not convert your files after they have been compressed. You should save your video in uncompressed format while you edit it, and then compress it to the final output format (or multiple formats) as the last step. If you edit a file that is already compressed, and then re-compress it to the same or different format, then you will lose more information in the second-generation copy. The first compression introduces artifacts in the original video, and the second compression then tries to compress the result, including the artifacts, and reduces the quality further.

Conversion with Consumer Video Editors

For more sophisticated conversion tasks, you can use your video editing application to output the final video file in a variety of formats. Even the new low-cost tools now support reading and writing both AVI and QuickTime formats, and some support MPEG, consumer digital video (DV), and Web streaming video formats. These tools also support reading still image files to insert into your videos, and saving frames as still images.

Consumers now have several options for video editing tools at street prices under $100. These differ in their support of various editing tasks, and in the variety of video file formats that they can read and write. The advantage of buying these tools is that they have built-in support for the various formats, and come bundled with the necessary codecs needed to support the formats on your system.

Avid Cinema (around $85 street price) is available for both Macintosh and Windows. It was released in 1998 for the Power Macintosh and in November 1998 for Windows. It reads and writes AVI and QuickTime, and also outputs in RealMedia streaming video format. Avid also supports an export plug-in architecture, including a MPEG plug-in from Ligos that will output both MPEG-1 and MPEG-2 formats. Cinema uses the traditional timeline interface for video editing, and has a limited number of effects.

Avid Cinema user interface
avid_cinema_screen.gif (18293 bytes)

Ulead Video Studio, version 3.0 (around $90 street price) was released in October 1998 for Windows. It supports reading and writing AVI, QuickTime, and MPEG-1 formats. For streaming video on the Web, it also supports Microsoft NetShow ASF and RealNetworks Real Media RM. The Video Studio interface uses a step-based approach for video editing, with both storyboard and timeline representations. It also boasts a Smart Render feature to reduce the time to render the final edited output by rendering only the changed portions.

Ulead Video Studio 3.0: Rendering QuickTime sequence in Finish step
videostudio_rendering.jpg (46562 bytes)

MGI VideoWave II (around $65 street price) was released in February 1999 for Windows. It supports reading and writing AVI, QuickTime, and MPEG-1 formats. It now also offers support for capturing video from both traditional analog and consumer DV (digital video) hardware devices. VideoWave also has a built-in Motion-JPEG codec for reading files saved in M-JPEG format, typically from higher-end video capture cards. It uses a simple storyboard interface for assembling video clips, and provides video special effects, transitions, titles, and audio tracks.

MGI VideoWave II: Trimming MPEG sequence in Cutting Room
videowave_cutting.jpg (54041 bytes)

Even though these tools advertise that they support QuickTime and AVI, the actual compression formats that they support for each format differs. They actually have some formats built-in, and install different collections of codecs, and also use the codecs that you already have installed on your system. As a result, the files that they create still may not run on other systems; you always have to make sure you are using portable video and audio compression formats.

Conversion with Professional Video Editors

Higher-end video editing tools like Adobe Premiere, version 5.1 ($600 street price) support a wide variety of additional animation, image sequence, and audio file formats, as well as more sophisticated video editing operations on a collection of clips. Both the Windows and Macintosh versions of Premiere support most of these file formats. But for basic video files, Premiere reads AVI and QuickTime format on both platforms, writes QuickTime on both, and writes AVI only in the Windows version.

Another powerful alternative for converting video file formats is Terran Interactive's Media Cleaner tool. The current version, Media Cleaner Pro version 3.1 ($399 street), has become very popular on the Macintosh as a stand-alone tool for better-quality compression. It provides more control and more options than video editing tools, including advanced features such as variable bitrate encoding. A new release, version 4, was released in beta in April 1999, and is available on both the Mac and Windows platforms. Media Cleaner Pro version 4 outputs to AVI and QuickTime, MPEG-1, DV, RealG2 streaming video, and still image and audio formats. It supports optional upgrades to MPEG-2, and can losslessly convert between formats when possible (like Intel's SmartVid). Media Cleaner Pro 4 also includes an audio MP3 (MPEG-2 level 3) encoder.

The Bottom Line

Video file formats can be confusing, but converting video files and sharing them between platforms can be done, if you take care and keep things simple. Know your file format; Pick QuickTime or AVI or MPEG, depending on your needs, and the kinds of systems where you want to be able to play the file. Know your codecs; Use the basic built-in compression formats for your video and audio data, or at least a commonly-available format. Pick the simplest tool you need for the job; Maybe you only need a simple file converter, or a basic shareware editor, or maybe you need a commercial video editor with built-in support for a variety of formats. Finally, remember not to recompress your data; Keep your video and audio uncompressed while you edit it, and compress it only as the last step. And have fun out there!

References