
Why do we need codecs and why are there different encoding qualities?

Modern realities, namely the wide distribution of video on the Internet, require fast and high-quality data compression, and preferably with minimal requirements for the hardware part both during encoding and during decoding already on the client device.

To implement this idea, special algorithms (programs), called codecs, are introduced that are used to compress data. But, unfortunately, compression occurs with loss of information, that is, after decompression, the video becomes of lower quality, various problems appear, among them:
Decreasing colors (thicker gradients)
Average of adjacent areas (loss of detail and clarity)
Deterioration of the quality of moving objects (gaps in objects, artifacts, violations of object boundaries, mixing of objects with the background)
Freeze frame with video defects
However, currently widespread codecs are capable of compressing video into a very small amount of data with virtually no loss, but this is achieved through a significant increase in the requirements for calculations. In other words, compression takes a long time.
For video compression when it is done in advance, that is, not on the real-time playback scale, this problem is not that big. After all, if streaming a compressed stream is not important to stream in real time, you can either extend the stream, that is, assign a higher video bitrate for compression or compress the video as long as possible. And in any case, obtaining high quality, although with different data compression.
However, this scenario is not always available. If you want to stream a streaming, the encoding rate must be equal to or greater than the video playback rate. In this case, hypothetically, you can increase the bitrate and therefore use simplified compression methods, losing less detail during compression. And this would be so if modern streaming sites didn’t limit the bitrate available for a video stream.
In other words, to lose less quality when streaming video, you inevitably need to use data compression algorithms that consume more resources.
What are the configuration presets?
For both the x.264 codec and the more modern x.265 codec, there are many parameters that affect the quality of the encoding. Dozens of options with the ability to change many parameters, which form tens of thousands of combinations of settings. And so that the user does not have to waste time selecting optimal settings, out-of-the-box configuration presets were introduced. And for the x.264 codec and for the x.265 codec there are 10 presets.
Ultrafast
Super fast
Very fast
Faster
Fast
Means, medium
Slow
Slower
Very slow
Placebo
The default names convey their essence. And to be more precise, they characterize the video encoding rate. That is, the “Ultra Fast” preset allows you to encode ultra-fast video, “Slow” – to encode slowly, and the most “voracious” – “Placebo” was just invented “so was it” and to prove that this quality is also possible , but the possibility of its real application is more self-hypnosis than reality.
We discovered the presets. Now we need to understand the testing methodology and the quality criteria and evaluations.



