
Explaining the difference between codecs and containers is relatively simple, but the difficult part is trying to understand each format. The lines begin to blur when you realize that the most common codecs are not exclusive and can use various compression technologies to get the job done. The blurred line is almost invisible when you start talking about formats like MPEG-4, which can be classified as container and codec, but it is a complicated classification that is better to leave for another time.

So how is the difference between dozens of codec and container options taught? Don’t do it.There are only a handful of technologies used for online video, and most of your effort will be devoted to understanding how they work, as well as understanding the trade-offs you face in deciding what to use. .

You can spend weeks studying technologies that are only used for a relatively small number of applications. Therefore, we will focus our attention on the technologies that you will use for most video encoding and playback needs.
What is a codec?
A codec, or encoder / decoder, is an encoding tool that processes video and stores it in a sequence of bytes. Codecs use algorithms to effectively reduce the size of the audio or video file and then unzip it when necessary. There are dozens of different types of codecs, and each uses different technology to encode and reduce your video file for the intended application.
Depending on the codec, this encoding occurs in two ways: Lossy or lossless compression How does file compression work? How does file compression work? One can argue that file compression is at the heart of how the modern Web works, as it allows us to share files that would otherwise take a long time to transfer. but how does it work? See more information.
Lossy compression
When looking for manageable file sizes, lossy compression is the most viable method available. Although it certainly loses quality in audio, video or both, compression is a necessary evil (currently) in a world dominated by the need to share and store what would otherwise be equivalent to impractical file sizes. Your average Blu-ray, for example, can top 40 gigabytes, and that kind of storage space would not only be expensive, but would make digital downloads and purchases inconvenient, if not a waste of time. The key when using lossy compression is to set the highest quality compression format for its intended use, so that it follows the fine line between quality loss and file size.
Lossless compression
Lossless compression works much the same as a ZIP or RAR archive, because after compressing and decompressing, the archive is essentially the same. By using smart algorithms, the file does not lose a lot of quality, but it is not an efficient way to store large files because there is not much compression that actually occurs. Also, streaming large video files online uses a lot of bandwidth (although H.265 encoding can change that) to make it a viable compression option.
Unless you work in the film or video editing industry, you are unlikely to share video files in a lossless format (if you do). To put this in perspective, even a 4K TV does not contain the resolution necessary to display a movie shot on a modern camera and is delivered without compression. In fact, it’s not even close (yet). While 4k video is beautiful, 8 Ultra HD videos to watch on your new 4K TV [things to see] 8 Ultra HD videos to watch on your new 4K TV [things to see] We have tracked high and low and found some 4K videos that take full advantage of the ridiculous amount of pixels at your disposal, for free. Read more, it is not the size of an uncompressed video format.
Although a Blu-ray movie is less than 50 gigabytes (if required on disc), the first downloadable 4K movie (available to consumers – trailer below) is 160 gigabytes! The uncompressed 1080p video is mind-blowing 410 gigabytes per hour, and that doesn’t include the audio file, which can add an additional 7 gigabytes per hour, depending on how it was recorded.



