[INTEL NAVIGATION HEADER]

Cross-platform Development Using Indeo® Video Interactive

Introduction
Indeo® video is Intel's digital video software technology for compressing and playing video on desktop computers. It is a key ingredient for creating video for your application that can be used across platforms.

Read this document if you are a multimedia software developer who wishes to incorporate the same video files in an application running under either QuickTime* or Video for Windows*.

This paper is divided into the following major sections:

Desktop Video Environments
Introduces the three primary software architectures for video playback on Windows PCs and Macintosh*.

Creating Cross-Platform Indeo Video Files
Discusses the issues involved with capture, compression, and conversion within and between these software architectures.

Creating Hybrid CD-ROM Discs
Discusses issues regarding the creation of a single disc that can be used on both Macintosh and Windows platforms.

Cross-Platform Development Scenarios
Lists step-by-step instructions for capturing, compressing, and converting Indeo video in each of four basic authoring environments.

Conversion Utilities
Discusses several conversion utilities in detail. It also discusses how to use these conversion utilities to convert video files compressed with other versions of Indeo video.


Desktop Video Environments
You can develop Indeo video on either the Windows PC or the Macintosh, using any of the three multimedia software environments:

  • Microsoft's Video for Windows, Microsoft's standard for desktop digital video software
  • Apple Computer's QuickTime
  • Apple Computer's QuickTime for Windows

QuickTime for Windows and QuickTime for the Macintosh use the same file format. A QuickTime for Windows video can play on the Macintosh after adding resources, although a QuickTime for the Macintosh video cannot play on a Windows-based PC. However, if you use a QuickTime for Windows-formatted video, it is possible to play the same Indeo video file on both platforms from a single hybrid CD­ROM.

Microsoft freely licenses the Video for Windows version 1.1 runtime software by means of major on-line information services such as CompuServe*. Apple makes QuickTime for Windows runtime files available from a number of sources of the same major on-line services. Developers who ship products incorporating QuickTime for Windows must pay a license fee to Apple.


Creating Cross-Platform Indeo Video Files
Regardless of the platform and application software, five basic steps allow you to create Indeo video files that can be played across platforms.

  1. Capture (digitize) the video and audio data in as lossless a way as possible.
  2. Edit the captured files as required.
  3. Compress the edited files using the Indeo video Release 3.2.
  4. Convert the compressed Indeo video file into the format appropriate for its intended playback platform.
  5. Master a hybrid CD-ROM containing Indeo video files playable on multiple platforms.

Creating cross-platform Indeo video compressed files entails more than simply ensuring that a Macintosh file is readable on the PC. For example, you can assert palettes in several ways from a single Indeo video file under QuickTime, QuickTime for Windows, or Video for Windows. In addition, audio sampling rates and audio interleaving are slightly different on the PC and Macintosh and can degrade playback performance when not addressed properly.

This section explores these and other issues in detail and provides the knowledge and tools necessary for the full benefits of Indeo video technology.

Capturing Video and Audio Data
You can capture video in various ways; Compression Techniques for Creating Great-looking Indeo Video addresses this topic in depth. The following points address platform-specific issues:

  • Video for Windows interleaves video and audio on a frame basis, whereas QuickTime interleaves on a time basis. In .AVI files, interleave audio with video at each frame (the default for Video for Windows). For MooV format files, the proper ratio is a half second of sound for every half second of video data (regardless of the frames per second).
  • Data rate targets for different CD­ROM drives vary between QuickTime and Video for Windows. Different video content can cause data rates to vary as well. Experiment with several data rate settings to determine what works best for your specific content.
Converting Files for Cross-Platform Playability
To make an Indeo video movie file captured in one format playable in another format, you must convert the file. For example, an .AVI movie cannot play under QuickTime or QuickTime for Windows until it has been converted to the QuickTime MooV file format. Similarly, a QuickTime movie cannot play under Video for Windows until it has been converted to the .AVI format.

