Video formats and compression codecs for video editing


Free Download Mp4Gain
picture

To understand the basics of video editing, one must consider display frame theory. For this reason, we will often use a fitting comparison in the guide: that of motion pictures and the frames that make up the film.

Video Editing

What is a video format?

We all know that you need a screen, a projector, and a movie to get a movie projection. A sequence of images is printed on the film, translucent as the negatives of the photographs, which in the projection modify the light beam of the projector, allowing only certain parts to pass through, which will generate an image on the screen. Film flows, projected images change rapidly, and a motion effect is obtained.

Let’s go back to digital video.

Let’s say we have a series of images that reproduce a movement (we will see later how the capture phase, or video capture, allows this). These images alone are not enough to show a movie on our PC. In fact, we should be able to tell the machine where these images are, what type they are, how fast they should be viewed, and in what order. For this reason, the format of a clip is defined, that is, a kind of “container”, recognizable by the PC, in which the previous information is attached, in addition to the images.
To recognize a video file format of a clip, you can access the file properties panel or observe the file extension itself (for example, AVI, MPG, QTM, etc … all video extensions).

Digital video
Each editor chooses the best video format they consider appropriate, depending on how they work, the technology they have available and the end result they want to achieve.

In fact, try to think how much a color image of about 800×600 pixels takes up. So much … too much to see 25 per second (as the theory of optics says) and save them to our HD.

What is a video codec?

This is where the codec (COmpressor DECompressor or better DECoder CODER) comes in, or the software that contains the mathematical procedure through which the images are compressed (often with loss or loss of information) to allow agile management and reproduction correct clip.
In practice, compressed video formats are obtained.

The codec is used both to capture and compress the video from an external source, and to play and process the video once it is stored on the hard drive. It could be compared to a kind of very fast Winzip that, if necessary, compresses and decompresses the images of a film.

It is useless to dwell on how a codec manages to make a noticeable decrease in the space occupied by images, reducing the loss of quality to a minimum (sometimes surprisingly!) What little indication to say which is the best video codec or the best compression Of video . The answer is always the same: it depends on what you want to achieve (and, similarly, what is the best video format is a question that has multiple answers).
The important thing is that these codecs are available to us, there are many of them and each one has peculiar characteristics that suggest its working environment.

We suggest downloading the K-Lite Codeck Pack (often also abbreviated as Klite) which contains an important collection of useful and cross-cutting codecs, tools, formats and filters.

Structure of a video format

Hardware codec and analog capture

Until recently, analog capture cards (especially M-Jpeg) were almost all equipped with a proprietary chip that allowed smooth, lossless capture as it took the computer’s processor out of compression work (it’s this chip that kept the price of the cards high).
The hardware codec is still software, but it interacts with this chip by letting the system know that it exists and that it can do the job instead of the CPU.
Without the codec installed, the card chip is useless, whereas if only the software codec is installed, the PC processor may be able to do the compression job, but this in particular cases.

Entry-level PCs are still powerful, and often analog acquisition cards only have one analog-to-digital conversion chip, while the processor does the conversion. In some cases, it is even possible to capture with very complex and elaborate software codecs like DivX or Xvid.
It is clear that choosing the hardware codec is always recommended, as in the case of the MPEG2 capture which requires a lot of resources.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Video codecs

In photography, the choice of the recording codec is quite limited: we usually fluctuate between the JPG format and the Raw format. In video, the choice is slightly wider: MPEG-1, MPEG-2, MPG-4, H264, H265, RAW, ProRes, ProRes Raw, Motion jpeg, etc.

So what are these codecs for, what uses are they designed for, and which ones should you choose?

Códecs

CONTAINERS AND CODECS are NOT the same!

Digital videos are contained in files. These files are called “containers”. The extension of these files often makes it possible to determine their type. The most common containers are MP4, MOV, AVI and MXF. The MXF container is generally used in professional camera series from manufacturers such as Sony or Panasonic.

These containers are “boxes” or “folders” that consist of several elements: video track, sound tracks, time code or subtitles. The purpose of the container is to synchronize all the elements it contains.

Therefore, you cannot know the codec of a video from the file extension: for example, an .avi file and a .mov file could use the same codec to encode the video track.

WHAT IS A CODEC?

