Following on from an earlier blog, this post puts the spotlight on coder-decoders (that's codecs to you and me!) with a special look at the MPEG family. Read on…
- What is a codec?
- Common codecs for stills, audio and video
- Lossy or not: different types of codecs
- Meet the MPEGs
WHAT IS A CODEC?
The term codec is a combination of two different terms: code and decode. It can be defined as a standard used for first compressing and then decompressing media files, especially audio and video.
A codec is either a computer program, or a hardware device, which has the potential to store files on digital devices (or disks) and deliver large media content over the internet or network. It does so by reducing the overall required bandwidth. Codecs employ a mathematical algorithm which transforms and encapsulates the data for transmission. The main objective of designing and implementing codecs is to make media files playable on devices other than the one on which it was created.
Codecs are generally used for two purposes. The first one comprises analog-to-digital transformation and vice versa. The other purpose includes the process of encoding the audio and video recorded using a microphone or video camera into a digital form, in order to transmit it to others through video conferencing, broadcasting or streaming. Codecs are key to the success of multimedia applications, including teleconferencing and webcasting over the internet.
Nowadays, there are numerous codecs available which have their own strengths and provide support for specific functions. For instance, if you want to add a video in your website, you will require a different codec fram the codec you'd use to play the file directly in your video player application.
COMMON CODECS for stills, audio & video
Commonly used still image codecs include:
- JPG/JPEG (like the image used at the top of this blog!)
Some commonly used audio codecs include the following:
And some of the most common video codecs include:
- MPEG family
- H.264 / H.265
So how do you know which codec is best for your purposes? The answer is… it depends. Different applications have different requirements regarding the size of the compressed file, the speed of compression and decompression, and, not least, the quality of the final image. An event with live video calls for faster compression/decompression (in order to get the images on screen ASAP) compared to a pre-recorded video that is featured on a website. It's a matter of horses for courses.
Lossy or not: Different TYPES of codecs
There are various codec types available in the market, with different approaches to encoding and decoding. For example…
- Lossless codecs: These codecs are used to create an exact replica of the original video without losing the quality of the video.
- Lossy codecs: Such codecs are widely implemented while compressing data especially for e-mail and internet for streaming. These codecs require less data space in order to reproduce the compressed material.
- Transformative codecs: These codecs chop the video content into some manageable chunks prior to compressing the content.
- Predictive codecs: These codecs have the ability to compare the data you are compressing with adjacent data and remove the unnecessary data in order to maximise the space.
MEET THE MPEG FAMILY
The most common, popular and extensively used family of codecs is based on MPEG standards. The term MPEG stands for Moving Picture Experts Group, an organization formed to establish a standard for encoding digital media such as audio and video content. It works under the supervision of the International Organisation for Standardisation (ISO).
The MPEG standard is widely used because it provides better quality video output at desirably low data rates. It uses an advanced compression algorithm which compares favorably to other standards, such as AVI, and also provides support for streaming.
Some of the major MPEG standards include the following:
- MPEG-1: It is the first MPEG compression format which is also known as the lossy file format. It also incorporates the most popular audio format i.e. MP3. Initially, it was designed to encode the audio and image files according to the bitrate of CD (Compact Disk). Later, it was used for low-quality videos on video CDs and DVDs. It offers video of resolution 352 x 240 at the rate of 30 frames per second (fps).
- MPEG-2: This standard of MPEG is known for its contribution to the evolution of the digital television broadcasting industry. It has the ability to provide video resolution of 720 x 480, 1280 x 720 at the rate of 60 frames per second. One of the major TV standards (NTSC) and HDTV implements MPEG-2. It is also used in DVD-video and start of Blue-ray discs.
- MPEG-3: This standard of MPEG was originally designed for HDTV compression but later, it was abandoned and combined with the MPEG-2 standard.
- MPEG-4: This standard of MPEG is used for high definition video applications. For example, HD DVD and Blu-ray. It implements additional coding tools in order to provide high compression as compared to MPEG-2 standard. It also provides support for IPMP (Intellectual Property Management and Protection).
- MPEG-7: This standard of MPEG is also referred to as Multimedia Content Description Interface. It contains a default tool set especially for multimedia content.
- MPEG-21: This standard of MPEG is also referred to as Multimedia Framework. It contains default Right Expression Language (REL) and Right Data Dictionary by default. It is used along with MPEG-2 and VC-1 in HD DVD and Blu-ray discs.
The MPEG family of standards is extensive and also includes MPEG-A (with 20 parts!), MPEG-B, MPEG-C, MPEG-D, MPEG-E, MPEG-G, MPEG-V, MPEG-M, MPEG-U.
Wondering if the file in front of you is MPEG or not? Some of the extensions used by the MPEG files are listed below:
Head on over to the Moving Picture Experts Group website to find out more!
Codecs revisited: H.264 and H.265