Why does audio and video take so much storage?

405 views

So for example, videogames are super heavy on disk space. And aparently most of that space is just the sounds, textures, models, etc. But the code takes very little space.

Why can something as complex as a physics system weight less than a bunch of images?

Code takes very little space, media takes more. But an image is just code that tells the computer how to draw something (I think)

So how come some code gets to be so small in size and some code doesn’t?

In: 53

18 Answers

Anonymous 0 Comments

Your whole questions revolves around the idea of information and how compression applies to it. Its not why is it so small, but why does it take so much information

Code is small, and gets even smaller when you compile it down. The entire physics system for your game might only take a few megabytes of code and that’s because most of the information in the code is lost during a compile. Stuff like comments will get dropped, if statements turned into a few bytes of memory, code optimization, etc. We have taken the code with all of the information a human needs and turned it into something only a computer can read with all of the human bits removed. We can do this because the human will never need to read the human bits from the code again. This would be “lossless” compression because all of the information the computer needs is kept. All of the code is still there, just represented in a much smaller form that with enough effort, can be turned back into something human readable.

Now apply this to an image. If you remove information from the image to save space, there is no method you can use to regain that information because it is lost. This is called lossy compression and can be used to save alot of space but you can only take it so far. If you keep taking information out of the image, you have less information to represent the image. Nobody wants an image with all the blue removed to save space. Now the more information (aka detail) you want to keep, the more space it takes to store that information and images have ***alot of detail***. If you have ever seen a highly compressed image, you can see all the little shortcuts it takes to save space. Color space will be reduced resulting in banding in like-colored areas, sharp areas will be “blurred” as individual detail is removed for more grouped detail, etc

Now apply this to a movie file which is just several pictures lined up after each other to form a moving image. A 10 second clip at 30fps is gonna take 300 pictures worth of space to store that movie file. Now with compression, you can get the space down a fair bit, but you can only compress it so far before you start loosing too much information.

Now lets watch the progression of information over time in our ever greater push for more detail. In the 80s/90s, you had the advent of the personal computer and “writing” machines. Their biggest feature was the ability to type documents and go back to modify them without the use of items like whiteout. Decade or two later, as the computers get more power, their main feature is now longer the ability to write documents, but to display images. Writing documents takes a fraction of the power it used to thanks to advancements in technology. Another decade or two later, and now the main feature is no longer writing or pictures, but movies. Writing documents takes another fraction of power while images only take a fraction. As time progresses, manufactures push for greater detail and power to gain an edge over their competition but that greater detail also requires a substantial more information to represent all that detail.

You are viewing 1 out of 18 answers, click here to view all answers.