A codec is a mathematical procedure consisting of algorithms used to encode and decode the image (codec). It helps define how sensor information is stored and the strategy for compressing and decompressing images.

codec

The size of a one minute 4K video file is about 50 GB. Therefore, it is easy to understand the main advantage of using a codec: compression. For the same minute of 4K recording, for example, using the H264 codec reduces the file size by a factor of about 27, or a final size of about 1.8 GB.

The more “codec” a codec is, the more complex the decoding will be and it will require a powerful machine to accomplish this task. At the same time, the higher the compression, the greater the loss of information that can make post-production difficult.

To achieve this optimization, most codecs use spatial compression: each image is compressed independently of the other images; This is known as an “intra” codec. For more compression, more complex codecs add temporary compression: we’re talking LONG GOP (GOP for “Group of Pictures” or “Long Group of Pictures”); Codecs of this type record only one full image per x images (often 12) and retain only what has changed between these images.

What are the most used video formats?

Choosing audio and video codecs and containers affects video quality and file size. Here we show you how to find the format that best suits your needs.

formats

Decades and decades of developments in the audiovisual field have led to a result that, in some way, can be considered curious. While in other sectors, continuous development has led to a very marked standardization (think of the .doc or .pdf format), in multimedia the situation is at least compound.

An example is the world of audio formats, animated by strong “competition” and a multitude of available options. It is no less than that of video formats, in fact. In this case, in fact, we have to deal with a division between codecs and containers (we will see in a moment what they are and what function they perform) that ends up complicating things even more. Therefore, in case you want to convert a movie, you have to be careful to choose the correct codec and the correct video format, to avoid creating files that are too large or simply unreadable. In short, the error is just around the corner.

audio formats

Differences between containers and codecs

Before analyzing the situation and seeing what are the most used video formats, it is necessary to clarify some fundamental concepts: first, what is the difference between the codec and the container. If in the audio world, the codec used to digitize the audio track matches the “final” file format, in the video, on the other hand, the codecs used are different from the file format that the video file will assume at the end of the digitization process. The reason is soon explained and lies in the multimedia nature of a video.

A movie, in fact, contains video and audio data: the conversion or playback software must be able to analyze both multimedia streams, and therefore will need different algorithms that work in one or another type of data stream. Codecs do exactly this: as the name, code, and decoding of data (audio and video) are made from movies, so you can convert them to another video format or play them back with a media player. Even with regard to containers, it is enough to resort to the literal meaning of the word: these are files that contain both the video and audio sequences within them and “make them available” to codecs for reading and playback.

What are the most used codecs?

A codec, as mentioned, is in charge of compressing and decompressing the video files and determines how they are played on the screen of the PC or smart TV. Each operating system provides the user with dozens and dozens of different codecs, each useful for encoding and decoding a specific type of file, even if a new one can be installed by downloading special software or packages from the web. Among the most used codecs we find the FFmpeg, Divx, Xvid, H.264 and its evolution H.265, VP9 and VP 10 (also known as the name of the Google codec).

-Divx and Xvid. As the name also suggests, these are two “mirror” codecs, created in the late 20th and early 21st centuries to meet the initial demand for online multimedia content. Since bandwidth and browsing speed were very limited, these are codecs that can guarantee good video quality even at high levels of image compression. In this way, it was possible to obtain files of contained dimensions even with very long movies (such as full movies)

-264 and H.265. Created by the Motion Picture Expert Group, they can be considered as industry standards. Among the most popular and used in all areas (you can find H.264 encoded movies on Blu-ray discs, for example, but also movies downloaded from the network) thanks to its versatility and ability to guarantee an excellent quality ratio / File size. The H.265 codec, in particular, can guarantee, with the same quality, a compression factor twice as high as that of its predecessor: files “treated” with this codec will therefore weigh half compared to their counterparts processed with H.264 codec

-VP9 and VP10. Also known as “Google Codec”, they are the codecs used by the giant Moutnain View to compress and decompress the movies uploaded to YouTube. These are algorithms optimized for online video playback, capable of offering excellent resolution and high quality even with small files. The VP10 in particular is the all’H.265 answer and is designed for resolutions up to 4K
Mpeg-H.

Codecs: How an audio or video codec works

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.