Linux Step By Steps


The SDL MPEG Player Library

By Larry Hignight
last updated Oct. 2, 2000

Late Breaking News: New SDL and smpeg files became available as I was nearing complettion of this SxS guide. I've been busy with work and configuring LTP. As soon as I get a chance I will test the new files for compatibility with LTP. If your not comfortable installing and uninstalling rpm files I would suggest using the files suggested below. I will be uploading them to the contrib section of and keeping copies of those versions as well. Although I haven't had time to finish a write up Maelstom and Mad Bomber are two good 'classic' arcade games. Have fun and I'll finish this up soon. you may want to try the new


SMPEG is an excellent command line based mpg player, reminescent of mpg123, that has been openly developed at Loki Games. Please go to for more information. Besides being a fairly easy install, it is IMHO a better mpeg player then either MpegTV, which has a tendency to not exit the system cleanly; or aKtion!, which suffers from skipped frames and bad rendering. This SxS is geared for the beginner/novice, who may not have much experience with a command-line yet. The veterans out there will be able to just scan this SxS and install the files.

In order to run SMPEG, you'll first need to install the Simple DirectMedia Layer at While you're there take a look at some of the other appliations, games, and demos that are available for this library. For purposes of this SxS, we will only be installing the main SDL library rpm. If you interested in installing the entire set of SDL libraries refer to the Simple Direct Media Layer SxS which covers the installation of all the libraries and includes notes on some of the other programs available at the SDL website.

System notes and pre-installaiton check

These instructions assume a full installation of Caldera eDesktop 2.4. Although this step by step guide may work with some of the other installation options, I haven't tested it. I will also assume that you have a working internet connection and a couple of .mpg (or .mpeg) files available to test playback.

Throughout this document, I will be using the following syntax for commands that are to be entered into a shell.

# Type these lines into a shell

You may want to check if either SMPEG or the sdl library is already installed on your computer. From a terminal issue the following commands.

# su
# rpm -qa | grep smpeg
# rpm -qa | grep SDL

Download and Installation Instructions

1. You'll need to go to the following sites and download the source rpm files. for the older tested files.

Alternatively, the newer files are at

At the time of this writing, these were the most current versions:


2. We need to build the SDL library first. From a shell, issue the following commands in the same directory as the files.

# su
# rpm --rebuild SDL-1.1.4-1.src.rpm

Watch the screen for any error messages (especially towards the end). Now were going to verify that the rpm files were built.

# cd /usr/src/OpenLinux/RPMS/i386
# ls

You should see the newly built SDL and SDL-devel rpm's. To install both rpm's simply type the following from the current directory.

# rpm -Uvh SDL*

3. Now we need to change back to the directory with the smpeg source rpm, build it, and then verify that this rpm file was built.

# cd /home/~user Be sure to substitute the correct directory here
# rpm --rebuild smpeg-04.0-1.src.rpm
# cd /usr/src/OpenLinux/RPMS/i386
# ls

For those lacking experience with a the Linux command line, you can use the tab key to autofill in a lot of directory and file names. For example, instead of completely typing out O-p-e-n-L-i-n-u-x try O-p-[tab]. This will fill in the rest of the directory name unless there is a second directory or file that begins with O-p. With some practice, you'll soon be moving, coping, etc., much faster then the 'mouse monkeys'. Also remember that Linux is case sensitive, so OpenLinux is not the same thing as openlinux. Capitilization does matter.

Now we'll install the smpeg rpm files.

cd /usr/src/OpenLinux/RPMS/i386
# rpm -Uvh smp*

Testing the Installation

It's now time to test the smpeg player.

# exit
# cd /home/~user

(or another directory with mpg files)
# plaympeg filename.mpg

If the installed worked, you should now have excellent quality mpg video with sound. For a list of the command line options,

# plaympeg -h

Have fun with your new mpeg player, and be sure to check the SDL SxS for more SDL related applications.