Video compression is a process that reduces the size of a video file using tools called encoders. Encoders implement specific media codecs in order to achieve various degrees of video compression. Encoding makes it easier to stream video on the web because when video file sizes are smaller, they require less bandwidth to deliver and load.
In this article, we’ll break down why video compression is important, how it works, and some important terminology.
Why do you need video compression?
To answer this question, it’s easiest to provide some context. Did you know that without compression, a Blu-ray disk would only hold around three minutes of video content? Not only that, video would take up to 99% of the internet’s bandwidth and the average household wouldn’t be able to stream over their home internet connection.
Compression makes it possible to stream high-quality video at home or on your mobile devices. Based on the volume of digital video content that people consume—around 17 hours a week—that means that without video compression, we wouldn’t be able to support the ways that people consume media today.
Video compression terminology
To understand video compression, you need to understand a few important terms:
- Encoding: Encoding is the processing of compressing a video file into a smaller size, making it easier to stream.
- Transcoding: Often confused with encoding, transcoding is the process of transforming an encoded file, like changing the format or adding characteristics like subtitles.
- Codec: A codec is a specification that determines how a video is encoded or decoded. Codecs typically discard unnecessary information within a video file.
- Video containers: Video containers are file types that bring all of the data from codecs into one package along with metadata and other important information.
How does video compression work? An intro to encoding
Video encoding is the process of compressing a raw series of frames into a smaller file size. Encoding works by finding patterns in a video file, then replacing repetitive pieces with references. This is done through a set of operations specified by a codec. The result is a smaller, encoded file that can easily be streamed across platforms.
Learn more in this complete guide to video encoding.
Types of video compression: Lossy and lossless
There are several methods for compressing video content, but there are two categories of codecs you should know—lossy and lossless codecs. The encoding process typically uses both of these compression types.
Lossy compression
Lossy codecs—also known as lossy compression—create a copy of the original video file and in the process, gets rid of unnecessary details, resulting in some data loss. Although this process compresses the file much more than lossless compression, the file sizes are much more manageable.
Examples of lossy compression include JPEGs or MP4 audio files.
Lossless compression
With lossless codecs—also known as lossless compression—the entire file is reproduced upon playback. This means that if you were to uncompress the file, it would go back to its original quality.
Examples of lossless compression include ZIP files, PDFs or PNGs.
Video compression with Mux Video
Mux video encoding uses a just-in-time transcoding engine, an optimized streaming origin, and CDNs—all expertly configured for the most efficient video streaming. Mux uses an API that replaces the need to integrate with multiple services, so you never have to sacrifice convenience for performance.
Video compression FAQs
What's the difference between encoding and transcoding?
Encoding is the initial compression of raw video into a smaller, streamable format. Transcoding is converting an already-encoded video from one format to another—changing codecs, resolutions, bitrates, or adding features like subtitles. Think of encoding as the first compression from camera footage, and transcoding as any subsequent conversions. In practice, people often say "encoding" when they mean "transcoding" since most video work involves already-compressed sources.
How much can I compress a video before quality becomes unacceptable?
This depends heavily on content complexity and viewing conditions. Typical web video compresses to 1-5% of uncompressed size without noticeable quality loss for most viewers. A 1080p video that's 1GB uncompressed might be 10-20MB compressed with H.264 at reasonable quality. The key is finding the balance where compression artifacts aren't perceptible to your audience on their typical viewing devices and screen sizes.
Is all video compression lossy?
Almost all streaming video uses lossy compression because lossless files are too large for practical internet delivery. Lossless video compression exists (used in production and archival contexts) but produces files 10-20x larger than lossy compression. For web streaming, lossy codecs like H.264, H.265, and AV1 are standard—they discard information cleverly enough that quality loss is imperceptible at appropriate bitrates.
Why do different codecs compress video differently?
Codecs use different algorithms and strategies for identifying patterns and discarding information. Newer codecs (H.265, AV1) use more sophisticated analysis than older ones (H.264), examining more reference frames and testing more compression options. This is why newer codecs achieve better compression but take longer to encode—they're doing more computational work to find optimal compression strategies for each frame.
Can I compress an already compressed video further?
Yes, but each compression pass introduces generation loss—additional quality degradation from discarding more information. Re-compressing compressed video shows more artifacts than compressing from original source. If you must re-compress, use conservative settings to minimize additional loss. Ideally, always compress from the highest quality source available (camera original) rather than re-compressing previously compressed files.
What's temporal vs. spatial compression?
Temporal compression eliminates redundancy between frames over time—storing only changes rather than complete frames. Spatial compression eliminates redundancy within individual frames by compressing similar neighboring pixels. Modern codecs use both: intraframes (I-frames) use only spatial compression, while interframes (P and B frames) use both spatial and temporal compression to achieve maximum efficiency.
How does video compression affect file size vs. quality?
Compression settings create tradeoffs: higher compression means smaller files but more quality loss, while lower compression preserves quality but creates larger files. This relationship isn't linear—you can often achieve 50% size reduction with minimal perceptible quality loss, but pushing to 80% reduction causes noticeable degradation. The optimal point depends on your content type, delivery constraints, and viewer expectations.
Do video platforms compress videos again after I upload them?
Yes. Video platforms re-encode (transcode) uploaded videos to create multiple quality renditions for adaptive bitrate streaming, optimize for their delivery infrastructure, and ensure format compatibility across devices. Even if you upload pre-compressed video, platforms process it again. Upload the highest quality source you have—platforms will handle compression optimally for their specific delivery requirements.