Codecs: How an audio or video codec works


Free Download Mp4Gain
picture

To understand in a simple way what a codec is and how it works, the first thing we have to keep in mind is that the human voice is a continuous (analog) waveform, while the information that circulates through a data network is discrete ( digital). This means that if we want to send packets with data that contain the information needed to reproduce a voice fragment, we will have to digitize the voice beforehand.

codecs

The process of converting an analog signal to a digital signal is done through an element called an encoder. If the encoder is also capable of performing the opposite process, that is, moving from a digital signal to an analog signal even if only approximately, then we will have an encoder-decoder. An encoder-decoder is also called a ‘codec’.

Although it may seem that we would only be interested in selecting one or two codecs taking into account the voice quality (MOS, Mean Opinion Score) and bit-rate parameters that each codec needs, the truth is that we also have to face our network Look closely at the size of the packets that we are going to send since each voice packet is also made up of bits that are used for routing and error correction issues. As they add load, they saturate the network and make the entire system go slower. Do we reduce the number of packages we have to send making them larger? It is not always a good idea because the loss of a large package will have a greater impact on the output, even a cut in communication! What is recommended in these cases is to have a certain compromise between the number of packets that are sent to the network and the protection we want to have. The reference size should be about 20ms of voice per package.

codecs

How codecs work

The codecs reduce the information of the clips to facilitate and enable their publication and viewing through the Internet. There are two methods of compression, the so-called spatial and temporal compression.

In the first one, reduce the information by compressing the existing one inside each frame. Instead of describing the pixel-to-pixel image, pointing out for example the position and color of the pixels, the compression codec generalizes describing similar areas and their light and color characteristics. For example, instead of reproducing a blue sky pixel by pixel, it would be described as an area with similar light and color characteristics. In this sense, the less varied details an image presents, the codec can generalize and compress more easily. Creating videos with simple backgrounds facilitates compression and reduction, just as working with a tripod instead of a camera in hand means stabilizing the backgrounds and therefore facilitating subsequent compression.

The other compression method is temporary, where the information between consecutive frames is compared and only the details that vary are stored. The reference frames from which the differences are analyzed and the subsequent ones are supported are called keyframes and contain the complete image. On the contrary, the frames that reflect the differences are called “delta frames” and only contain the information of the areas that vary with respect to the previous images.

In general, videos that show few changes between frames are compressed better and this necessarily affects the realization. At present, both the television and the cinematographic realization tend to use the camera in motion. However, the compression of dynamic videos is more problematic than the cases of more static images.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

All about the different Video formats: Xvid, Divx, mp4, h264, Flv

Currently we find countless video formats. Depending on the quality you are looking for, the video will be exported in one way or another. In this post I help you differentiate and understand each of the formats and codecs so that you can apply it in your editing projects.

video formats codecs

You can find various formats intended for both web pages and videos on YouTube or Vimeo, as well as to project in movie quality or to watch them on your mobile device or Tablet.

there were no different video formats we would be very limited when making any type of video production since they would occupy an infinity of megabytes, in addition all would have an extreme quality which would make it difficult to carry out projects for an exclusive job. By the way, if you are looking for websites to download royalty-free videos for your projects here I leave you the best free video pages in HD and 4K

It is not the same to export a video in quality for youtube or any online platform than to export them for a mobile device or a film shoot. Each has essential characteristics that make everything optimized to get the most out of your production.

Many times the problem with all these options and formats is compatibility. Each device records in a different format and we may have problems when playing them, so it is very interesting to know what options there are and how to handle them to avoid headaches.

First of all it is to differentiate between these important concepts:

Definition of container format and video codec

To clarify concepts it is important to define what is a container format with what is a video codec, totally different things. The container format is the file format, the drawer that encompasses all the material (video, audio, etc.) while the video codec is the format that is related to the part of the video and is not absolutely essential.

video formats informtion

Container format: Every video file has a format inside, which can be AVI, MPG, H264, MOV, WMV etc. It has several elements inside, including video and audio generally. But they could also contain integrated subtitles, including several audio files with different languages.

Video codecs: Video codecs are the files that are within the container format, therefore you have to know how to differentiate these two concepts. If there were no codecs there would be no problem since these are files that help compression. Depending on the codec’s choice, you may have worse or better quality.

 

 Types of video formats and codecs

AVI format

This format is one of the best known and most widely used as a container for storing series, movies and other similar videos. The .avi came to light in 1992 and was undoubtedly the quintessential video export file as it was fully compatible for Windows, Apple, Linux, Unix etc.

It is currently one of the most standard formats used with the S.O Windows. But not everything can be good, and if we talk about disadvantages we will say that the memory used to store the audio and video information is large. That is, the compression of an .avi file is quite heavy.

Another disadvantage would be the reproduction, being an old format has been updated with codecs making old players can no longer read these updated formats and vice versa.

MPG format

A video format with worldwide compatibility, whose audio and video compression with little loss of quality makes it easy to download these files to a web. The MPG file in turn is divided into MPG-1, MPG-2, MPG-3, and MPG-4, each of these with a different quality and I will explain below:

MPG-1: Quality compared to the VHS format of yesteryear already obsolete, resolution of 352 × 240

MPG-2: Equipped with a slightly higher quality and can be compared with that of analog television. Its resolution is 720 × 486. This format was responsible for the success of DVD Video

MPG-3: It was an attempt or proposal to give high resolution Television quality or what is the same, for HDTV, but it was discarded giving priority to MPG-2, then the MPG-3 will become the known audio file called MP3

MPG-4: Based on the Quicktime format and identical to the .MOV format, it improves the compression efficiency of the MPG-2 used by default on Apple machines. MPG-4 and MP4 is exactly the same, let’s say it’s the official extension for these records. If we talk about high definition, we certainly talk about MP4

WMV format

Microsoft Windows is the owner of this format. To play this video file we have the Windows Media Player, or its equivalent, the great VLC player. A curiosity of this format is that it offers support for digital rights management, preventing users from copying the information, an interesting feature for online digital audio and video vendors.

These files are compressed exclusively with Microsoft codecs. with resolutions higher than 300,000 pixels making it an ideal format for Blu-ray discs and HD DVDs.

Format .MOV

If you don’t have a Mac in your possession, you may have found this file on some occasions. But due to the difficult reproduction of it you have ruled out, now the thing has changed.

This standard developed by Apple allows the transmission and reproduction of high quality visual content on the Internet on both Apple and Windows operating systems. Quicktime comes with its integrated player and since version 7 it has become a player that recognizes most of the current video files.

h-264 H.264 format

One of today’s most current formats between video editing. Created in 2003, it has evolved, producing high video quality while maintaining its low bit rate, achieving a simple structure design and a flexible format for mass use. The H.264 is a codec that needs a container format to be able to store that video.

It is the ideal candidate to use as a YouTube format or any tool for internet transmission.

MKV format (Matroska)

The MKV format is a format used primarily for movies, series, and 3D content. This format is used because it allows you to store many data in the same file. For example, include audio tracks in several languages.

It plays mainly on computers, but also on other devices such as televisions that have a USB connection. It works very similarly to MP4 and usually uses the H.264 codec.

DIVX format

It is characterized by being the first video codec that was used in the first movies in DVD Video format to reduce the size and burn that content to a CD.

Divx is a compression format that allows you to give images of similar quality to the DVD but needing less storage capacity.To be able to view videos with divx you need to install decoders or codecs that almost always work with plugins or ejectuables that already contain these codecs

The DIVx format does not act on audio compression affecting only the video.

XVID format

When the Divx ceased to be so popular, it gave way to the XviD, surpassing it for its better quality, becoming more famous because it was supported by many DVD players.

At present, although there are other more powerful formats, this compression is still used since its performance and compression speed is very good.

FLV format

Surely it has happened to you that while you are on the internet, a pop-up window jumps into your browser telling you that you need to update the well-known Flash Player, formerly called Macromedia Flash Player. It is mainly used to stream video over the internet. FLVs can be seen by most S.O. and in all browsers, as I said before, with the preload of the update. Websites like YouTube use this format to play your videos.