The Macintosh and PC platforms have file system differences not specific to multimedia files. The following sections detail differences in the structure of these two file systems and how these differences affect cross-platform Indeo video development.

File System Differences
On the Macintosh, the information in a file can be stored in two distinct streams of bytes, called the data fork and the resource fork. It is possible for either fork to be empty. The Macintosh file system automatically tracks the forks associated with a file.

On the PC, information in a file is stored as one continuous stream of bytes.

On the PC, many file name extensions are reserved by convention to identify the type of information contained within the file. Thus, the .AVI extension is reserved for Video for Windows movies, and the .MOV extension for QuickTime is reserved for Windows movies. A movie player application may reject a file whose extension does not indicate the type of data it expects.

On the Macintosh, the file system maintains two 4-character signatures in each file: the file type and the file creator.

  • The file creator identifies the application that created the file. The file creator is used by the operating system to determine two things: the icon to display for the file, and the application to execute when the icon is double-clicked. The QuickTime MoviePlayer's* file creator signature is TVOD.
  • The file type indicates the type of information stored in the file: as with the PC file name extension, applications use it to accept or reject files for processing. The file type for a QuickTime movie is MooV.

After a file is moved from the PC to the Macintosh, its file type and file creator must be set appropriately. Many utilities exist to perform this operation. You can use a utility called MakeItMooV* specifically to set the file signature for QuickTime MooV files. This shareware utility is distributed with all Indeo video QuickTime codec releases.

If you are developing a portable application, establish and use a consistent file-naming convention to indicate whether a given file has already undergone conversion.

Give uppercase 8.3 file names to movies destined for inclusion on a cross-platform CD-ROM. Similarly, limit folder names on the Macintosh to eight characters.

Finally, avoid duplicating files. Placing your movie files in two locations, one for the PC and another for the Macintosh, reduces the space on a CD­ROM by half. To avoid this, use file aliases to refer to movie files on the Macintosh side of a cross-platform CD­ROM. Figures 1 and 2 show graphic representations of a hybrid CD­ROM disc. Figure 1 shows the Macintosh structure, and Figure 2 shows the PC structure.

In the Macintosh representation, movie files appear to be in the Macintosh folder. The files reside in the Windows folder; the Macintosh folder contains only aliases. However, when the user double-clicks on a file alias, the operating system points to the real file.

Figure 1. Macintosh Folder View of Hybrid CD­ROM Structure

Meanwhile, the PC representation shows no files in the Macintosh directory.

Figure 2. DOS Directory View of Hybrid CD­ROM Structure

Differences in Audio Standards
Three issues affect the audio data:

  • Sample size: the number of bits used to represent an audio sample.
  • Sample rate: the frequency with which the audio data is sampled.
  • Interleaving: how often audio data is mixed with video data.

Sample size. Two standard sample sizes exist: 8-bit samples and 16-bit samples. Unsurprisingly, the larger samples have a better signal-to-noise ratio and therefore give better results. (They also occupy twice as much storage.) You can use 8-bit audio samples for loud music such as rock without noticeable quality degradation, but for quiet music or spoken material, use 16-bit samples.

Sample rates. Some PC sound cards do not predictably process non-Windows audio sample rates. If the audio sampling rate is different from the platform standard, the audio data is adjusted as it plays back, using processing resources needed for decoding and playing the video. Consequently, playback quality is degraded. However, recent model Macintosh computers and PowerPCs* use the same audio sampling rates as Windows-based PCs, so converting audio sampling rates is no longer necessary.

Interleaving. Video for Windows interleaves on a frame basis, while QuickTime interleaves on a time basis. Under Video for Windows, interleave audio with video data at a ratio of one-to-one (one frame of video for each sample of audio). For QuickTime files, interleave audio with video data at a ratio of one half second of sound for one half second of video, regardless of the frame rate. This is the QuickTime default.

