Edit: Unfortunately, the images originally included in this post are gone, because of hosting problems in late 2009. My apologies.
There are probably a dozen video players for Linux, with another dozen apiece in frontends you can use to run them. Multiply that by the half-dozen more in codecs and stream decoders and whatnot, and there’s the formula to somehow jerry-rig an entertainment package for Linux.
It gets crazy after a while. I’ve heard of installing upwards of six or seven packages, plus their dependencies, just to open a file with Totem. Not that Totem is at fault for that — it’s just the way things are.
I’m firmly planted in the MPlayer contingency though. It’s odd, since I would be willing to describe myself as a Rabid Fan, but I haven’t added it to my software page. Who’s in charge around here, anyway?
Regardless, as far as I’m concerned, MPlayer is the way to go for Linux video playback. However, I like my MPlayer to behave in a certain way, and not to do certain things. Here’s what I mean:
Ain’t that a beauty? Free-floating, undecorated, always on the top and on every desktop, with a single black one-pixel border. No space lost to unnecessary frivolities, and the action doesn’t stop if I roll to a different desktop. Best of all, you can run that against the Openbox window manager on machines as slow as 300Mhz, and provided the video card doesn’t balk at the chore, pump that up to a fullscreen image with the single press of a key.
Here are some settings, if you want to do that in Openbox, which is also known as The World’s Finest Window Manager. To some it is, anyway.🙄 There may be other ways to tackle these problems; if there are, let me know about them. …
First, make a small decision: Do you want that free-floating always-on-top movie screen to keep a thin 1-pixel border or not? The benefit in the border is that you have something (albeit tiny) to grab if you need to resize the window. If you can see yourself stretching the image to suit the screen, you might want to keep it.
However, it sticks around on my machine when I punch the “F” key and blow the image up to fullscreen. So I get a queer gray one-pixel border along the left and top sides of the screen, where the border is being drawn. Irritating!
The setting for that choice is under “Appearance” in ObConf, as the checkmark for “Windows retain a border when undecorated.” Choose wisely, but this is an easy thing to turn off or on. If you need that for a short second or two, turn it on then turn it off. No guilt.
Next, undecorating that window and sticking it to the topmost layer each time you open a movie is also Irritating!. So let’s set MPlayer to always open undecorated, and stuck. Here’s the important part of the $HOME/.config/openbox/rc.xml file that will do that.
<application name="xv" class="MPlayer"> <decor>no</decor> <desktop>all</desktop> <layer>above</layer> </application>
(Note that I hunted down the values for the name and class variables for you. You’re welcome.) Stick that in the applications section of your rc.xml file, and every time MPlayer opens, it will follow those rules.
(You can also preset the X and Y coordinates of the window, and I’ve tried that, but it wasn’t to my liking. I like to position the movie right where you see it there, in the lower right corner of the screen. But each movie has different dimensions depending on the DVD, and so presetting the location sometimes threw the movie off the screen. That meant I ended up moving it anyway, so I might as well just move it the first time, one time. Maybe that makes sense, maybe not.)
A couple of related tips: First, on my Crux system (and on another distro which I can’t remember now), MPlayer didn’t make a point of blocking xscreensaver or the DPMS BlankTime and OffTime settings. Which means if I stop working and just watch the movie, and don’t touch the mouse or the keyboard at all, after about 10 minutes the LCD shuts off, or xscreensaver kicks in.
That too is Irritating!. Therefore, it is necessary to either recompile MPlayer manually (I think) to preset that option (ack! recompile!), or feed it that option in the command line, each time you start it. Rather than recompile, and rather than type
mplayer -stop-xscreensaver mymovie.ogv
at the terminal prompt each time you watch a movie, just add this line to your bash profile … wherever it may be:
alias mplayer="mplayer -stop-xscreensaver"
Log out, log in and it should take effect. Thereafter you can just type “mplayer” and the filename and that alias should do the rest.
One similar point for users of emelfm2 or other file managers, who can right-click on a video file and select a program to open it with. … Edit the filetype for movie files, and add that flag to the MPlayer command option. Works like a charm, and the screen doesn’t go black when Fonzie jumps over the shark.
Finally, and this is really only for people who work on compile-it-yourself distros … don’t forget to compile alsa (assuming you use it) before you compile MPlayer. MPlayer is generally smart enough to check and see if you have alsa on your system before it compiles, and if you don’t, you’ll have no audio playback on your machine. Your sound will work fine, but MPlayer will think you don’t have an audio option, and ignore your attempts to hear Fonzie jump that shark. Silly mistake, huh? Yeah, I’ve done that.🙄
That’s it. Enjoy the rest of the film.