PLAY MOVIES ON OLD AND DECREPIT HARDWARE

And then the lord of I.T. created mplayer and he saw that it was good...

First I'd like to say that I won't be taking credit for this brilliant discovery. I got shown this by my master and I was amazed to find that this player plays most mpeg's wav's, mp3's, avi's (can play DVD's too) all on COMMAND LINE!!! what the hell?!?! AND on S-L-O-W machines to boot. I mean, I'm talking like, you can get away with Piii 450 Mhz with 256MB RAM on it! I even played a certain movie (ahem, which was a completely legally acquired movie I'd like to add) over an FTP server. Hell, we had 4 machines playing the same file simultaneously and not a drop in performance.

Got Pain?
So why do I want to do this to myself? Why the pain and torture? (because you're in I.T. and you LIKE it!) this certain movie file which I played, I tested. I played this file on the same hardware, but I had Windows XP loaded with just about NOTHING, NADA, ZIP running in the background, and the machine struggled with certain scenes with lots of action, explosions (hacking, scrEAMINGggggGGGGG!!! BLOOOD!! MAYHEM, er...) and the XP did not handle very well, however, it NEVER gave a problem running on a linux box in runlevel 3 in CLI. So it makes a good presentation box that does not have to be touched by people that don't know CLI, something that has, for example, a company video playing in a loop in the foyer type thing, and you can do it with that old firewall box you're about to throw out. (or just streaming your endless porn collection at home to scare the neighbors, I know you.) 

Okay, so... Mplayer, you can get it at http://www.mplayerhq.hu/homepage/design7/dload.html TONS of instructions there on how to get and install so I won't regurgitate what they say. Once you have the package, get into root usermode and compile in the same time honored fashion

  1. as root get into the directory you downloaded the tar file
  2. untar your source code (eg. tar -xvf ./Mplayer-1.0pre7try2.tar.bz2) it will extract to a file which you must then navigate into.
  3. type in ./configure && make && make install (as root) and watch the file extract and compile... if it doesn’t work... consider taking up ballroom dancing for a while and then go and check the software requirements on the mplayer site.

There are quite a few system req’s that you will have to get around if your installation fails miserably. I wouldn’t worry if you were running anything above the fedora core 1 series or equivalent.  But be wary of the gcc! Don’t use the 3.0x series of gcc.. it’s quite buggy.. instead, opt for the newer and improved gcc 3.2 and above.. it’s just better. If you wish to avoid the hassle, just yum the software. (what’s yum? Go to www.adeptus-mechanicus.com/codecs/bscyum/bscyum.html) as far as I know, at the time of writing this, gcc 4 ships with fedora core 4 and I had trouble getting mplayer on my machine and I eventually resorted to use yum to install it.

 “No one has ever written, painted, sculpted, modeled, built, or invented except literally to get out of hell”
--
Antonin Artaud

Yes, and on that note, we should now have a working mplayer installation. Get your linuxbox into runlevel 3 by editing the /etc/inittab file. Make sure the id:3:initdefault: line is set to 3 not the default which is 5, (ie, just change the 5 to a 3) restart your machine and upon reboot you will be in runlevel 3 (OH NO! GUI’s GONE!!) in your command prompt you can now prepare to play movies, listen to music, whatever... To get the best results out of mplayer, issue this command in CLI

 mplayer -vo VESA ./<path of file to play here>

 the -vo simply means “video out” and it tells mplayer to play the movie with the VESA drivers. This will play movies at an astounding level of quality on hardware that would have otherwise struggled with it. Playlists, what about playlisting? Yeah, you can do that too...

mplayer -vo VESA ./file1 file2 file3

 Looping?

mplayer -vo VESA ./file1 -loop 4

..will loop file1 4 times. Cool eh? perfect for the corporate foyer...

Streaming it down further!
You can then consider stripping what the box is running totally by pulling things out of the runlevel, you can do this by altering the /etc/rc<x>.d/ (for example /etc/rc3.d for runlevel 3) files (example, your machine most likely will not be running a canna server, so simply move it to an inactive state by doing what I call “changing the S state” eg. In the rc3.d directory, issue

 mv ./S99canna ./s99canna

 upon your next boot, canna will not start up. Do this to all the services you do not need. 

Mplayer is really impressive and I have just hit on the tip of the iceberg amongst its myriad of possibilities. If you have not played with mplayer yet, I recommend you do so. it’s really fun and actually does a whole lot more than some of the stuff out there, a real all-in-one solution. Thumbs up to the mplayer guys...