What are codecs for audio and video

Codecs are software or hardware devices that digitally encode and decode (compressing) an analog signal

You will have happened, at least once in your life, not being able to play a video file, such as a movie, or a piece of music and wondering what was the reason for this impediment. In these cases, the fault lies with the program you use to watch movies and listen to music: it lacks the necessary codecs.

Although little known to the “general public”, audio and video codecs are fundamental elements for the proper functioning of any computer system. As we said, without a proper codec, computers (or smartphones, but also videogame consoles and even the decoders used to watch the TV at home) could not play music or show the images of any movie. On codecs, therefore, depends our ability to relax and enjoy watching the movie or listening to the music of our favorite actor or singer.

What are audio and video codecs

Acronym for Coder/Decoder, codecs are software or hardware devices used to transform an analog signal – such as the sound waves of a song – into a digital data stream. In this way, a computer – or any other computing device – is able to reproduce photos, videos and music tracks without any problem whatsoever. Codecs are also used to reduce the size of audio and video files resulting from the conversion from analog to digital. If no compression techniques were to be implemented, digital files would be huge and difficult to handle by computers and smartphones.

Two compression techniques

There are two compression techniques in particular: lossy and lossless. The first system is lossy, while the second is lossless. Let’s take another example. Let’s assume that we want to transfer an analogue video, using lossy compression: we would have a small file, but the audio and video quality would not be very good. If, on the other hand, we decide to use the second technique (lossless), the file will be “heavier” but will have a higher audio and video resolution.

Better quality

Compression implies, therefore, the elimination of certain elements that make up the video. Codecs using lossy compression will take away more data than those using lossless compression. Over the last few years, efforts have been made to optimize the quality of compression. For example, the new HEVC (High Efficiency Video Coding) standard, also known as H.265, provides a better quality-compression ratio. In practice, it allows you to compress more without having much impact, unlike the old H.264 codec, on audio-video quality.