kids encyclopedia robot

FLAC facts for kids

Kids Encyclopedia Facts
Quick facts for kids
Free Lossless Audio Codec
FLAC logo vector.svg
FLAC 1.4.0 screenshot.png
Developer(s) Xiph.Org Foundation, Josh Coalson, Erik de Castro Lopo
Initial release 20 July 2001; 23 years ago (2001-07-20)
Stable release
1.4.3 / Error: first parameter is missing. ()
Written in C, C++
Operating system Cross-platform
Type Codec
License Command-line tools: GNU GPL
Libraries: BSD
Free Lossless Audio Codec
Filename extension
.flac
Internet media type
audio/flac
Uniform Type Identifier (UTI) org.xiph.flac
Magic number fLaC
Type of format Lossless audio
Open format? Yes
Free format? Yes

FLAC (which stands for Free Lossless Audio Codec) is a special way to store digital music. It's like a super-efficient way to pack audio files. FLAC makes audio files smaller, but without losing any sound quality.

Imagine you have a big music file. FLAC can shrink it to about half its original size. When you play it, it sounds exactly the same as the original. This is because FLAC is a lossless format. It means no information is thrown away when the file is made smaller.

FLAC is also an open format. This means anyone can use it without paying fees. It's also free software, so the tools to use it are available to everyone. FLAC files can also store extra information like album art and song titles.

The Story of FLAC

The idea for FLAC started in the year 2000. A person named Josh Coalson began developing it. The first official version, 1.0, came out on July 20, 2001.

In 2003, FLAC joined the Xiph.Org Foundation. This group is known for creating other free audio and video formats. These include Vorbis and Opus.

Later, in 2013, the development of FLAC moved to a new online home. In 2019, people even suggested FLAC become an official internet standard.

How FLAC Works

FLAC is designed to perfectly save digital sound. It takes the original sound data and makes it smaller. But it does this without losing any of the original details.

Inside a FLAC File

Every FLAC file starts with a special code: `fLaC`. This code tells computers it's a FLAC file. After that, there's information about the music itself. This is called metadata. Finally, the actual encoded audio data follows.

The audio data is split into small parts called frames. Each frame has a header, which is like its ID card. It tells you things like how many sound samples are in the frame. It also says where the frame is in the song.

The metadata at the beginning of the file holds important details. This includes the sample rate (how many sound samples per second). It also stores the number of audio channels (like stereo sound). You can even find album cover art stored here.

Making and Playing FLAC Files

When you make a FLAC file (this is called encoding), the sound is first broken into blocks. If it's stereo sound, each channel (left and right) is handled separately. The encoder then tries to find a simple mathematical way to describe each block of sound.

It then records this simple description. After that, it figures out the small differences between the original sound and this description. These differences are called the residual. The residual is then compressed using a method called Rice coding. This whole process makes the file much smaller.

When you play a FLAC file (this is called decoding), the process is reversed. The computer first decodes the residual. Then, it uses the mathematical description to rebuild the sound wave. Because FLAC is lossless, the sound you hear is exactly the same as the original. Nothing is lost!

Sometimes, for stereo sound, FLAC can combine the two channels. It might encode the difference between them. Or it might encode the sum of them. This can sometimes make the file even smaller.

How Much Can FLAC Compress?

The amount a FLAC file shrinks depends on a few settings. But no matter how much it compresses, the original sound can always be perfectly rebuilt.

The FLAC tools offer 9 different compression levels. These are numbered from 0 to 8. Higher numbers mean smaller files. But they also take longer to create.

FLAC is designed to be very fast when playing back music. It's not as fast when making the files. But once a FLAC file is made, it plays quickly, no matter how much it was compressed.

FLAC Tools and Programs

The FLAC project also provides a set of free tools. The main tool is called libFLAC. This library helps programs encode and decode FLAC files. It also helps manage the metadata in FLAC files.

Because FLAC is free and open-source, anyone can create their own programs that use FLAC. There are no special fees or patents to worry about.

FLAC Compared to Other Formats

FLAC is special because it's made just for audio. Other general compression tools, like ZIP, can also make files smaller. But FLAC is much better at shrinking audio. ZIP might reduce an audio file by 10-20%. FLAC can reduce it by 40-50%. It uses special tricks that work well for sound.

One of FLAC's biggest strengths is how fast it can play back audio. This is true no matter how much the file was compressed.

Since FLAC doesn't lose any quality, it's great for archiving your music. If you have CDs, you can turn them into FLAC files. If your CDs get lost or damaged, you can always make perfect copies from your FLAC files. You can't do this with lossy formats like MP3. MP3s throw away some sound information to make files smaller.

FLAC is also perfect for converting music to other formats. For example, if you want to make an MP3 from a FLAC file, you won't lose any quality. This is because the FLAC file is a perfect copy of the original.

You can also create a CUE file when you make FLAC files from a CD. This CUE file helps you burn a new CD that is exactly like the original. It keeps the same song order and gaps between tracks.

Where You Can Use FLAC

Many different devices and programs support FLAC. The main FLAC tools work on many computer systems. These include Linux, Microsoft Windows, and macOS.

More and more devices are now able to play FLAC files. Windows 10 and Android (since version 3.1) have built-in FLAC support. macOS High Sierra and iOS 11 also added native FLAC playback.

Some car audio systems also support FLAC. The European Broadcasting Union (EBU) uses FLAC for sharing high-quality audio. Music services like Bandcamp also use FLAC for uploads and downloads.

FLAC support by different operating systems
Microsoft Windows macOS Android BlackBerry OS iOS
Codec support Yes Yes Yes Yes Yes
Container support FLAC (.flac)
Matroska (.mka, .mkv)
Ogg (.oga)
FLAC (.flac)
Core Audio Format (.caf)
FLAC (.flac) FLAC (.flac) FLAC (.flac)
Core Audio Format (.caf)
Notes Support introduced in Windows 10. Support introduced in High Sierra. Support introduced in Android 3.1. Support introduced in BlackBerry OS 5.0 Support introduced in iOS 11.

See also

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

  • Comparison of audio coding formats
kids search engine
FLAC Facts for Kids. Kiddle Encyclopedia.