Compression. It’s a term that we hear a lot. It’s a term that gets applied to many situations…
We compress air to pump up a tire.
You compress a sponge to squeeze water out of it.
In the audio world, we compress the range between the loudest and quietest portions to even out the volume level.
These examples all have something in common. When we compress something, we make it smaller in some way. When it comes to computer files, compression allows their file size to be smaller… and since media files tend to be very large compared to many other types of computer files, compression is an important tool in our belt.
Why is compression important to us? As just alluded, media files tend to be large. Text files, and even many apps are often very small compared to media files. They are often a few kilobytes or tens of KB in size. To compare, a typical 2-megapixel photo is about 2 megabytes (MB) uncompressed. A three minute song from a CD is around 10-12MB. Video is the king of giant file sizes. Uncompressed HD video uses about 120MB per second. That means 420GB (gigabytes) per hour 🙂 Goodbye hard drive!
With today’s 20-megapixel photo cameras and 4k video cameras, storage demands increase quickly. Storage devices such as SD cards and USB drives have limits. Transmitting such large files over the Internet takes more time, even with broadband connections. This is why we compress media files on a regular basis.
There are caveats to using compression – trade-offs, depending on the methods used to make a file smaller. Without getting too technical, we reduce computer file sizes by eliminating data. By removing some of those bytes.
The first approach to compression is what we call non-destructive or lossless. Computer files often contain a lot of repetition. Compression tools eliminate repeated bytes while keeping track of how many there are, so when a file is opened and decompressed, all the bytes (the data) are restored exactly as they were in the uncompressed original. Lossless compression is always preferred, as the original information is completely stored. However, lossless compression only works so far…
Images, sound and video require more data compression than lossless methods offer. Otherwise the storage and bandwidth requirements of using uncompressed or lossless media is prohibitively expensive. Lossy compression is just what it sounds like – data gets lost, or eliminated with this variety of data compression. The more you compress a file, the more artifacts, or distortions will become noticeable.
The great thing is that we have many options, each designed for particular media types – here are a few common lossy compression types you may be familiar with: images – JPEG; audio – mp3; video – mp4.
There are many others – more than there are room to cover in this post. Here are some general rules of thumb to consider when using compression:
- Compression amount is usually adjustable and more compression leads to more destruction.
- Compressing files requires extra processing time – not very noticeable with images, but you’ll notice it when your ten minute video piece takes an hour to save with a particular compression setting.
- It’s a great idea to save original uncompressed files in your archives. Or the files from your capture device in their original compression format. You may want to revise files down the road. Re-saving compressed files repeatedly degrades their quality, and if you’re creating layered files, the compressed files merge those layers together into one.
This is just the tip of the compression iceberg. These are the basics to know for everyone who handles digital media files. There are lots of great resources out there if you want to know more about media file compression… ask me if you’re needing a quick answer 🙂
Tomorrow, I’ll discuss the ins and outs of using a phone as your primary camera. See you there!
Mike
Great article, Mike! Love the graphic. A picture IS really worth a thousand words! Hmmm, is that expressions sounds like compression 🙂