Digital audio and video file formats
Understanding digital audio and video formats can be confusing because people often use the terms interchangeably. This page explains some of the terms, including coding and encoding, file format, wrapper format, and codec.
Coding and encoding
This is how computers turn sounds or images into binary numbers (1s and 0s) that they can read. All video and audio files online or on computers are encoded in some way.
"Encoding" can refer to both the way video or audio is saved and the type of file it’s saved in.
For example:
- MP3 (‘.mp3’ files): an audio file format
- DV (‘. dv’ files): a format used for digital video.
Some encoding formats are called "wrappers".
File format
A file format is the way digital data is saved as a single unit on a computer. To play these files, you need software called a codec (explained below). Some file formats are wrappers that bundle different types of data together.
Wrapper format
A wrapper format is like a container that holds different types of data (audio, video, metadata) in one file. For example, a .wav file can contain both audio and information about that audio in one file.
Other examples of wrappers are:
- MP4 (.mp4): a video file format used universally
- AVI (‘.avi’ files): a video file format used for Windows Media files
- MOV (‘.mov’ files): video file format used for QuickTime
- MXF (‘.mxf’ files): used for video, audio, and other media streams.
Codec
Codec stands for compression/decompression or encoder/decoder.
Codecs are software that compresses audio or video data so it can be stored more easily and decompresses it so it can be played.
There are 2 main types of codecs:
- Lossy: These codecs remove some data to reduce the file size but aim to do so without affecting the quality too much. For example, mp3 files use lossy compression. The more the file is compressed, the more the quality decreases, and the lost data can’t be recovered.
- Lossless: These codecs compress files without losing any quality. They may reduce file size by using fewer bits for silent sections of audio. Even though they’re compressed, lossless formats maintain the original quality of the audio or video.
Some codecs can be used in either a lossy or lossless mode, depending on how you set them up.