You have to differentiate the container from the codec. The container is the wrap of the file which contains an audio format and a video format (codec). We can recognize a container via its extension, for example ".avi" or ".mkv". The same container can use different codecs. For example, a ".mkv" can be encoded in AVC or DIVX format. Then, for a same codec, you can find different versions. For example, it does exist multiple different DIVX format versions, from version 3 to version 11. More the number is high, and more the encoding format is recent and performing. For some other codecs, we talk about "level". For example, a file which is encoded in format AVC Level 3.1 will be less performing than in 4.0.
For a precise codec, we can have a variable or fixed video speed (or audio), more or less. An AVC Level 3.1 video file with a 40 Mb/s speed will be able to have an equivalent quality than a file which is encoded in AVC Level 4.0 with a 30 Mb/s speed. Then, the image quality depends on codec / speed ratio.
Ratio can vary from a codec to another but also depending on the screen resolution. For example, HEVC codec is more effective on high resolutions than on low resolutions.
Then, a file which has a 3840 x 2160 encoded in HEVC will be approximately five time less voluminous than the file which is encoded in AVC and the Full HD resolution (1920 x 1080) will be two time less voluminous.
Here is a list for the most important audio-video codecs :
Video (best quality first) :
- HEVC / H.265 / x265 / VP-9
- AVC / H.264 / x264
- DIVX 6-10 and variantes MPEG-4
- DIVX 4-5 et XVID
- DIVX 3 / H.263
Audio (best quality first):
- DTS:X / Dolby Atmos
- DTS-HD / Dolby TrueHD
- Dolby Digital Plus / PCM Multi-chanel
- Dolby Digital / DTS
- PCM 2.0 / AAC / Flac