Continuous Media Toolkit

This tree contains the freely distributed Continuous Media Toolkit form the Berkeley Plateau Multimedia Research Group. This toolkit allow rapid prototyping and building of distributed multimedia applications. Data formats currently supported include: Motion JPEG, MPEG-I, and 8 kHz ulaw audio (SPARC audio). Output devices currently supported are: J300, Parallax, SunVideo, X with software decoding, AudioFile, and raw SPARC /dev/audio devices.

The system has been compiled and preliminarily tested on the following platforms:

Sun SPARC (SunOS 4.X, X11R5)
Sun SPARC (Solaris)
HP 700 series workstations (HPUX 9.X, X11R5)
Dec Alpha (OSF/1)
If you decide to port the code to a new architecture or enhance the performance of the code, please let us know so that we can incorporate the changes into our sources.

What follow is an overview of the toolkit:

1) What is the Continuous Media Toolkit?

The Continuous Media (CM) Toolkit is composed of two programs, named cmsh and cmwish. These programs are modified Tcl/Tk interpreters that have CM objects compiled into them. A CM object is able to deal with a specific continuous media data type and perform specific functions. For example, the mpegSegment object is able to read MPEG data from files on disk and stream the information to another object. Applications are built using cmsh and cmwish that create and connect CM objects togethor in order to construct "pipelines" through which multimedia information flows. Currently, the toolkit is distrubuted with one application, cmplayer, that handles remote playback of video and audio.

2) What is the difference between cmsh and cmwish?

Cmwish is a full Tcl/Tk interpreter with Tcl-DP and the new CM objects compiled into it. Cmsh does not have a full Tk package. Instead, it may or may not create a connection to the X server (this is a runtime option), it does not create a window nor does it know about graphical widgets. In addition, the only CM objects it knows about are objects that do not require an X server or any other sort of graphical object. The cmsh is designed to be run on video file servers to stream information across the network.

3) What is cmplayer?

Cmplayer is an application that utilizes the CM Toolkit for remote or local video and audio playback. Cmplayer uses a script format to indicate which video and audio clips should be played. The video and audio clips are specified using the cmtp URL. Documentation on the cmpt URL, how it is resolved, and how it is used is provided in the CM Toolkit Introduction document.

4) What kind of continuous media data can be accessed?

Currently, the system supports three stream types:

Sparc audio
This data type is the same as a SPARC audio file. These objects work best with 8kHz ulaw data, but there is some support for 8 bit linear and 16 bit linear audio as well.
Motion JPEG streams
This data type is produced by a variety of JPEG video boards including the Parallax XVideo board (.vid files), and the DEC J300 board (.avi files). In addition, the system can handle a file with a sequence of JFIF frames as if it were a Motion JPEG stream.
MPEG video streams
This data type is just a standard MPEG-I video only stream. We currently do not handle interleaved streams or streams with MPEG-I system streams.
Objects for other stream types are being implemented and some objects for other stream types may exist. We would be happy to incorporate new objects for stream types not currently handled.

Although the objects that read these video types can read data as it currently exists, it must parse through the data an construct tables about the positions of frames in the file and other information. To avoid doing this expensive operation every time the data is accessed, we have come up with file formats that encapsulate the data with the various tables pre-computed. We call these files chunk files.

5) What is a chunk file?

A chunk file is a data file that has had format specific information pre-parsed out stored in various tables and headers. A chunk file consists of one or more "chunks" that are organized for quick parsing and searching. Embedded as a chunk is the original data file. Utilities exist for creating chunkfiles from XVideo .vid files, J300 .avi files, MPEG-I video files, and 8kHz ulaw files. These utilities exist in the directory "utilities".

6) What is a cmplayer script?

A cmplayer script is a Tcl script that indicates which streams to play. The script format is discussed in more detail in separate documentation. One feature of the script format is the use of cmtp URL to specify the location of files. A cmtp URL has the following form:

cmtp://<host_name>?:<port>?/<file_name>

The cmplayer resolves this URL by contacting <host_name> at the port number <port> and issuing a specific command asking for the URL to be translated. The result of the command can either be a tuple indicating which cm process to contact and the actual filename or another URL that is resolved again. In this way, the cmplayer can utilize location independent scripts where the actual data is managed by some external agent (perhaps a video-on-demand system).

7) How should I start?

Start by reading the CM_Intro.ps document found in doc/book. This document covers in more detail the various aspects of the toolkit. Example code is located in doc/examples. These examples will give you a good flavor for how quickly prototype applications can be built. The man pages in doc/man provide more object specific information. In addition, a full set of documentation is provided in html format in the directory doc/html.