OS/2 2.1 Multimedia

by Maria Ingold

Note: This article was actually written before the article OS/2 2.1 Multimedia — From In-the-Box to Video In, however, due to publishing delays, it came out after. I recommend that you read OS/2 2.1 Multimedia — From In-the-Box to Video In as it is better written, more up-to-date and more complete (including additional images and tables).

Imagine a world where personal computers greet their users with the blare of trumpets, let them look at a sound and manipulate it, play a music CD without ever turning on the stereo, and receive video help on an application without adding any extra hardware. World of the future? No, all these capabilities are provided today by OS/2TM 2.1 and its built-in multimedia support, previously the separate Multimedia Presentation Manager/2 (MMPM/2) product, now the standard multimedia architecture for OS/2 2.1. OS/2 2.1 Multimedia takes full advantage of OS/2 2.1, includes both audio and video applications, and has an application programming interface which provides hardware independence to application software and is extensible for the future.

Provided with OS/2 2.1 Multimedia are a set of audio and video applications which serve two purposes: One, they provide immediate multimedia functionality to the user of OS/2 2.1, and two, they provide examples of what can be accomplished using the MMPM/2 architecture as a programming base.

OS/2 2.1 Multimedia Audio

The OS/2 2.1 Multimedia base audio applications are composed of:

  • CD Player
  • Digital Audio Player/Recorder/Editor
  • Macros for Lotus and Excel
  • MIDI Player
  • System Sounds

The CD Player (with the music CD of your choice) provides capabilities similar to those on a home stereo, and works with all OS/2 2.1 supported CD ROM drives. The standard functions of playing, cueing, ejecting, skipping tracks, displaying current track and time into track, as well as the more advanced functions of editing tracks out of a play sequence, automatic play, repeat, and shuffle are present. In addition to these normal functions, the software CD Player provides the ability to catalog CD titles and display that title whenever the CD is loaded. There is also a software eject button, and if a CD is ejected, a graphic appears instructing the user to insert a CD. Furthermore, digital transfer of data from the CD ROM through a sound card is possible if the card supports CD quality, i.e. 16 bit stereo at 44.1 kHz, and the CD-ROM is able to stream digital data. This enables the CD ROM to use the Digital Signal Processor (DSP) on the card, as it may be better than its own internal one. The CD audio output is then piped out the card’s speaker jack, thus maintaining a higher quality of sound.

No CD

Digital Audio enables playing, recording, and editing of a waveform file. A waveform is the digital representation of audio (sound waves). This sound wave, which is analog and therefore continuous, needs to be encoded by taking discrete samples of the wave in order to be stored digitally in a waveform file.

Of these various encoding methods, Digital Audio plays Pulse Code Modulation (PCM), Adaptive Differential Pulse Code Modulation (ADPCM), A-Law, and Mu-Law. Supported file formats include RIFF Wave and Creative Labs Voice Files (VOC). The Workplace ShellTM (WPS) feature of dragging and dropping a waveform file onto the application is also supported. RIFF Wave PCM files are able to be displayed graphically, and hence, in addition to playing or recording into the whole file, selected ranges of the file can be played, recorded into, or edited.

Digital Audio supports recording in either stereo or mono, at a sampling rate of 11.025 kilohertz (kHz), 22.05 kHz, or 44.1 kHz (voice, music, and CD quality respectively), and with a sampling precision of 8- or 16-bit. If the sound card does not support a particular capability, the option to do this in Digital Audio will not be available. Since some sound cards do not provide all the aforementioned capabilities, Digital Audio enables audio quality conversions for PCM files by selecting the entire file, copying it into the clipboard, changing the aforementioned settings, and pasting the original into a new file.

As PCM files are able to be displayed graphically, cut, copy, and paste of an entire file, or selected regions, are done much like an editor. In addition to these features, special effects such as mix from file or clipboard, volume change, speed change (comparable to monster and chipmunk), fade, reverb, reverse, and echo can be applied to the whole, or a part of it.

Digital Audio

