In the old days, media problems meant using a butter knife to pry a tape out of your VCR. Today, it means tracking down obscure drivers, repairing corrupt media files, hassling with overblown media players, and deciphering incoherent CD burning errors.
Microsoft wants you to think that Vista handles videos, pictures, music, and other media better than any previous version of Windows, and in some ways, it does. For one, Vista’s hefty hardware requirements mean that your PC—should it be capable of running Vista—will have the power to handle any media task you throw at it. Windows Explorer recognizes photo, video, and audio files, and displays their embedded information alongside other details, like the file size and date. And Vista recognizes more media file formats and graphics hardware out of the box than, say, Windows XP. But as they say, the devil is in the details, and, as it turns out, in the codecs as well.
Playing Video
Ever encounter a video file Windows won’t play? Unlike most other types of files, the filename extension alone doesn’t dictate the encoding scheme. All .jpg image files use standard JPEG compression, but a given .mpg movie file may employ any one of dozens of available compression standards, called codecs. Without the proper codec for a video file, you won’t be able to play the video or even convert it into another format.
A codec (which stands for compressor/decompressor) is software installed on your PC, akin to a device driver, with all the pitfalls and frustrations that implies. Codecs are frequently buggy, causing video distortion or even crashes. Vista only includes codecs for a few common standards; need anything else, and you’re on your own. And, of course, the More Information link Media Player shows you when it can’t play a video doesn’t provide anything one would recognize as useful information.
To play a particular video, you need to install the same codec that was used to create (compress) the video in the first place, regardless of the player application you’re using. To determine which codec was used, you’ll need a program like GSpot (http://www.headbands.com/gspot/) or AVIcodec (http:// avicodec.duby.info), both of which are free. Just drag-drop the video file onto GSpot (Figure 4-1) or AVIcodec, and the program will display the file’s video codec, audio codec, and other statistics.
Figure 4-1. Use GSpot to find the software necessary to play a given video clip
The codec utility may indicate that the required codec is already installed. As comforting as that may be, you might still need to download and install the latest version of the codec to play the troublesome video. Otherwise, you may not have all the latest bugs...er, fixes.
If one of these tools can’t identify the codec, the file is probably corrupted or encoded with a nonstandard scheme. Provided you’re not able to ask who-ever created the file for information about the software used, the easiest trick is to open the file in a standard text editor and look for the four-digit 4CC code near the beginning. Figure 4-2 shows the code buried in a file,DIVXin this case, which indicates that the DivX decompressor is needed to play this video.
Figure 4-2. A hex editor or text editor will show you the 4CC code embedded in the beginning of most movie files
Armed with the name (or 4CC code) of the codec, proceed to http://www.fourcc.org/fcccodec.htm, and download the codec installer from the list. If the 4CC code isn’t there, a quick Google search (along with the word “codec”) should turn up some useful leads.
Installing and Managing AX Codecs
In an attempt to find the right codec to play a video, you might come across a lone .ax file with no installer. This is indeed a codec, albeit not a friendly one.
To install the codec, just copy the .ax file to your \Windows\System32 folder. Next, right-click the .ax file, select Properties, and then click the Change button (under the General tab). Click Browse, navigate to your \Windows\System32 folder, select regsvr32.exe, click Open, and then click OK. Thereafter, you can simply double-click .ax files to register them.
Alternatively, you can open a Command Prompt window (cmd.exe), typecd\Windows\System32to change to that folder, and then typeregsvr32FLVSplitter.axto register the file. (Or, typeregsvr32 /uFLVSplitter.axto unregister/uninstall it.)
If you see a message like “DLLRegisterServer in C:\Windows\System32\FLVSplitter.ax succeeded,” then the new codec is installed and ready to use.
The SLD Active Codec Selector (free, www.skynet4ever.tk) is a handy tool you can use to list registered codecs on your PC and even selectively disable codecs you suspect might be causing problems.
Once you’ve installed the codec, try playing the video again. Keep in mind that there are often multiple versions of a single codec available—sometimes from different vendors—so you may need to install several codecs before you find the one that works.
After a bit of searching, you’ll probably figure out how widespread this video codec problem really is. Fortunately, some enterprising individuals have created codec packages, large installers that include several, if not dozens, of the codecs that people seem to need most. One good example, known simply as the Vista Codec Package, is available for free from http:// www.jtow.net/users/triess/.
Some of these packages are better than others, and depending on what’s included (or what isn’t), some may cause more problems than they solve. For best results, remove any separate, standalone codecs you’ve installed before trying out a codec package.
If, after installing an individual codec or codec package, some of your videos no longer play (or their thumbnails no longer show up), there’s a little trick you can try before you uninstall and give up. The FFDShow Video Decoder Configuration tool, included with many codec packages and shown in Figure4-3, helps you troubleshoot specific codec problems.
For instance, on one PC, Vista lost the ability to play back .avi files: Media Player crashed each time one was opened, and Windows Explorer displayed an error message whenever it attempted to render thumbnails for the videos. To fix a problem like this, open the FFDShow Video Decoder Configuration tool, select Codecs on the left, and then find the codec that’s causing the problem in the right pane. Then, in the Decoder column, use the drop-down listbox to choose a different decoder from the list. Click OK when you’re done; the change should take effect immediately.
There are reasons that Windows Media Player might have trouble playing a video other than a missing or broken codec—namely, problems with the video file itself. First, make sure your video file is complete; if you downloaded it from the Web, try clearing your browser cache and downloading the file again.
If you’re unable to obtain an intact version of the video, you may be able to repair it with the free MPEG Header Corrector, available at http://www. vcdhelp.us/html/tutmpegheadercorrector.html, although this typically only works on true .mpg files. Need to repair an .avi file? Use DivFix (free, http:// divfix.maxeline.com).
Figure 4-3. When more than one codec is installed for a specific video format, you can choose which one to use with FFDShow Video Decoder Configuration Tool
OK, I know I just said that the filename extension doesn’t dictate the codec, but it does determine how the video data is organized in the file. See the “Does It Have the Right Extension?” sidebar, next, if you suspect a video file has been misnamed.
Does It Have the Right Extension?
Of course, there’s a chance someone gave your file the wrong filename extension; before you attempt to repair that video, make sure it has the correct extension. To check whether that .mpg file is really an .mpg file, open the file in a text or hex editor. The header (before the aforementioned 4CC code) will read RIFFif it’s an .avi file,RMF if it’s an .rm (Real Media) file,MOOVif it’s a .mov (Apple Quicktime) file,FLVif it’s an .flv (Flash Video) file, orW.M.F.S.D.Kif it’s a Microsoft .asf or .wmv file. If you see no header (only junk), it’s likely an .mpg file.
See Chapter 3 for more information on file types, and Chapter 2 to find out how to show filename extensions in Windows Explorer. Once extensions are visible, you can change a file’s extension merely by renaming the file and typing a new one.
But what if you’re in the middle of downloading a video from the Web? Eventually, it’ll be intact and playable, but if you want to start playing it before the download is complete, you’ll need to employ a few tricks.
First thing to know: Windows Media Player (and many other players) won’t play most kinds of videos while they’re in use; that is, while they’re currently being saved by another program (e.g., your browser). The big exception to this rule is streaming video, commonly found in files with the .asf or .wmv extension (Quicktime .mov files, too); by design, these files can be played even while in use by other applications.
To get around this limitation, open the folder containing the file, and create a duplicate of the partially downloaded file. Using the right mouse button, drag the file to an empty area in the same folder, and select Copy Here from the menu that appears. Thereafter, you should be able to open the duplicate file with no problems.
You may have to change the filename extension when playing videos that are in the midst of downloading. For instance, if you’re downloading a video with Pando named skiing.mpg, the intermediate filename will be skiing.mpg.downloading, and thus the filename of the duplicate you create will be skiing.mpg-Copy.downloading. Just rename the file to skiing.mpg-Copy.downloading.mpg (or simply skiing.mpg) and then double-click the file to play it.
With some video formats, particularly .avi files, there’s a catch: the index, essential information about the sequence of frames in the video, is located at the end of the file instead of the beginning. Thus an incomplete .avi file thus won’t have an index, and can’t be played at all. The solution is to use a re-indexing utility to rebuild this data and make the file playable. DivFix (free, http://divfix.maxeline.com), shown in Figure 4-4, does this quite nicely, but only works on true .avi files (discussed earlier in this section). If DivFix can’t repair your file, the Windows Media Encoder (free, http://www.microsoft.com/ windows/windowsmedia/forpros/encoder/default.mspx) is capable of indexing video files, albeit requiring a bit more work to navigate the complex interface.
So, what if your video plays, but just doesn’t play well? Problems like stretched or squashed video (too wide or too tall), bad color, and choppy playback can all be caused by buggy or misconfigured video codecs. Just track down and install the latest version of the codec required by the misbehaving video, as described at the beginning of this chapter, and try again. If that doesn’t help, there are some other fixes, as follows.
Figure 4-4.Use DivFix to re-index incomplete videos so you can play what you’ve downloaded so far
Change the aspect ratio.
If all your videos seem squashed (too narrow) or stretched out (too wide), you may have to correct your display’s aspect ratio setting. Open Windows Media Player, click the Now Playing button, and select More Options. Choose the Devices tab, highlight Display in the list, and then click Properties. Move the slider until the oval looks like as close to a true circle as possible, and then click OK.
On the other hand, if only a single video clip has an incorrect aspect ratio, it may’ve been encoded that way. To fix the file, you’ll have to open the file in a video-editing program that can resize video frames. Although the aforementioned Windows Media Encoder can crop frames, it can’t stretch or shrink video. To change the aspect ratio of a video clip, use River Past Video Perspective (http://www.riverpast.com), Open Video Converter (http://www.009soft.com), or a more advanced video application like Adobe Premiere (http://www.abobe.com).
The hardest part is the math, but it’s not that hard. Most video has a 4:3 aspect ratio, which means the width is four-thirds the height. (HD television and some feature films typically have a 16:9 aspect ratio, while wider “anamorphic” feature films have a 2.39:1 aspect ratio.) If your botched video clip has, say, a resolution of 400×400 (giving you a 1:1 aspect ratio and a square video frame), you can either increase the width to 600 (400×4/3) or decrease the height to 300 (400 divided by 4/3). Of the two choices, decreasing the height will usually give you a sharper-looking video, since compressed pixels always look better than stretched pixels.
Synchronize audio and video.
Does this happen with all videos, or just one? If only a single video clip is out of sync, then you’ll need to repair it using a timeline-based video-editing application like Adobe Premiere (www.adobe.com). (Windows Movie Maker, which comes with Vista, won’t do.) Drag your video to the timeline, then drag the audio portion of the clip slightly to the left or right until it’s synced up with the video. (Naturally, this will take some trial and error, so I hope it’s not too boring of a clip.) When you’re done, export the project into a new movie file. Consult the documentation that comes with your video application for details.
If you’re watching a DVD and the audio is out of sync, try pausing playback, waiting a few seconds, and then starting up again. Sometimes that’s all it takes to get a movie back on track.
If all your videos are out of sync, it’s usually caused by a problem with your hardware drivers. Go ahead and install the latest drivers for your video card and sound card, and then run Windows Update to make sure you have the latest video-related updates.
If new drivers don’t fix the problem, open Windows Media Player, and click the Now Playing button. Select More Options, and then click the Performance tab. Turn on the Drop frames to keep audio and video synchronized option, and then click OK.
Speed it up or slow it down.
Is a video playing too fast or too slow? In Windows Media Player, click the Now Playing button, select Enhancements, and then select Play Speed Settings (Figure 4-5). Adjust the slider until the video plays at the correct speed.
Fix bad color.
If some of your videos seem to have messed-up color, open Windows Media Player, click the Now Playing button, select Enhancements, select Video Settings, and then click the Reset link. Next, click the little arrows until you see Color Chooser, and click the Reset link here as well. Now, play a video to try it out; if the colors are still off, you may have to play with the Video Settings and Color Chooser sliders to fine-tune the color.
If that doesn’t do the trick, or if you see colored lines running through your videos, you can usually correct the problem by updating your display drivers.
Figure 4-5. Play any video faster or slower with the Play Speed Settings panel in Windows Media Player
Shed light on blank videos.
Ever feel like Sergeant Schultz from Hogan’s Heroes?* You might hear something, but you definitely see nothing when you play most videos.
If so, it’s likely a video overlay problem.
When you play video, Windows usually paints a special rectangle on your screen, and your video driver is responsible for superimposing the moving video over it. This overlay scheme allows your display adapter (video card) to handle the burden of playing the video rather than your CPU, which affords better performance and smoother video. Unfortunately, it can also be the source of problems in some cases, usually manifesting itself as a black rectangle where video should appear.
First, conduct a little test to see whether you indeed have an overlay problem. Try maximizing or resizing the Windows Media Player window, or cover it with another window and then bring it to the front. If this makes the video play, or if you see pieces of windows left behind in the black rectangle, your video card driver may be to blame. Visit your video card manufacturer’s web site and download the latest driver. Also, pay a visit to the company’s support web site and look for recommended BIOS settings (see Appendix A).
In previous versions of Windows Media Player, one was able to downgrade Windows’ support for video overlays to solve this problem. Unfortunately, Microsoft eliminated this option in Media Player 11, perhaps because Vista’s requirements for video hardware are so much heftier than Windows XP’s that Microsoft thought it inconceivable that modern video drivers would have any problems playing video.
To disable video overlays in RealOne Player, go to Tools ➝ Preferences ➝ Hardware ➝ Video card compatibility. Move the slider to the left until Enabled optimized video and disable overlays appears beneath.
The Windows Media Player has lots of interesting features and gadgets, most of which just get in the way when all you want to do is play a simple video. Of course, it looks downright minimalistic compared with Real Networks’ cumbersome RealPlayer. Fortunately, you have a few choices.
To switch to the simpler Windows Media Player window, just press Ctrl-2 to switch to Skin Mode. (Or, press Alt to show the normally hidden menu, and then select View ➝ Skin Mode.) The default skin is “Corporate,” but you can choose another skin by clicking Alt and selecting View ➝ Skin Chooser.
Alternatively, Media Player Classic, available for free at http://sourceforge.net/projects/guliverkli/, can take the place of Windows Media Player, RealPlayer, and QuickTime Player. It has a slimmed-down interface (shown in Figure 4-6), doesn’t need to be installed (it’s just a standalone .exe file), and plays just about any video format. (Really, it’s just replacement “shell” that ties into the playback engines that come with the aforementioned media player applications.)
Aside from the streamlined interface and its ability to handle just about any video format, Media Player Classic has several features that make it worth using. For instance, you can play more than one video at once, something Windows Media Player won’t let you do. And it’s kind enough to show detailed error messages with enough information to solve the problem, such as listing any missing codecs.
Figure 4-6. Media Player Classic is an alternative to the overblown Windows Media Player and messy RealPlayer applications
Please check back next week for the continuation of this article.