VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

How Media Compression Works | Lossy, Lossless, Codecs, Bitrate, Resolution and What Gets Thrown Away

Three students study around open books and worksheets in a shared classroom.

A camera can record more detail than a network can conveniently transmit. A microphone can sample more sound than a listener needs. A video stream can contain more raw information than a phone, storage device or household connection can practically move in real time.

Compression solves this mismatch.

Media compression is the engineering process of representing a media object with fewer bits while preserving enough of the information that matters for the intended use.

This article belongs to the How Media Works series and owns the practical media-engineering layer: files, codecs, bitrate, resolution, sampling, artefacts and delivery trade-offs. For compression as a broader principle of representation, models and information loss, use the Information & Representation Hub. For modality differences, see How Media Formats Work.


1. Raw Media Is Expensive

Digital media begins as measurements: pixels, colour values, audio samples, frames, timing information and metadata. Stored naively, these measurements can require enormous amounts of data.

A high-resolution video contains many pixels per frame, many frames per second and often several colour channels. Audio contains thousands of samples each second. Raw camera files preserve more sensor information than ordinary viewing usually requires.

Compression exists because the media system must fit reality-derived measurements into practical constraints of storage, bandwidth, processing time and device capability.

2. Compression Is Not the Same as Shrinking Dimensions

Reducing an image from 6000 pixels wide to 1200 pixels wide reduces data by discarding spatial samples. Compression can happen without changing those dimensions.

This distinction matters:

  • resizing changes the number of samples;
  • compression changes how efficiently those samples are represented;
  • both may be used together.

3. Lossless Compression Preserves Exact Reconstruction

Lossless compression stores the information more efficiently while allowing the original encoded data to be reconstructed exactly.

It works by exploiting repetition, predictable structure and statistical regularities rather than throwing away required information.

Lossless compression changes the code, not the recoverable content.

This is valuable for text, software, archival masters, diagrams, technical assets and any task where exact recovery matters.

4. Lossy Compression Trades Exactness for Efficiency

Lossy compression deliberately discards information judged less important to the intended receiver or use.

The decoded media is therefore not mathematically identical to the source.

The engineering challenge is to discard information in ways that reduce file size much faster than they reduce perceived or functional quality.

Lossy compression asks: what can disappear before the receiver notices or the task fails?

5. Media Compression Is Task-Relative

A compression level acceptable for a social thumbnail may be unacceptable for medical imaging, scientific analysis, restoration work or archival preservation.

There is no universal definition of “good enough.”

Quality depends on what the receiver needs to recover from the token.

6. Redundancy Is the First Opportunity

Media often contains repeated or predictable structure.

Large areas of an image may have similar values. Consecutive video frames may differ only slightly. Audio signals contain patterns across time. Compression algorithms exploit these regularities.

The system avoids repeatedly storing information that can be predicted or reconstructed from nearby information.

7. Perception Creates the Second Opportunity

Human senses do not respond equally to every possible difference in a signal.

Some changes in colour, frequency or fine detail are less noticeable than others. Perceptual compression takes advantage of these unequal sensitivities.

The compressor is therefore partly engineered around the receiver.

Compression is not only mathematics applied to data. In perceptual media, it is mathematics applied to a model of the human sensing system.

8. A Codec Is an Agreement About Encoding and Decoding

A codec specifies how media is encoded into a compact representation and decoded back into a usable signal.

The encoder and decoder must share enough rules that the compressed token remains interpretable.

This makes a codec part of the cultural and technical decoding machinery discussed throughout the How Media Works series.

9. Codec and Container Are Different

A common source of confusion is treating a media file extension as the compression method itself.

A container can hold video, audio, subtitles, chapter information and metadata. The codecs specify how particular streams inside that container are encoded.

The container is the package. The codec is one of the languages used inside the package.

10. Resolution Measures Spatial Sampling

Image and video resolution describe how many spatial samples are available across the frame.

Higher resolution can preserve finer detail, but it also creates more data that must be encoded.

Resolution therefore interacts with compression rather than replacing it.

11. Frame Rate Measures Temporal Sampling

Video also samples time.

More frames per second can represent faster motion more smoothly, but each additional frame increases the amount of temporal information the codec must manage.

Some compression systems become efficient precisely because adjacent frames contain similar information.

12. Bit Depth Measures Precision Per Sample

Bit depth affects how many discrete values can be represented for colour or audio amplitude.

More precision can preserve subtle gradients and wider processing headroom, but increases data requirements.

The appropriate depth depends on capture, editing, display and archival needs.

13. Bitrate Measures Data Flow Through Time

Bitrate describes how many bits are used per unit of time for time-based media such as audio and video.