The Lotus and Excel Macros add audio enablement to a spreadsheet. These macros are available for 16-bit versions of both as well as for the 32-bit version of Lotus. By adding this audio capability, numeric information can be clarified by recording comments into the cells, which can then be played back. When the macro is started, it adds an “Audio” option to the menu bar, from which play and record can be selected. The record option brings up a small graphical recorder, and audio can be added from the microphone, using the record button, or pasted in from the clipboard by selecting paste from the system menu pulldown. The mini recorder is useful for quick comments, while pasting is advantageous because the Digital Audio application can be used to record the file, and then to add effects to it.

The MIDI player allows playback of MIDI (Musical Instrument Digital Interface) files from a selected position. The MIDI player is actually a generic media player that can dynamically change its device type depending on the type of file that is loaded. The device type determines if record and other options are enabled.

MIDI Player

System Sounds allow waveform files to be associated to different system events. This is both fun, as a favorite song clip could be played on startup, and educational, where audio help can be associated to actions, such as the shredder announcing that “This file will be obliterated if it is dropped here.” System Sounds also recognizes files created using the Tune Editor, which outputs DOS beeps at the appropriate frequency. Using this enables system sounds to play through the computer’s speaker, even if there is no sound card.

Sound Settings

With the exception of the Tune Editor, the one thing that all these audio applications have in common is that they need to be played through an audio card in order to be heard. The three boards supported by MMPM/2 are the Creative Labs Sound BlasterTM series (SB), the IBM Audio Capture and Playback AdapterTM (ACPA or M-Audio), and the Media Vision Pro Audio Spectrum 16TM (PAS 16).

Additionally, multimedia-enabled REXX provides command line or batch file support for playing and recording sound and playing movie files. As an example, a useful application of this would be adding the playback of an audio clip to the end of a compile batch file to let the programmer know when the compile is done.

OS/2 2.1 Multimedia Video

The OS/2 2.1 MMPM/2 based applications which provide video support are: Digital Video Player, and The Video In Recorder; and Ultimedia Builder/2, workshop products that supports Ultimotion and Indeo.

The Digital Video Player, available as part of the base product uses software-only decompression algorithms; therefore, no additional video hardware is necessary to play a movie. This means that anyone using a machine with OS/2 2.1 installed has the capability to play video. The Digital Video Player uses the generic media player interface as a control panel and displays the movie in a separate playback window. This window’s system menu contains several additional video-specific menu options. One of these, “Movie info”, contains information about the file name, compression type, frame size, frame rate, data rate, and running time. Additionally, Double Size and Half Size are available on most SVGA and XGATM systems. These options would make a 320×240 movie play at 640×480 or 160×120 by adding and removing pixels respectively.

Video Player

OS/2 2.1 uses the AVI file format as its standard for video. AVI is a file format that contains compressed video or animation data. The compression shows the name of the CODEC (Compressor/Decompressor) used to record the movie. UltimotionTM and IndeoTM, amongst others, are CODECS (Compressor/Decompressor) that come with OS/2 2.1.

The frame size is the size at which the movie was recorded. It is given as width times height in pels. The maximum frame size is hardware dependent, for example, 640×480 pels. The frame is then recorded at a ratio of this size, say 2:1 or 320×240 pels. It is this value which is the frame size.

The frame rate is the number of frames per second (FPS) at which the movie was recorded. When recording, although the card may be set up to grab an image at up to 30 FPS, the compressed image output can be recorded at another rate, for example, 12 or 15 FPS. This value is the given frame rate. The actual rate of playback on a system depends, however, on the processing capabilities of the system, as well as the complexity of the CODEC used to create the movie.

Data rate is given as the maximum number of kilobytes (KB) used by a secondof the movie, and hence is given in KBS. This data rate is composed of the peak amount of KBS utilized by both audio and video. For example, a data rate of 100 KBS, may consist of 22 KBS audio, and 78 KBS of video. An average Ultimotion movie of320x240 pels x 15 FPS at 64K colors takes up 9 megabytes (MB) per minute, or 150 KBS, the same data rate needed for single speed CD ROMS.

Movies can be recorded in two ways: frame-step or real-time. Frame-step capture requires stepping through the movie frame by frame, as from a laserdisk. This enables the CODEC to spend more time on each frame, and hence, a better compression, and higher data rate is achieved. Real-time capture is done from a live video source, and compresses the image immediately. Since less time is spent analyzing each image, the frame size is smaller in order to achieve single-speed CD ROM data rates.