The following steps reinterleave video files using either MoviePlayer 2.0 (included in the QuickTime 2.0 Developer's CD) or Movie Converter* 1.0 (included with the QuickTime Starter Kit).

  1. Open the video file you wish to reinterleave using either tool.
  2. Select File> Save As....
  3. Enter a new name in the dialog.
  4. Check Make Movie Self-contained.
  5. Select Save.

Converting QuickTime to Video for Windows
QuickTime files stored on the Macintosh are fundamentally different in two ways compared to the QuickTime files stored on the PC:

  • On the Macintosh, data can be split between files. On the PC, a single file must contain all the data.
  • On the Macintosh, files have a resource fork and a data fork. On the PC, files are not forked.

On the Macintosh, a MooV file can refer to data stored in other MooV files. This saves disk space and it can happen when movies are created by cutting and pasting from other movies. To make a MooV file portable, you must replace all references to data in external files with an actual copy of the referenced data. This process is required not only when moving QuickTime files to the PC, but also when moving movies from one Macintosh to another.

A MooV file on the Macintosh contains the actual video and audio streams in the data fork and all of the organizing information (such as headers, indexes, sizes, media information) in the resource fork. However, for portability, Apple defined a single-fork form of the MooV format in which the resource information is stored immediately after the audio and video data in the data fork, and the resource fork is empty. Such files play just as well as two-forked files. This process is referred to as flattening the file.

The PC creates the equivalent of Macintosh self-contained, single-forked files that the Macintosh treats as PC files. (A drag-and-drop utility named MakeItMooV, bundled with Indeo video for Macintosh, changes the file type as necessary for the Macintosh to treat these as Macintosh video files). But you must ensure that QuickTime files created on the Macintosh are self-contained and single-forked before they can be compressed or played on the PC. You begin the conversion process on the Macintosh and finish it on the PC.

You can flatten a movie file on the Macintosh using various video editing applications such as Video Fusion or Adobe Premiere. With Video Fusion 1.5 or later:

  1. Execute File > Save As...
  2. Select QuickTime self-contained format.
  3. Check the Cross-Platform check box.

With Adobe Premiere, execute the File > Export... Flatten Movie command.

Various playback utilities, such as MoviePlayer 2.0 and Movie Converter 1.0, can also flatten a Macintosh movie file:

  1. Open the movie file.
  2. Execute File > Save As...
  3. Select Make movie self-contained and Playable on non-Apple computers.

The Video for Windows Converter utility from Microsoft includes this conversion capability as shipped but does not support Indeo video Raw or compressed MooV files.

After you've flattened the file, move it to the PC and change its format from MooV to .AVI. You can do so by recompressing the movie in Adobe Premiere*, but if the video has already been compressed, another compression will degrade image quality. Utilities such as TrMooV* and SmartVid can convert between .AVI and MooV formats without recompression.

To convert a MooV format file with TrMooV:

  1. Start TrMooV from Windows.
  2. Select the source file using the first Browse button.
  3. Select the target .AVI format file by using the other Browse button. Make sure the new file name has an .AVI extension.
  4. Select the Start button to convert the file.

The file format is converted, the video is not recompressed, and the audio and video data are correctly interleaved.

TrMooV has the following limitations:

  • It does not convert Indeo video Raw files.
  • It does not reliably convert a palette that is attached to a MooV format file.
  • It does not change the audio sampling rate.
  • Long movies may lose audio/video synchronization.

To convert a MooV format file with SmartVid:

  1. Start SmartVid.
  2. Select File > Open Source for the source MooV format file.
  3. Select Convert > Start.
  4. Check AVI as the file type.
  5. Specify a target file name. The default uses the original file name with the .AVI extension. If you choose to change this, make sure the new file name has an .AVI extension.
  6. Select OK in the file dialog.

SmartVid converts the file and opens it. For more information on using SmartVid, see the document entitled Using The SmartVid Conversion Utility.

SmartVid does not convert the audio interleaving. To do so, open the converted file with a video editing application and use the application's audio interleave options. SmartVid converts only files captured in Indeo video Raw or compressed with Indeo video Release 3.2.

If a custom palette is attached to the MooV format file, it is removed from the converted file.

Converting Video for Windows to QuickTime
Converting .AVI format files to MooV format requires both file format and audio conversions. SmartVid converts compressed and Raw .AVI format files to MooV format, an essentially straightforward process of copying the data to create a self-contained, single-forked file. However, audio conversion is less straightforward and requires an additional process using another tool.

QuickTime and QuickTime for Windows perform best when playing movies that have QuickTime audio interleaving. Therefore, when converting .AVI format files to MooV format, check the resultant audio interleaving, using a Macintosh-based tool such as MovieAnalyzer* to do so. For example, select MovieAnalyzer's Info Graph Playability (zG) menu item to check audio interleaving. A message window opens, containing messages about potential playback problems. Audio interleave may be among these messages. If audio interleave is a problem, save the movie to a new file name on the Macintosh using MovieConverter 1.0.

Managing the Indeo Video Palette in Cross-Platform Development
When you play a video on a monitor in 8-bit mode, all video color data is converted to one of the 256 colors in the currently asserted palette. A palette can be associated with a particular video file, the application that is playing the video, or the operating system. Three common approaches are:

  • The application always asserts a palette.
  • The application never asserts a palette, using whatever palette is currently asserted.
  • The application asserts the palette associated with a specific movie, if available. If no palette is associated with the movie, the QuickTime for Windows palette is asserted.

The following discussion provides techniques for creating a single Indeo video file that can play with optimal quality under QuickTime environments. For a complete discussion of Indeo video palettes, including a discussion of palettes in the Video for Windows environment, see Using Palettes With Indeo Video.

An Indeo video file playing in QuickTime on an 8-bit color monitor may not necessarily look as good when playing in QuickTime for Windows on an 8-bit color monitor. To improve playback quality under QuickTime for Windows, you can use QuickTime tools on the Macintosh to optimize the MooV file.

By default, QuickTime dithers the Indeo video file during playback to the currently asserted palette. The video will play best if this is the system palette.

SetMovieColorTable and MakeMovieColorTable are two tools available with the QuickTime 2.0 developer's kit that allow you to associate a specific palette with a movie file. Depending on the specific details of the video content, this can improve performance and image quality, but you will have to experiment with your specific video file under QuickTime to determine if it does.

Under QuickTime for Windows, it is the responsibility of the playback application to assert the desired palette. This can be the Indeo video 236­color default palette, or one you have optimized for the application. Debabelizer* is a popular application for creating palettes. Create your palette with no more than 236 colors, because the first ten and last ten entries in the 256-color palette are reserved for Windows.

QuickTime for Windows 2.0 offers the ability to associate a palette with a specific movie file, which the playback application then asserts when playing that file.

For optimal QuickTime for Windows playback, attach the default Indeo video palette. The Indeo video decompressor runs faster and image quality is better.


Creating Hybrid CD-ROM Discs
To date, hybrid CD-ROM formatting software is available only for the Macintosh. A CD-ROM drive can access all the files on a hybrid CD-ROM disc, regardless of the platform to which the drive is attached. Such a CD-ROM is formatted to the Macintosh file system standard, but the drive is persuaded that the disc has the correct formatting for the platform, due to CD-ROM and file system standards.

When using hybrid CD-ROM mastering software, take care that inconsistencies between platforms do not cause problems:

  • Name files in a manner consistent with Windows 3.x standards.
  • Make sure that QuickTime movie files have a file creator of TVOD and a file type of MooV.
  • Make sure that QuickTime movie files are flattened (self-contained and single-forked).
  • Use standard icons.
  • Truncate the CD-ROM's data track, if the software allows it.
  • Don't use the CD-ROM's entire storage capacity; leave 5 to 10 megabytes free.
  • To eliminate disk fragmentation, use a disk optimizer (such as Norton's SpeedDisk*) on the source hard drive prior to any CD-ROM formatting.
  • To avoid writing the trash can folder data to the CD-ROM, empty the trash can on the Macintosh desktop before writing the CD.


Cross-Platform Development Scenarios
The following scenarios describe typical cross-platform environments and detail the steps by which you can create and manipulate Indeo video files for cross-platform playback.

Scenario 1: Capture and Compress on Macintosh
Below are the steps to produce Indeo video files in QuickTime format immediately playable on the Macintosh. Additional steps are provided if those files require playback under QuickTime for Windows on the PC.

  1. Capture in lossless mode with an appropriate video capture board.
  2. Compress into Indeo video using a compression application.
  3. Once properly compressed and self-contained, an Indeo video file is suitable for pressing onto a CD-ROM. At this stage, the MooV file is only playable on a Macintosh.
  4. To make this file playable under QuickTime for Windows, convert the Macintosh MooV file to a single-forked file.

The Indeo video file is now suitable for playing on a Windows machine using QuickTime for Windows. It is also ready to be pressed onto a hybrid CD-ROM playable on either a Macintosh or a PC.

Scenario 2: Capture on Macintosh and Compress on PC
This scenario produces Indeo video files in both QuickTime and Video for Windows formats.

  1. Capture in lossless mode with an appropriate video capture board.
  2. Compress the MooV file, selecting Indeo video Raw as the compressor.
  3. To make this file playable under QuickTime for Windows, convert the Macintosh MooV format file to a self-contained and single-forked file.
  4. Transport the Indeo video Raw MooV file to a PC.
  5. Convert the MooV format file to .AVI format.
  6. Compress the Indeo video Raw file to an Indeo video .AVI file using the compression settings recommended in the document entitled Compression Techniques for Great-looking Indeo Video. This .AVI file is ready for playback on the PC under Video for Windows.
  7. Convert the Indeo video compressed .AVI file back to MooV format using a conversion program.
  8. Transport the Indeo video compressed .MOV file back to the Macintosh.
  9. Use a utility such as MakeItMooV or ResEdit* to set the file creator to TVOD and the file type to MooV.
  10. Convert audio interleaving as required for QuickTime on the Macintosh.

The MooV file is now suitable for use on a cross platform CD-ROM.

Scenario 3: Capture and Compress on PC
This scenario produces an Indeo video QuickTime file for both the PC and the Macintosh. It will also produce an .AVI file immediately playable on the PC.

  1. Capture in Indeo video Raw or other lossless mode using the Intel Smart Video Recorder III or other appropriate capture board.
  2. Compress into Indeo video using the appropriate compression application. See the document entitled Compression Techniques for Great-looking Indeo Video.
  3. Convert the .AVI format file to MooV format.
  4. Transport the Indeo video MooV format file to a Macintosh.
  5. Use a utility such as MakeItMooV or ResEdit to set the file creator to TVOD and the file type to MooV.

Scenario 4: Capture on PC and Compress on Macintosh
This scenario produces Indeo video files in .AVI format playable on the PC and QuickTime format playable both on the Macintosh and in QuickTime for Windows.

  1. Capture in Indeo video Raw or other lossless mode using the Intel Smart Video Recorder III or other appropriate capture board.
  2. Convert the .AVI format file to MooV format, or save as MooV.
  3. Transport the Indeo video Raw MooV format file to a Macintosh.
  4. Use a utility such as MakeItMooV or ResEdit to set the file creator to TVOD and the file type to MooV.
  5. Compress the Indeo video uncompressed file into Indeo video with a compression application, using the compression settings recommended in the document entitled Compression Techniques for Great-looking Indeo Video.
  6. At this point, the movie is a finished Indeo video QuickTime file, ready to be pressed onto a Macintosh-only CD-ROM. To make this file playable under QuickTime for Windows, convert the Macintosh MooV file to a self-contained and single-forked file.

At this point, the Indeo video .MOV file is ready to be played in Quick Time for Macintosh or Windows.


Conversion Utilities
Four conversion utilities are available for video files: SmartVid, TrMooV, VfW Converter, and AVI to QT. SmartVid is a Windows-based utility available from Intel. TrMooV is also a Windows based utility. They both convert video files in either direction. The others are Macintosh-based utilities available from Microsoft. VfW Converter converts from QuickTime to Video for Windows, and AVI to QT converts from Video for Windows to QuickTime.

SmartVid

SmartVid does not convert audio interleaving or sample rates. If you are converting from QuickTime to Video for Windows format, convert the audio interleave on Windows using VidEdit or Premiere.

When converting from Video for Windows format to QuickTime format, convert both audio parameters using MoviePlayer 2.0 on the Macintosh.

TrMooV

TrMooV is useful for converting files in either direction on a PC. TrMooV has batch conversion abilities and also takes care of the audio interleave.

VfW Converter 1.1
Use this utility to change any of the audio format specifications as it converts the file. For example, you could convert from 8-bit samples to 16-bit, or stereo to mono. You can also use this utility to perform batch conversion of an entire folder of files. Furthermore, you can convert compressed QuickTime files to uncompressed Video for Windows files, which can later be compressed using Indeo video. Once the files are converted, you must correct audio interleaving.

AVI to QT 1.0
AVI to QT does not convert audio interleaving. Convert audio interleaving using MoviePlayer 2.0 on the Macintosh.

This utility has two advantages over SmartVid:

  • It supports batch conversion of all files in a folder.
  • It can create either a self-contained QuickTime file or a QuickTime file that refers to a source .AVI file.

Using this second method, you can make a .AVI file playable on both Video for Windows and QuickTime. Such files are different from cross-platform QuickTime files. Cross-platform QuickTime files result in a single file playable on both platforms. Cross-platform Video for Windows files consist of a stub QuickTime file containing pointers to the video and audio data in the .AVI file. The size of the stub QuickTime file is usually between 10-30 KB.

NOTE: Version 1.0 of AVI to QuickTime and version 1.1 of the VfW Converter contain a bug that prevents them from creating properly converted Indeo video compressed files. This issue should be resolved in the next releases of these utilities. In the meantime, these two utilities can be patched using ResEdit as described below.

The following steps allow Video for Windows Converter and AVI to QT Utility to convert files compressed with Indeo video.

  1. Make a backup copy of the VfW Converter file and store it in a safe place.
  2. Make a backup copy of the AVI to QT Utility file and store it in a safe place.
  3. Open ResEdit.
  4. Open the VfW Converter file.
  5. Open the MTPC resource by double-clicking on its icon.
  6. Open the MTPC resource id 1000 by double-clicking on its icon.
  7. Select the '5)' field.
  8. Select Resource > Insert New Field(s).
  9. In the Mac edit box, type: IV32.
  10. In the PC edit box, type: 23VI.
  11. In the strh.fccHandler edit box type: IV32.
  12. Close the MTPC resource id 1000 window.
  13. Close the resource MTPC window.
  14. Select Edit > Copy.
  15. Select File > Save.
  16. Open the AVI to QT Utility.
  17. Select Edit > Paste.
  18. Select the YES button in the alert dialog box to replace the existing resource.
  19. Select File > Save.
  20. Select File > Quit.

You can use the steps above to support files compressed with Indeo video Release 3.1 or Indeo video Raw. For Indeo video Release 3.1:

  • Replace IV32 with IV31.
  • Replace 23VI with 13VI.

For Indeo video uncompressed:

  • Replace IV32 with YVU9.
  • Replace 23VI with 9UVY.

For more infomation, contact www.apple.com and www.microsoft.com.


* Legal Stuff © 1997 Intel Corporation

Free Web Hosting