ad info




CNN.com
 MAIN PAGE
 WORLD
 ASIANOW
 U.S.
 LOCAL
 POLITICS
 WEATHER
 BUSINESS
 SPORTS
 TECHNOLOGY
   computing
   personal technology
   space
 NATURE
 ENTERTAINMENT
 BOOKS
 TRAVEL
 FOOD
 HEALTH
 STYLE
 IN-DEPTH

 custom news
 Headline News brief
 daily almanac
 CNN networks
 CNN programs
 on-air transcripts
 news quiz

  CNN WEB SITES:
CNN Websites
 TIME INC. SITES:
 MORE SERVICES:
 video on demand
 video archive
 audio on demand
 news email services
 free email accounts
 desktop headlines
 pointcast
 pagenet

 DISCUSSION:
 message boards
 chat
 feedback

 SITE GUIDES:
 help
 contents
 search

 FASTER ACCESS:
 europe
 japan

 WEB SERVICES:
COMPUTING

Getting a handle on RIFF audio and video formats

August 6, 1999
Web posted at: 3:11 p.m. EDT (1911 GMT)

by Mark Gibbs

From...
Network World Fusion
digital music

(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.
MORE COMPUTING INTELLIGENCE
IDG.net   IDG.net home page
  Network World Fusion home page
  Free Network World Fusion newsletters
 Reviews & in-depth info at IDG.net
 *   IDG.net's bridges & routers page
  IDG.net's hubs & switches page
 *   IDG.net's network operating systems page
  IDG.net's network management software page
  Year 2000 World
  Questions about computers? Let IDG.net's editors help you
  Subscribe to IDG.net's free daily newsletter for network experts
  Search IDG.net in 12 languages
 News Radio
 * Fusion audio primers
 * Computerworld Minute
   

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

Managing the flow of streaming media
August 6, 1999
Top 10 video tools
April 13, 1999
Top 10 sound tools
February 24, 1999
Breaking the PC sound barrier
November 30, 1998

RELATED IDG.net STORIES:
Managing the flow of streaming media
(Network World Fusion)
Edit video over the Web
(PC World Online)
More jobs for streaming media
(PC World Online)
Microsoft's Windows Media Services offers free streaming
(InfoWorld Electric)
Web conferencing tool uses streaming media
(PC World Online)
Note: Pages will open in a new browser window
External sites are not endorsed by CNN Interactive.

RELATED SITES:
Asymetrix
Adobe
Note: Pages will open in a new browser window
External sites are not endorsed by CNN Interactive.
 LATEST HEADLINES:
SEARCH CNN.com
Enter keyword(s)   go    help

Back to the top   © 2001 Cable News Network. All Rights Reserved.
Terms under which this service is provided to you.
Read our privacy guidelines.