Then, There's Mplayer!
What the Codeweavers CrossOver Plugin has going for it is that you get to use the actual Windows plugin on your Linux system. It's the real thing and consequently looks just like the official product. Still, if you are willing to forego that official look, there is a freeware alternative that will do the job very nicely. It's called MPlayer. It is also a great media player that can handle both audio and video streams, play from a TV tuner card, record audio and video, and more. It works beautifully from the command line, but it also has a great, skinnable GUI. MPlayer requires a little more work up front, but the results are worth it, and it won't cost you a penny.
Some distributions such as Mandrake, already come with MPlayer, so check your distribution CDs first. In order to use the GUI, you'll want to install the mplayer-gui and mplayer-skins packages as well as mplayer itself. If you don't have it (or you want the latest and greatest), pay a visit to the MPlayer Web site at http://www.MPlayerHQ.hu. You'll find both source distributions as well as RPMs.
MPlayer handles tons of video formats, from avi to mpg to Windows Media Player to Quicktime, and just about anything you can think of. The same is true for audio (think Ogg, MP3 and so on). MPlayer performs this magic by using a series of codecs (coder/decoders), little software translators that take a foreign video or audio format and let you enjoy it on your Linux system. To get the latest bundle of Win32 codecs, visit the following URL.
You'll find different bundles there and for different video formats, but you may as well download the full set. The packages are tarred and compressed with bzip2. Open up a Konsole and cd to whatever directory you downloaded your codecs bundle. Once there, type this command:
tar -xjvf win32codecs.tar.bz2
This will create a subdirectory called win32codecs. Switch to that directory, and (as root) copy all the codecs to /usr/lib/win32. If the /usr/lib/win32 directory doesn't already exist, you should create it.
cd win32codecs su -c "mkdir -p /usr/lib/win32" su -c "cp * /usr/lib/win32"
Notice the "su -c" before each of the commands. You might remember this from chapter 7. This command lets you quickly jump into root to perform the necessary steps, then jump back.
Once you've done all this, MPlayer is ready to use. Let's say that you have a movie clip called "exciting_movie.avi." To play that movie clip with MPlayer, you would open a shell and type the following:
To use the graphical or GUI version of the player, run the command "gmplayer" instead.
Using the GUI is even easier because it provides a familiar interfrace for loading files as well as controlling all aspects of the playback (fast forward, pause, etc.). With the Open button, you can select the files you want to view, or point to your DVD drive and select the files you would like to view. Of course, the look of the interface will vary based on the skin you choose. Figure 17-21 shows off the default MPlayer skin.
Figure 17-21. Default MPlayer skin.
When you first run the mplayer command, it will create a ".mplayer" subdirectory in your home directory. From there, it will read a file called "config" where you can add various configuration options, select audio and video output sources and so on. You can create or edit the config file with the Kate editor (covered in Chapter 16), and modify Mplayer to suit your needs. Here's what my config file looks like.
# Write your default config options here! # vo=xv,x11 ao=arts
I'm asking Mplayer to use my X11 video for output and KDE's aRTs audio system for the sound. If you find yourself with no sound or with video problems, I recommend that you do the same.
When running MPlayer in GUI mode, you can switch to other skins by right-clicking on the interface. This will bring forward a menu with many options, one of which is to activate the skin browser.
MPlayer is powerful and flexible. You can do a lot more with it than I can cover here in a short period of time. For that reason, I do recommend that you read the accompanying documentation, or pay a visit to the MPlayer W eb site to learn more. You can also type "mplayer -h" from the command line for a list of keyboard controls and options.