
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?

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.
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.








