kids encyclopedia robot

FourCC facts for kids

Kids Encyclopedia Facts

A FourCC (which stands for "four-character code") is like a special, short name made of four characters. These codes are used to uniquely identify different types of computer data, especially in file formats. Think of them as a quick label that tells a computer what kind of information is inside a file.

The idea for FourCCs started with classic Mac OS (an old Apple computer system) where they were called OSType or ResType. Later, this clever idea was used by Electronic Arts for their Interchange File Format (IFF) and then by other companies like Apple and Microsoft for many different file types.

How FourCCs Started

In 1984, the very first version of the Macintosh operating system, called System 1, came out. This system used special codes to identify different parts of a file, like what kind of file it was or which program created it. These codes were unique and helped the computer understand the data.

A year later, in 1985, a company called Electronic Arts created a new way to organize files called the Interchange File Format (IFF). This format was first used on the Amiga computer. IFF files were made of small sections called "chunks," and each chunk had a four-byte ID at the beginning. This ID was exactly like the FourCC idea, and Electronic Arts even said they got the idea from Apple!

This IFF format became very popular. Apple used it for their AIFF files (for audio), and Microsoft used it for RIFF files. RIFF files became the base for common formats like AVI (for videos) and WAV (for audio). Apple called many of these codes OSTypes, while Microsoft and Windows developers called them FourCCs. Microsoft also used FourCC codes to identify data in their DirectX system, which is used for games and multimedia.

FourCCs in Apple Systems

For a long time, Apple computers used OSType codes as the main way to tell what kind of data a file contained. However, since Mac OS X Panther (an older version of macOS), Apple started using file name extensions (like .txt or .jpg) more often to identify file types. Even though file extensions are now more common, OSType codes are still part of how Apple systems understand files.

How FourCCs Work

FourCCs are usually made up of four printable characters, which are the letters, numbers, and symbols you see on a keyboard. Sometimes, if a code is shorter than four characters, spaces are used to fill the extra spots. For example, 'DIVX' is a FourCC for a video type.

These codes are useful because they are short and easy for computers to process. They can also be easy for humans to remember if they spell out something meaningful, like "mp4a" for MP4 audio. This helps programmers quickly understand what kind of data they are working with.

Common Uses of FourCCs

One of the most common places you might find FourCCs is in AVI video files. They are used to identify the video codec (the way the video is compressed). For example, DIVX, XVID, and H264 are all FourCCs that tell a video player how to play the video.

For audio in AVI and WAV files, a two-byte code is used, often written in hexadecimal (like 0055 for MP3 audio). In QuickTime files, these two-byte codes are often combined with "ms" to make a FourCC. RealMedia files also use four-character codes, but they might be different from those in AVI or QuickTime.

Four-character codes are also used in other areas beyond just file formats:

  • In Standard MIDI File (SMF) format, which is used for music instruments.
  • In the PNG image file format.
  • In the 3DS (3D Studio Max) file format for 3D models.
  • In ICC profile formats, which help ensure colors look the same on different devices.

Other uses for these types of codes include:

  • Identifying different parts or events within Apple's system programs.
  • Helping to manage different software components.
  • Identifying specific sections (called "atoms") in QuickTime movie and image files.
  • Identifying standard folders on a computer in a way that works no matter what language the computer is set to.

See also

Kids robot.svg In Spanish: FourCC para niños

kids search engine
FourCC Facts for Kids. Kiddle Encyclopedia.