Higher bitrate generally gives the encoder more capacity to preserve detail, but quality also depends on codec efficiency, content complexity, resolution and encoding choices.

Bitrate is a resource budget, not a quality score by itself.

14. Constant and Variable Bitrate Solve Different Problems

Some delivery systems benefit from predictable data flow. Others benefit from allowing complex scenes to use more bits and simple scenes fewer.

Variable allocation can improve efficiency because media complexity is not constant.

A nearly static interview and a fast-moving sports scene do not present the encoder with the same challenge.

15. Image Compression Uses Spatial Structure

Images contain relationships among neighbouring pixels, edges, textures and colour regions.

Compression methods can transform and represent these patterns more efficiently than storing every pixel independently.

An earlier eduKateSG mathematics application, Making Digital Pictures Smaller Without Losing What Matters, explores how mathematical thinking enters this problem.

16. Video Compression Adds Prediction Across Time

Video compression can compare frames and encode change rather than repeatedly describing the entire scene.

If a background remains almost unchanged while one person moves, the representation can exploit that continuity.

This is one reason video compression can achieve reductions impossible through frame-by-frame image compression alone.

17. Key Frames Anchor Reconstruction

Many video systems periodically encode a more complete frame and represent nearby frames partly in relation to it.

This improves efficiency but introduces dependencies. Damage to one part of a compressed stream can affect more than one visible frame.

The media token becomes a structure of relationships rather than a stack of independent photographs.

18. Audio Compression Uses Spectral and Perceptual Structure

Audio compression can exploit repeating signal structure and properties of hearing.

For lossy audio, the encoder may allocate fewer bits to components less likely to be noticed under surrounding sounds.

The goal is not to preserve every numerical sample. It is to preserve a sufficiently faithful listening experience for the intended use.

19. Artefacts Reveal the Compression Strategy

When compression becomes too aggressive, discarded information becomes visible or audible as artefacts.

  • blockiness,
  • ringing around edges,
  • banding in smooth gradients,
  • smearing in motion,
  • loss of fine texture,
  • metallic or watery audio effects,
  • unstable detail across frames.

Artefacts are not random. They are traces of what the representation system chose not to preserve well.

20. Recompression Compounds Loss

A lossy file decoded and re-encoded through another lossy cycle can lose additional information.

This is why editing workflows often preserve a high-quality master and generate delivery versions from that master rather than repeatedly recompressing already degraded derivatives.

Copying a lossy file does not necessarily hurt it; decoding and lossy re-encoding can.

21. The Master and the Delivery Copy Have Different Jobs

An archival or editing master preserves more information so future transformations remain possible.

A delivery copy is optimised for the receiver’s bandwidth, device and context.

Confusing the two can create irreversible quality loss.

This is media authenticity at the edition level: different manifestations can descend from the same work while serving different purposes.

22. Adaptive Streaming Creates Many Delivery Versions

Modern streaming systems can prepare several versions of the same media at different resolutions and bitrates.

The player switches among them according to network conditions, device capability and buffer state.

The receiver therefore does not necessarily watch one fixed file from beginning to end.

The media manifestation can change while the represented work remains continuous.

23. Compression Enables Distribution

Without compression, large-scale digital photography, music streaming, video calls and online video would place far greater demands on networks and storage.

Compression therefore sits upstream of How Media Distribution Works.

It makes representation portable enough for distribution systems to operate economically.

24. Compression Has an Economics

Storage, bandwidth and computation cost resources.

Smaller files can reduce delivery cost and improve responsiveness. More advanced codecs can reduce bitrate at a given quality but may require more computation to encode or decode.

This creates a system trade-off among bandwidth, storage, processing, latency, battery use and compatibility.

Those incentives connect directly to How Media Economics Works.

25. Compatibility Is Part of Compression Quality

A technically efficient codec is not useful to a receiver whose device cannot decode it.

Format choice therefore depends on ecosystem support as well as compression performance.

A representation that cannot be decoded has perfect compression efficiency for nobody.

26. Compression Affects Accessibility

Efficient media can make content usable on slower networks and lower-cost devices.

But aggressive compression can remove information some receivers depend on: subtle speech cues, text legibility, visual contrast or fine detail.

Accessibility testing should therefore include compressed delivery states, not only pristine masters.

27. Compression Can Damage Evidence

For ordinary viewing, a compressed image may look entirely acceptable.

For forensic analysis, scientific measurement or archival restoration, the discarded information may have mattered.

A compressed derivative should therefore not automatically be treated as equivalent to the highest-quality available source.

This connects to How Media Authenticity Works.

28. Provenance Should Record Transformations

If media has been resized, transcoded, denoised, sharpened or repeatedly recompressed, those transformations can matter.

