Linux Sound and Video

I have a Soundblaster16 card with no special features, but I would like to be able to play every sound format, as well as every video format possible. This page was made way back when (1995, I think), and has not been well-updated.

I'm only interested in the user-level sound and video players. If you're interested in kernel support, you should look elsewhere. You might start with Alan Cox's page on The Linux Sound System.

Sound formats

CD audio

CD audio has virtually nothing to do with the sound drivers. The CD drive sends the audio through a special cable directly to the sound card. All the sound card controls is the input gain on the CD audio (along with the speaker volume). Hence, you don't need a kernel with a sound driver to play CD audio. Also, whether or not you can play CD audio has nothing to do with whether your sound driver is configured correctly.

Success stories

Standard (8000Hz) .au files
cat >/dev/audio
Example: (15K)
Nonstandard sample-rate .au files
sox -r 8000 -t .au /dev/audio
Example: none
(I have some 8012Hz files, but you can't hear the difference when you cat them to /dev/audio. I've seen some that have very different sample rates, though.)
.mod files
mikmod sample.mod
Example: at_t.mod (379K)
Many examples at
.669 files
mikmod sample.669
Example: crystals.669 (27K) [from]
.s3m files
mikmod sample.s3m
Example: dreams2.s3m (108K)
.mtm files
mikmod sample.mtm
Example: k_progr.mtm (53K)
.xm files
mikmod sample.xm
Example: k_vortx3.xm (596K)
.mid or .midi files
playmidi -f sample.mid
Example: 5thsymp.mid (24K)
Numerous additional examples
Note: A few seem to play at the wrong speed. I'll try to get a solid example of this.
Note: On my Red Hat box, I have to manually `modprobe opl3` to get it to work.
For a full-featured graphical midi editor and player, check out Midi Mountain.
.mp3 files
I use mpg123.
This is the hottest format going, and is especially popular for encoding audio from CDs. You should have no problems finding a wealth of players, CD rippers, encoders.
.wav files
wavplay sample.wav
Example: bnsg.wav (631K)
.wav files
wavplay 0.2 reports "wrong length difference."
vplay works, but doesn't automatically recognize that it's recorded at a higher sample rate (try vplay -s 11000 to hear it about right).
Example: mchocola.wav (31K)
I've received an explanation of why wavplay 0.2 won't play it.
wavplay 1.0 and later play it perfectly!
.aiff files
sox -t .aiff sample.aiff -t .ul -r 8000 /dev/audio
(sox solution by Joseph W. DeVincentis)
I found this example at Disney's server.
Example: TSTease.aiff (969K)
You have to download their proprietary software
.voc files
vplay sample.voc
sox sample.voc -t .au /dev/audio
Example: buzzer.voc (10K)


This is a proprietary Microsoft format competing with Real Audio. I don't know of any players, and I doubt that they have released sufficient documentation to write one, not to mention that they probably used patented compression algorithms.


I don't have examples of these formats:
Impulse Tracker
For information on this format, please visit the Official Impulse Tracker page. I'm told that mikmod will play these files, but I haven't verified it.
I hear that it's probably a similar situation to RealAudio.
I'll believe they really exist when I see examples. :)

Video formats

Success stories

In short, xanim 2.70.3 with optional codecs plays all formats for which I have examples.
.mpg MPEG-1 files without sound
mpeg_play sample.mpg
Example: legoshay.mpg (678K)
.mpg MPEG-1 files with sound
mtvp sample.mpg
.avi files (with or without sound)
xanim sample.avi
Example: legodrgn.avi (577K)
.mov files [QuickTime] (with sound)
xanim (xanim
Example: (1632K from Bill Nye the Science Guy)
.mov files [QuickTime] (with sound)
xanim fails, but 2.70.3 with the two additional object libraries works.
Example: (1512K)
.flc (no sound)
xanim 2.70.3 plays most of them.
Example: spider.flc (230K)
.flc (no sound)
xanim 2.80.0 plays some that earlier versions failed on
Example: explode.flc (ftp source)


I'm told that it's a real-time video format that requires proprietary software which is not currently available for Linux. Of course, I don't have an example, so it doesn't count.
QuickTime includes a number of encoding methods, only some of which are supported.
Like QuickTime, AVI files can use many different encoding methods, only some of which are supported under Linux.


I'm pretty sure that there are ways of playing these, but I haven't investigated it yet.
There must be more...


The software that I refer to in this page can be downloaded via the following pages



Mime Types

If you want to integrate the above audio or video formats with your web documents or browser, you'll need to configure the correct mime types. Web servers send a mime type with every document. Usually they correctly identify .wav and .au files, but they may have some trouble with the less common formats. If it doesn't send the right mime type, there's no way to configure most browsers to figure it out.

Some servers allow you to add types on a per-directory basis. I've done that for the sample files here. I have no idea what the correct types really are, but the most important thing is that they correctly identify as audio/* or video/*. You can then configure your browser to call a script for any audio or video format which will then call the appropriate helper based on the file extension.

So for my configuration, I've used our server's ability to add mime types. For audio, I use my own script installed as ~/bin/showaudio.

If you know of an additional format that I don't list, please let me know, and include a URL for an example. Contact me at: