Next: , Up: Media   [Contents][Index]


53.1 Prerequisites — What do I need to start?

In order to use MM features with SXEmacs you need at least two libraries. One of which is responsible for handling different types of media files, that is parses them, demuxes them and decodes them to a raw form suitable for your audio hardware. The other library cares for the actual audio output, that is takes some raw audio data and feeds it to your speakers (or somewhere else).

In the land of ASCII-arts diagrams this would translate to:

+------------+   +-----------+   +-------------+  +------------+
| media file |   | media lib |   |   SXEmacs   |  | audio lib  |
|------------|-->|-----------|-->|-------------|->|------------|->...
| e.g.       |   | parser    |   | bind to var |  | connect to |
| .wav  .mp3 |   | demuxer   |   | start/stop  |  | soundcard  |
| .ogg  .mka |   | decoder   |   |             |  | and play   |
+------------+   +-----------+   +-------------+  +------------+

As can be seen, MM features will not work if either a media lib or an audio lib is missing. SXEmacs supports a bunch of libraries in either category. We discuss the supported audio libraries, their properties and their availability first, afterwards we discuss the different media handling libraries.

53.1.1 Audio Library: OSS (Open Sound System)

Since OSS was one of the most widespread architectures for audio many of the new generation audio infrastructures support OSS with at least a compatibility layer. For instance PulseAudio provides a tool ‘padsp’, and Esound calls it ‘esddsp’. All these are intended to provide an OSS device emulation for applications which only speak OSS. All read/write accesses are rerouted to the respective audio server.

53.1.2 Audio Library: NAS (Network Audio System)

NAS was one of the audio systems which seized the concept of X-Forwarding for audio data. Hence its name. However, large parts of NAS depend on X which disqualifies it for non-local or tty-only use.

53.1.3 Audio Library: ESD (the enlightenment sound daemon)

Esound is a more decoupled approach but similar to NAS. Furthermore, it provides transparent mixing facilities, applications just connect to the Esound daemon and transfer the stream data, esd itself will downmix the parallel streams and send it to the local sound card. Hence it is well suited for local and network use.

53.1.4 Audio Library: PulseAudio (formerly known as PolypAudio)

PulseAudio is one of the most advanced new-generation audio servers. It is modular, supports local and network connections, provides transparent downmixing of incoming streams (like esd) and is fully compatible to esd. Furthermore, you can use sound in both directions, i.e. record from pulse sources. Pulse provides modules to not only directly attach to local hardware but also to other remotely running pulses or other running audio servers (like jack, esd, etc.).

53.1.5 Audio Library: Jack (a low-latency audio server)

JACK is a low-latency audio server, written for POSIX conformant operating systems such as GNU/Linux and Apple’s OS X. It can connect a number of different applications to an audio device, as well as allowing them to share audio between themselves. Its clients can run in their own processes (ie. as normal applications), or can they can run within the JACK server (ie. as a "plugin").

JACK was designed from the ground up for professional audio work, and its design focuses on two key areas: synchronous execution of all clients, and low latency operation.

53.1.6 Audio Library: ao (generic and portable audio output)

Libao is a cross-platform audio library that allows programs to output audio using a simple API on a wide variety of platforms. It currently supports Null output (handy for testing without a sound device), OSS, ALSA, polypaudio (next generation GNOME sound server), esd (EsounD or Enlightened Sound Daemon), AIX, Sun/NetBSD/OpenBSD, IRIX, NAS

53.1.7 Audio Library: alsa (Advanced Linux Sound Architecture)

53.1.8 Media Library: sndfile

53.1.9 Media Library: ffmpeg

FFmpeg has always been a very experimental and developer-driven project. It is a key component in many multimedia projects and has new features added constantly. New, official "releases" are few and far between. In short, if you want to work with FFmpeg, you are advised to go along with CVS development rather than relying on formal releases. CVS snapshots work really well 99% of the time so people are not afraid to use them.

Sample ‘./configure’-line:

./configure --enable-shared --enable-static --enable-mp3lame \
--enable-libogg --enable-vorbis --enable-theora --enable-faad \
--enable-faadbin --enable-faac --enable-xvid --enable-x264 \
--enable-a52 --enable-a52bin --enable-dts --enable-pp \
--enable-amr_nb --enable-amr_wb --enable-amr_if2 \
--enable-pthreads --enable-gpl

53.1.10 Media Library: mad

MAD is a high-quality MPEG audio decoder. It currently supports MPEG-1 and the MPEG-2 extension to lower sampling frequencies, as well as the de facto MPEG 2.5 format. All three audio layers – Layer I, Layer II, and Layer III (i.e. MP3) – are fully implemented.

MAD does not yet support MPEG-2 multichannel audio (although it should be backward compatible with such streams) nor does it currently support AAC.

53.1.11 Media Library: SoX

53.1.12 Media Library: xine

53.1.13 Media Library: gstreamer

53.1.14 Built-in media file handling


Next: , Up: Media   [Contents][Index]