|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Getting a handle on RIFF audio and video formats
(IDG) -- Multimedia has become one of the driving forces of our industry. And underneath it all is a cornucopia of technology, some of which may surprise you. For example, one of the most common standards for multimedia data is Microsoft's Resource Interchange File Format (RIFF). "RIFF?" you may be saying, "Never heard of it!" Au contraire, my friend, you have come across it in the guise of Waveform (WAV) audio content and Audio Video Interleave (AVI) video files. Actually, many types of content can be encoded in RIFF format: Bitmapped image data as RDI files, MIDI musical data as RMI files, and collections (called bundles) of RIFF files as BND files. But it turns out that the only RIFF-type formats that have been implemented are AVI and WAV.
RIFF files are binary files built from multiple nested data structures called "chunks" (think of a bag holding two or three bags that each contains different items). Each chunk starts with an ID marker to identify the data followed by a value giving the size of the chunk data. After that comes the actual data. The largest chunk (the biggest bag) identifies the content as being in RIFF format. If the data is in little-endian ordering (the least significant byte is in the lowest address in a multibyte value) the ID marker reads "RIFF" while big-endian ordering (the opposite of little-endian) reads "RIFX." (There is no ID for middle-endian ordering, but because that died with the likes of Digital's PDPs, it probably doesn't inconvenience anyone.) WAV files are simple. They are uncompressed 8- or 16-bit sound samples prefaced by a header that declares the data to be of WAV type and the specification of how the audio data is formatted. The header usually specifies Pulse Code Modulation (PCM), which represents the sound as a sequence of sampled values. Other WAV chunks specify the sample rate used - typically 11,025 sample/sec for telephone quality, 22,050 sample/sec for radio quality, or 44,100 sample/sec for CD quality. (All you telco types please note that is samples, not bits, per second.) The chunks also state the number of audio channels, which is usually one (for mono), while two (stereo) is not uncommon. It is possible to encode up to 65,536 channels (death by surround sound, perhaps). In an AVI file, the chunk inside the RIFF chunk has an ID of "AVI" and contains subchunks that describe the parameters of the movie as well as the movie frames and audio data (in WAV format). We don't have the space to go into the parameters in detail as there are a lot of them required to define the contents, but they include the time delay between frames, number of frames stored, and the height and width of the video frame. Working with AVI is easy - there are plenty of tools to simplify conversion to and from other formats such as MPEG and MOV. Converting video tape to AVI format is supported by a range of image capture boards. Editing of AVI is also straightforward using tools such as Adobe Premier (www.adobe.com), although you would be advised to use the fastest platform you can lay your hands on. There are also many graphics applications that output AVI files directly. Gearhead has had great success with Asymetrix Web 3D (www.asymetrix.com), which provides a simple and effective drag-and-drop 3D animation environment.
RELATED STORIES: Special: MP3 RELATED IDG.net STORIES: Managing the flow of streaming media
RELATED SITES: Asymetrix
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Back to the top |
© 2001 Cable News Network. All Rights Reserved. Terms under which this service is provided to you. Read our privacy guidelines. |