BSD DevCenter
oreilly.comSafari Books Online.Conferences.

advertisement


DVD Playback on FreeBSD
Pages: 1, 2

xine



Next, I tried xine:

cd /usr/ports/graphics/xine		
make install clean

The xine application itself will only play unencrypted DVDs. However, there are plugins available for those who wish to play encrypted DVDs:

/usr/ports/graphics/xine_d4d_plugin
/usr/ports/graphics/xine_d5d_plugin

There is also a plugin which supports DVD menu features:

/usr/ports/graphics/xine_dvdnav_plugin 

I built all four ports in order to test them. The xine application will be installed to /usr/X11R6/bin/xine and any installed plugins will show as buttons in the xine GUI. This GUI is skinnable with skins available at xine.sourceforge.net. If you find a skin you like:

cd ~/.xine
mkdir skins

Then, download the skin to your skins directory. The xine skins were a real strain on my sanity. Each skin moved the buttons to a different place, renamed the buttons to something else, and changed the configuration options. Some of the skins were non-intuitive. I had no idea what would happen if I pressed a certain button. Sometimes I ended up with an "xine engine error" message which refused to go away until I killed xine.

Trying to play DVDs turned into an even more frustrating experience. Sometimes, clicking on the DVD button, then the play button, would start playing an unencrypted DVD. Sometimes, clicking on the MRL browser button, then clicking on its DVD button, then clicking on play did it. Sometimes I clicked all over, waited forever, and only froze up the GUI.

I had better luck with the NAV button which gets installed with the dvdnav plugin. This gave the extra features of retrieving the name of the DVD and allowing the mouse to choose a menu selection. Without this plugin, I had a rough time figuring out which of the buttons would get me past the main menu and into the movie.

Playing unencrypted DVDs with xine gave me the opposite problem that vlc had: the audio was decent but the video was slightly choppy and not always matched up to the audio.

In order to play an encrypted DVD, I had to use either the D4D or D5D button. If I tried the DVD button, I received that "xine engine error" which was my clue that I had discovered an encrypted DVD. I was unable to convince the D4D button to do anything other than seg-fault. D5D took a couple of minutes to decrypt the keys. The resulting video was gorgeous. I had forgotten how much better the resolution is on a monitor compared to a TV. Audio varied from perfect to choppy, so I almost threw the PC out the window. I think I will wait a bit to allow the plugins to mature before trying xine again.

MPlayer

Next, I tried MPlayer. This port comes with a lot of options, but most of them are already enabled or are auto-detected for you. However, you do have to specify the following options in order to enable them:

WITH_GUI	#builds the GUI	
WITH_LIVE	#enables live.com streaming media support
WITH_TDFXFB	#enables Voodoo 3/banshee support

I don't have a Voodoo video card and I wasn't interested in live.com support, so I just specified the GUI option like so:

cd /usr/ports/graphics/mplayer
make WITH_GUI=yes install clean

I could have also used this alternative method to specify the make option:

make -DWITH_GUI install clean

Once the install was finished, I exited the superuser account but stayed in the same directory. Now, as my regular user I ran this command:

make install-user

Since I built the GUI, I use the executable /usr/local/bin/gmplayer. If you don't use the GUI, use /usr/local/bin/mplayer instead.

The Mplayer GUI is skinnable, so I also built the skins:

cd /usr/ports/graphics/mplayer-skins
make install clean

I was prompted to select which skins to install. I chose to install them all. The first time I started MPlayer, I was really impressed with the interface. This is what a DVD player should look like, and the skins blow the other DVD players out of the water.

A right-click anywhere on the GUI allowed me to change skins, set Preferences, and open a DVD disc. I thought, great, I've found an intuitive and gorgeous interface. Unfortunately, my enthusiasm was short-lived.

I started with a non-encrypted disc which began playing with crisp video and clear audio. After about 20 seconds, a very large error message informed me that my system was too slow. Curbing my irritation at such a blatant presumption, I dutifully stopped the DVD, recorded the error message's suggestions, and implemented the suggested changes. The changes worsened the situation: now both audio and video were choppy and still accompanied by the same error message.

Not to be deterred, I started to systematically change one thing at a time in the Preferences. I discovered the joys of no sound, choppy sound, and perfect sound for a maximum of 2 minutes. After exhausting all of those changes, I was faced with trying combinations of changes. At that point, I went in search of documentation. Of that, there was no shortage. There is a very comprehensive "man mplayer" and an even larger /usr/local/share/doc/mplayer/documentation.html. At some point in my reading, it became obvious that I was doing too much work just to play a DVD.

As a last-ditch effort, I tried just using MPlayer on the off-chance that it was the GUI that didn't agree with my system:

mplayer -dvd 1

Same deal. Only difference was that the irritating error message quietly stayed in the xterm instead of popping up in front of the movie. So I sadly waved goodbye to that gorgeous GUI and placed Mplayer in my list of things to try again at a later date.

ogle

Finally, I tried ogle. By default, ogle's engine is command-line based, but there is a port that will also build a simple GUI:

cd /usr/ports/graphics/ogle-gui
make install clean

The executable will be installed to /usr/local/bin/ogle. The interface isn't anything to write home about, but it is clean and intuitive. To play a DVD, go to the File menu -> Open disc. The ogle port automatically installs support for menus so you can use your mouse to select the desired menu option once the movie starts.

I started with an unencrypted disc, and to my surprise, gorgeous video was perfectly matched to crystal clear audio. No blips, no chop. Hardly believing my good fortune, I pushed my luck with an encrypted DVD. I had to wait a few minutes for the decryption process, but there it was: I had attained perfect playback. Just when I had almost given up on ever watching a DVD again. The ogle port had matched my first two criteria: no choppiness out-of-the-box without reading manpages or tweaking properties sheets, just a play button. In fact, I don't know if it's a bug or a feature, but when you press Edit -> Properties in ogle, nothing happens. The only thing missing is some good looking skins.

Well, those were the results of my adventures and misadventures with DVD playback. I know I promised in the last article to also cover RealPlayer and some other miscellaneous ports, but the DVD section turned out to be longer than I expected. These will be the subject of the next article.

Dru Lavigne is a network and systems administrator, IT instructor, author and international speaker. She has over a decade of experience administering and teaching Netware, Microsoft, Cisco, Checkpoint, SCO, Solaris, Linux, and BSD systems. A prolific author, she pens the popular FreeBSD Basics column for O'Reilly and is author of BSD Hacks and The Best of FreeBSD Basics.


Read more FreeBSD Basics columns.

Return to the BSD DevCenter.






Sponsored by: