Encoding converts a physical signal into a digital bit stream for transmission or storage. A codec performs encoding and decoding.
Encoding Process
Digitisation
Digitisation converts an analogue signal into digital samples.
| Media | Digitisation Parameters |
|---|---|
| Audio | Sampling rate and quantisation bits per sample. |
| Images | Picture dimensions, pixel depth, and colour representation. |
| Video | Image parameters, frame rate, and interlacing. |
Coding
Coding represents digitised media in a form suitable for transmission or storage.
- Exploits media characteristics to reduce the data rate.
- Balances reconstruction quality against data rate.
Multimedia Formats and Codecs
A container defines how media streams and their parameters are stored in a file or stream. A codec defines how an individual media stream is encoded.
A container can hold audio, video, text, slides, or whiteboard streams.
| Category | Examples |
|---|---|
| Containers | AVI, ASF, FLV, MPEG program streams. |
| Audio codecs | G.711, GSM-EFR, G.729, MP3. |
| Video codecs | H.261, MPEG-1 Video, MPEG-2 Video, MPEG-4 Part 2, H.264/AVC. |
Codec Requirements
- Low data rate.
- High reconstruction quality.
- Low encoding and decoding delay.
- Low computational complexity and power consumption.
- Robustness to repeated encoding and decoding through different codecs.
- Resilience to packet loss.
Codec selection depends on the application, existing infrastructure, standards, patent constraints, and user expectations.
Codec Types
| Classification | Type | Property |
|---|---|---|
| Reconstruction | Lossless | Reconstructs the original input exactly. |
| Reconstruction | Lossy | Discards selected information to reduce the data rate. |
| Output rate | Constant bit rate (CBR) | Maintains a fixed target output rate. |
| Output rate | Variable bit rate (VBR) | Varies the output rate with content complexity. |
- Lossless coding suits fax, presentation data, and medical images requiring exact reconstruction.
- Lossy coding suits audio and video when some distortion is acceptable.
- CBR suits fixed-rate channels.
- VBR suits packet-switched networks and stored media.