MPEG

Work in progress. This note is still being written and incomplete.

MPEG stands for Moving Picture Experts Group, which develops standards for coded media and associated systems.

MPEG Standards

StandardScope and Examples
MPEG-1VCD audio and video, with a target around 1.5 Mbps at 352 × 240 for the lecture’s example.
MPEG-2DVD and digital television, including interlaced video and different profiles and levels.
MPEG-3HDTV proposal discontinued when MPEG-2 was considered sufficient.
MPEG-4Audio-visual objects, 3D content, low-bit-rate coding, and rights-management support.
MPEG-4 Part 10H.264, also called Advanced Video Coding (AVC).

The lecture’s technical-specification breakdown refers to MPEG-2.

MPEG-2 PartPurpose
1Systems, synchronisation, and multiplexing.
2Video coding.
3Audio coding.
4Conformance testing.
5Software simulation.
6Digital Storage Media Command and Control (DSM-CC).
7Advanced Audio Coding (AAC).
8Discontinued part.
9Real-time interfaces.
10DSM-CC conformance extensions.

MPEG Video Coding

Spatial Processing

Classic MPEG spatial processing follows a JPEG-like approach.

  1. Convert RGB into luminance and chrominance components.
  2. Divide the image data into 8 × 8 blocks.
  3. Apply a 2-dimensional DCT to each block.
  4. Quantise the DCT coefficients.
  5. Order the coefficients for run-length and entropy coding.

Temporal Processing

Classic MPEG motion prediction uses macroblocks with a 16 × 16 luminance region and associated chrominance data.

  • Search reference pictures for a similar region.
  • Encode motion vectors and residual differences.
  • Use intra-coded blocks when prediction is unsuitable.
  • Scene changes can trigger a new intra-coded reference picture.

Frame Types

FrameCoding MethodTypical Relative Size in the Lecture
I-frameIntra-coded without another frame as a reference.Largest.
P-framePredicted from a preceding I- or P-frame.Approximately 1/3 of an I-frame.
B-frameCan use preceding and following I- or P-frames.Approximately 1/6 of an I-frame.

Relative sizes depend on content and encoder settings.

Group of Pictures

A group of pictures (GOP) is a sequence of coded pictures organised around reference pictures.

  • The lecture uses typical lengths of 12 or 15 frames.
  • I-frames provide entry points for random access.
  • Transmission and decoding order can differ from display order.
  • Long prediction chains can propagate reference errors and complicate recovery.
  • Bidirectional prediction introduces reordering delay.

A closed GOP requires no reference pictures outside the group.

Bit-Rate Allocation

ModeAllocationImplication
CBRConstrains output to a target rate.Simplifies delivery over a fixed-capacity channel.
VBRAllocates more bits to complex scenes.Improves allocation across content with changing complexity.

Stored media can use 2-pass VBR encoding to analyse scene complexity before allocating bits.

MPEG Audio Coding

StandardProperties
MPEG-1 audioDefines Layers I, II, and III with different coding complexity.
MPEG-1 Layer IIIMP3, with sampling rates of 32, 44.1, or 48 kHz and bit rates from 32 to 320 kbps.
MPEG-2 audioExtends support to multichannel audio and lower sampling frequencies.
AACSupports sampling frequencies from 8 to 96 kHz and improved coding efficiency.

MPEG audio can use CBR or VBR.

MPEG Systems

Container Formats

ContainerIntended Environment
Program Stream (PS)Relatively reliable media such as disks.
Transport Stream (TS)Error-prone delivery such as broadcast or network links.

Audio-Video Synchronisation

Presentation timestamps (PTS) specify when decoded media should be presented.

  • PTS uses a 90 kHz clock scale.
  • Program Clock Reference (PCR) values let a transport-stream receiver recover sender timing.
  • A phase-locked loop (PLL) can synchronise the receiver clock.

Worked Example

Frame Dependencies and Random Access

Adapted from December 2022 and November 2023, Question 4. The sequence below is an illustrative closed GOP.

Display order:

I0  B1  B2  P3  B4  B5  P6

Assume each P-frame references the preceding I- or P-frame. Each B-frame uses both surrounding reference frames.

FrameRequired Reference Frames
I0None.
B1, B2I0 and P3.
P3I0.
B4, B5P3 and P6.
P6P3.

A valid decoding order is:

I0  P3  B1  B2  P6  B4  B5

To seek directly to B4 with an empty decoder:

  1. Locate the preceding random-access I-frame, I0.
  2. Decode I0.
  3. Decode P3 using I0.
  4. Decode P6 using P3.
  5. Decode B4 using P3 and P6.
  6. Begin display at B4.

B1 and B2 are unnecessary for this seek because no later frame references them in this example.

  • Losing P3 affects P6 and every B-frame that depends on either reference.
  • Losing B4 does not invalidate the other frames in this example.
  • Longer GOPs can reduce I-frame overhead but increase the reference chain needed for seeking and recovery.
  • Only a closed GOP avoids references to pictures outside the group.
Written by September 29, 2026 5 min read
Was this helpful?