High-stakes workflows benefit from preserving the source master and a record of derived versions.

Compression should reduce data, not erase lineage.

29. Metadata Can Survive or Disappear

Re-encoding workflows may preserve, rewrite or strip metadata.

Dates, camera information, colour profiles, captions and rights information can therefore be separated from the media payload even when the visible image or sound survives.

This is another reason media authenticity and attribution cannot be judged solely by visible quality.

30. Compression Changes Searchability Indirectly

Compression that makes speech unintelligible can weaken transcription. Compression that blurs text can weaken optical recognition. Lost metadata can weaken indexing.

Thus a representation can remain human-viewable while becoming less machine-searchable.

This connects to How Media Search Works.

31. Quality Metrics Are Proxies

Engineers can compare decoded media with a source using mathematical quality measures, but no single score perfectly captures human judgment for every task.

Perceptual quality, task success and technical similarity are related but not identical.

This is another example of the principle from How Media Metrics Work: the metric is not the thing itself.

32. More Resolution Does Not Guarantee More Useful Detail

A high-resolution file can contain blur, noise or aggressive compression artefacts.

Conversely, a lower-resolution image from a strong source may preserve the task-relevant detail more clearly.

Pixel count measures sampling density, not truth, sharpness or evidential value.

33. Upscaling Does Not Recover the Original Past

Software can enlarge an image and estimate plausible additional detail.

This can improve appearance and usability.

But generated or inferred detail should not be confused with measurements that were actually captured in the original record.

The distinction is particularly important when media is being used as evidence.

34. AI Can Perform Learned Compression

Machine-learned systems can model regularities in images, audio and video and use those learned structures to represent signals more efficiently.

The broad principle remains familiar: exploit predictability and preserve what matters under a resource constraint.

What changes is the sophistication of the model used to decide what can be represented compactly.

35. Generative Reconstruction Blurs Compression and Synthesis

A traditional decoder reconstructs from encoded information under a defined codec.

A generative system may infer plausible detail from a learned model.

This can produce extremely convincing outputs while weakening the direct relationship between each visible detail and the original capture.

The more reconstruction depends on prior learned knowledge, the more important it becomes to distinguish recovered signal from generated plausibility.

36. Compression Is a Versioning Problem

A single source may generate thumbnails, previews, mobile versions, streaming ladders, social crops and archival masters.

These should be understood as related manifestations rather than unrelated files.

Version identity helps corrections and replacements propagate to the right derivatives.

37. Corrections Need the Source Master

If a media item must be corrected—perhaps a caption, crop, subtitle or visual detail—the best repair often begins from the highest-quality trustworthy source rather than a compressed derivative.

This links compression to How Media Corrections Work.

Preserving masters is therefore part of repair readiness.

38. Compression Literacy

  • Is this source lossless or lossy?
  • Was it resized as well as compressed?
  • What resolution and frame rate are available?
  • What bitrate or quality setting was used?
  • Is this the master or a delivery derivative?
  • Has it been recompressed repeatedly?
  • Are visible artefacts affecting the task?
  • Was important metadata stripped?
  • Could generated reconstruction be mistaken for captured detail?
  • Does the receiver need exact data or only perceptual fidelity?

39. The Compression Equation

useful compression = preserved task-relevant information ÷ storage + bandwidth + processing cost.

This is conceptual rather than literal mathematics. It expresses the engineering objective: preserve what matters while reducing resource demand.

40. The Full Compression Chain

captured signal → sampling → source master → transform/prediction → bit allocation → encoded stream → container → transmission/storage → decoding → display/playback → receiver.

Every step can affect fidelity, compatibility and provenance.

41. The Civilisational Trade-Off

Compression allows civilisation to move staggering quantities of visual and acoustic representation through finite infrastructure.

It makes planetary media practical.

But portability requires selection. Selection can create loss. Loss is harmless only when the discarded dimensions do not matter to the receiver’s task.

The smaller the token becomes, the more important it is to know what the system decided you could afford to lose.

42. Final Thesis

Media compression is one of the hidden machines that makes modern representation portable.

Lossless systems find more efficient codes. Lossy systems decide which differences can be surrendered. Codecs formalise the encoding and decoding relationship. Resolution, frame rate, bit depth and bitrate define different resource and fidelity dimensions. Streaming systems adapt them to networks and devices.

The crucial lesson is not that compression is bad because it removes information.

All practical media systems operate under constraints.

The mature question is: what information was preserved, what was discarded, why was that trade made, and is the resulting representation still fit for the job we are asking it to do?

Continue with the canonical series at How Media Works | Reality, Representation, Memory and the Human Interface.