Why Doesn't My AVI Play?
Why Does My Large MPEG Only Play A Few Minutes?
How Do I Convert?
How Do I Take A Screenshot of a DVD?
My Movie Is Out Of Sync

Why Doesn't My AVI Play?

First, make sure it's an AVI. Windows users often think "AVI" means "computer movie file" (in fact it stands for Audio Video Interleave and the format was created by Microsoft, who has long since abandonned it in favor of ASF-"Advanced Streaming Format" and WMV-"Windows Media Video", the two of which all evidence indicates are exactly the same). So it might actually be an ASF file or MPEG-1 or -2. You can try renaming it to end in .mpg or .asf, but when you try .asf, Windows Media Player (WMP) adds type and/or creator codes so changing the type back to avi or mpeg will be more difficult. Alternatively, you can open the file in a Hex Editor like HexEdit.

Here are some samples from MPG files:


Here is a sample from an ASF file:

Here is a sample from an AVI file:

Here is a sample from a MOV file:

Here is a sample from a RM file
I don't have pictures, but OGM and OGG files start with "OggS" and MKV, MKA and MKS files have "matroska" in the first 16 characters or so.

Once you're sure it's an AVI, you need the right decompressor (or codec, which means COmpressor/DECompressor), as quicktime probably told you in an error message. The most common are DivX and Indeo.

You can find out what codec an AVI needs by opening it in Quicktime Player and looking in the Info window (command-I in QT 5 and above). Under video format, IV32, IV41 and IV50 mean Indeo Video 3.2, 4.1, and 5.0, respectively. DIV3, DIV4, DIV5, MP43, DIVX, DX50, all mean divx. XVID means XviD, which is a different product than DivX, but as far as the user is concerned they are interchangeable. MP42 means MSMPEG4v2. MPG4, MPEG-4, or MP41 mean MSMPEG4v1. You can also open the file in a hex editor and search for these codes (called FourCC or FourCharacterCode codes). They will be in the first 20 lines or so. You can change them in a hex editor, too, but that is only necessary for the MSMPEG4v1 codec, which requires you change the code to MP41. For other codecs, this is highly unrecommended. If you have an MPEG-4 codec installed, it may insert its moniker instead of the FourCC, in the Quicktime Info window. Simply remove the extension from /Library/Quicktime or ~/Library/Quicktime in OS X or from /System Folder/Extensions/Quicktime Extensions in OS 9 and restart quicktime.

Now, how to play these files:

For Indeo, you will need to play it in Classic, as no OS X Indeo codec exists, or will likely ever exist. You can search for the OS 9 quicktime codecs at apple.com. There are three versions that are NOT backwards compatible (that means download them all while you're there), 3.2, 4.1 and 5.0, the last is the most common.

For Divx, you can choose between 3 main choices: (1) go to www.divx.com and download the mac codec. It tells you to restart (I believe), but you only need to restart quicktime (in OS X). (2) You can go to www.3ivx.com and download the 3ivx D4 codec. 3ivx is different than divx, but confusingly enough, 3ivx D4 also decodes divx. Or (3) go with ffmpeg. FFmpeg is a unix program that plays almost every kind of mpeg-video found on the net. Based on this software, there is a QuickTime component here, there is a standalone player called VidoeLan Client, and another player called Mplayer (the interface of which I dislike, but it usually has the best codec compatiblity of any of the options).

Choices (1) and (2) for divx playback have something called Post-Filters, which mean that if your computer is about 500 mhz or faster, they will look better than the choice (3) offerings, which are all based on the same code.

Now, those 3 choices are all for standard divx files. Divx evolved from Microsoft's attempt at MPEG4, and the first divx standard was MS-MPEG4v(ersion)3. You might still find MS-MPEG4v1 or v2 files around. For these you can play in OS X by searching versiontracker for MS-MPEG4v1 and MS-MPEG4v2 codecs. They are also based on ffmpeg, but I'm not sure which if any of the other ffmpeg-based solutions recognizes MSMPEG4v1 or v2. In OS 9 you can't play MS-MPEG4v1, but you can play MS-MPEG4v2 files with the "wmaaudio" codec. There is also an open source MPEG-4 codec similar to divx called Xvid. 3ivx and DivX can play this content, but for the divx.com codec to agree to do so you have to install the XviD delegate component.

That's for video. Audio in divx is often mp3, but since the official spec of AVI does not allow for Variable Bit-Rate (VBR) audio (which is all people use), quicktime needs some help playing it. divx.com's codec (since version 5.0.6) comes with it's own AVI parser, that overrides QuickTime's built-in one. This is a great advance for Mac divx users, as you are about to see. 3ivx.com offers the Divx Doctor 2, which converts the AVI to a MOV, in which the mp3 audio is in a format recognizable to QuickTime, and the video is (if you choose) just a reference to the original AVI file. Finally, the earliest tool OS X users had for mp3-in-avi was something called AVI2MOV, which was from jamby.net and no longer seems to exist. The reason I mention it is it also came with a command-line program called getMp3, which in my experience has always been the fastest and most reliable way to extract mp3 audio from avi files, but as you might have guessed by the name, it leaves you with an mp3 file which you then have to re-add to your video, so it's not very convenient, and doesn't support other audio codecs you might find. VLC plays AVI's without conversion, but the sound quality in VLC is generally bad anyway. a shame.
But. if the sound is WMA (Windows Media Audio) instead of mp3, you'll have to do a bit more work. For OS 9, get the wmaaudio codec. 3ivx's Divx Doctor integrates with the wmaaudio extension to produce a MOV with decompressed audio that will play (or convert) anywhere. Without Divx Doctor, you can play the AVI in classic. I've heard that Audion (maybe just the pro version) can convert wma to another format (mp3 or aiff I believe), but it cannot read wma in an avi file. For OS X, ffmpeg also now reads wma, so you can convert these movies with such tools as ffmpegX or DivXWMAConverter to a format your player can play.
Note: There are other audio codecs that occaisionally appear in divx files. AC3 audio (the same format used for DVD's) is sometimes found in DVD rips, because you don't have to convert it from the dvd source, and because it supports 5.1 digital surround sound. You can play these if you install the AC3 delegate component and already have the divx.com component installed. Another codec I find frequently in MP42 files is called Microsoft GSM audio. These and other formats (Voxware for example) can only be played in Windows.

Why Does My Large MPEG Only Play A Few Minutes?

MPEG's that have been improperly joined by Windows users will still play in WMP for Windows or in VLC but not in Quicktime. You can re-split the mpeg with Rosetta. If you then want to join it for quicktime playback, you can try mpgtx for Mac.

How Do I Convert ASF Files?

ASF (and WMV which seems to be the same) is actually just a container format like AVI or MOV. Since the playback in WMP for mac is sub-standard, most asf movies will look better simply by playing them with divx or 3ivx (in Quicktime). The most common codecs for asf are MS-MPEG4v3 (or MP43, which is the same as DivX 3.11a) and MS-MPEG4v2 (MP42) for video and WMA for audio (or sometimes Voxware Metasound, but I haven't seen those in quite a while). Newer asfs will likely have Windows Media 7 (WMV1) or Windows Media 8 (WMV2) for video. Windows Media 9 (WMV3) is only recently playable on MacOS, and only in WMP.

For the MS-MPEG4 codecs, you can directly copy the video into an AVI container with VirtualDub 1.3c (VDub) in Windows (later versions of VDub had the asf-parsing code removed at MS's request, but since it's open source someone added the asf-parsing code back to version 1.4 and called it 1.4c-asf or something, so you might find that somewhere. I don't know what improvements were made between 1.3c and 1.4). The audio you can encode to mp3 in VDub too. I have been at PC's that don't have a codec for Voxware, and I've never been able to find the download, but I think it's supposed to be included in WMP 7. Alternatively, you can use ffmpeg to transfer the streams from the asf file to an avi file (use the flags -vcodec copy -acodec mp3). The problem with this is that ffmpeg gets the framerate of asf files off by several orders of magnitude (in which direction depends on the version of ffmpeg), and scaling video back to the right framerate in QT from that far off usually plays back with considerable choppiness.

If your asf has wmv video, VDub can't decode it, but don't dispair. You might still be able to convert the movie on MacOS. For OS X, VLC can convert whatever it can play. You choose "Open File..." from the file menu, click on Advanced Output and play around. This corner of VLC is not very well documented and results are highly variable. There's also ffmpegX, a GUI for the unix utility ffmpeg, mentioned above. It might work. There's also an app for OS 9 called ASFConverter that just takes whatever WMP for OS 9 can read (6.3 often reads voxware and mp3, though 7 doesn't) and re-encodes it to quicktime (audio is decompressed, so have your hard drives empty first). ASFConverter is unsupported and buggy, and the user interface is very limited, and I cannot get it to run in Classic (only when booted in OS 9).

How Do I Convert RM Files?

There are two options in Windows, and an inadequate option in MacOS. The best solution is EO Video. It is a slightly buggy shareware app that converts Real, Quicktime or ASF files to AVI or MPEG. The next best solution is called TINRA (This Is Not Real Anymore. I know it's corny, but the guy is not a native english speaker, and he's made great strides towards freedom from RealNetworks). This program uses your installed Real engine (Windows only, and must be pre-Real-One) to play your RM files, and then capture the video to disk. Therefore, if Real Player decides it wants to drop a frame during playback, that frame is gone forever. I've tried it on a 900 mhz Celeron, and the framerate was erratic and low (like 20 fps instead of 30). The MacOS option is to get Snapz Pro and then capture your screen while playing the RM movie with Real Player. This won't work well, but it will work.

How Do I Convert MPEG Files?

You can export the video from Quicktime Pro, or use the very fast DiVA. For the audio, you need to demux with BBDemux. This will produce a .m1a file. Rename it to mp2. You can convert it with MAD to AIFF or WAV, or iTunes 2 (later versions have never worked for me, but others say they do) if you cut the type and creator codes (search versiontracker for any of a dozen freeware apps to do this). Then add the audio back to the video with Quicktime Pro, or Sync-Hole. Alternatively for the audio, you can use ffmpeg to encode straight to wav, which anything can read (any version of iTunes, quicktime, what-have-you), or from ffmpeg straight to mp3 if you like, but I prefer aac/mpeg-4.

How Do I Take A Screenshot of a DVD?

VideoLan Client plays DVDs and doesn't prevent you from taking normal screenshots. Also, I've heard that if you have an NVidia graphics card you can take them from the Apple DVD player, but I don't have such a card.

My Movie Is Out Of Sync

I wrote an app to make fixing sync easier: Sync Hole, but it's still not "easy," and it's OS X only. The old fashioned way is to use QTMutator.