The capture capability is provided in a separate MMPM/2-based video workshop product, which will be available shortly. The Video Recorder/Editor allows the specification of the CODEC, frame size, frame rate, data rate, and recording method (real-time or frame-step). Furthermore, the video image may be adjusted in brightness, color, contrast, and tint. As an editor, still image capture into a bitmap and cut, copy, and paste of video are possible. Also provided is the ability to make movies from raw video files and bitmaps.

Since the actual video compression is done in software, only a simple “frame-grabber” card is necessary to capture the image. The four video capture devices that are currently supported are the Creative Labs Video BlasterTM , the IBM Video Capture Adapter/ATM (VCA), the Jovian Super Video Input AdapterTM (SuperVIA or S-VIA), the Sigma Designs WinMovieTM , and the Jovian Quick Video Input AdapterTM (QuickVIA). The card’s attributes are listed in the following chart. The Video Blaster is the only card which supports video overlay, and uses YUV411 color instead of RGB16, which is used by the other cards. They range in price from $200 to $600 based on their capabilities and their manufactures.

In addition to the Video Recorder/Editor, an AVI File Utility is included in the video workshop products. This utility, among other things, provides the ability to browse AVI file header information, and to merge, split, interleave, and skew audio and video data.

Going Further with OS/2 2.1 Multimedia

OS/2 2.1 Multimedia, with its ability to fully utilize the OS/2 2.1 architecture, and its support of Workplace Shell functions, such as drag and drop, provides the OS/2 user with the immediate ability to extend his or her everyday operations into the realm of multimedia. To go beyond this, Ultimedia Builder/2, a MMPM/2-based product, allows the integration of audio, image and video to create presentations. As MMPM/2 provides the multimedia base architecture for other applications, the OS/2 2.1 Toolkit provides the necessary header files and libraries to program additional applications or extensions with MMPM/2 architecture. Sample programs and their associated C code provide examples for the programmer to follow. Not only is OS/2 2.1 Multimedia providing multimedia applications for use today, MMPM/2 is ensuring the extension of multimedia into the future.

Trademarks

IBM Audio Capture and Playback Adapter, IBM Video Capture Adapter/A, OS/2, Ultimedia Builder/2, Ultimedia Perfect Image/2, Ultimotion, Video In, Workplace Shell, and XGA are trademarks of International Business Machines Corporation

Indeo is a trademark of Intel Corporation

Creative Labs Sound Blaster, and Creative Labs Video Blaster are trademarks of Creative Labs, Inc.

Media Vision Pro Audio Spectrum 16 is a trademark of Media Vision

Pioneer Laserdisc is a trademark of Pioneer Electronic Corporation

Jovian Super Video Input Adapter, and Jovian Quick Video Input Adapter are trademarks of Jovian Logic Corporation

Sigma Designs WinMovie is a trademark of Sigma Designs Corporation

Glossary

ACPA IBM Audio Capture Play Back Adapter
ADPCM Adaptive Differential Pulse Code Modulation
AVI Audio Video Interleaved is a file format, which arranges audio and video data chunks in a file.
CODEC Compressor Decompressor. The algorithm by which an image is compressed and decompressed. This may be done in hardware and/or software.
DSP Digital Signal Processor.
FPS Frames per second.
ISA Industry Standard Architecture
Interleave In this context, the combining and synchronizing of audio and video data.
KBS Kilobytes per second.
kHz kilohertz. Thousands of cycles per second.
M-Audio See ACPA
MC Micro Channel architecture
MIDI Musical Instrument Digital Interface
MMPM/2 Multimedia Presentation Manager /2
pels Also referred to as pixels. Both acronyms were derived from the words “picture element”. This is the smallest element on the display which can be independently given both color and intensity.
PAS Pro Audio Spectrum
PCM Pulse Code Modulation
Raw Movie An uncompressed AVI movie file.
RIFF Resource interchange file format
SVGA Super Video Graphics Adapter/Array
S-VIA Jovian Super Video Input Adapter
VCA IBM Video Capture Adapter
Waveform A waveform is the digital representation of audio (sound waves).
WPS Workplace Shell
XGA eXtended Graphics Array adapter

References

IBM Multimedia Presentation Manager/2 Application Programming Guide, Release 1.1., IBM Corporation, 1993.

Ultimedia Video In User’s Guide, Release 1.0., IBM Corporation, 1993.