Multimedia SystemUnit 29 min read
Multimedia Data Representation & Formats: Types, Standards & Compression Basics
Unit 2 of Multimedia System explores how digital media (audio, video, images) are encoded, stored, and formatted—covering binary representations, file formats (JPEG, MP3, MP4), metadata standards (EXIF, ID3), and why compression is essential. Includes real-world examples from eSewa, YouTube, and Ncell.
TAKEAWAYS:
- Multimedia data is digitized into binary (0s/1s) using sampling, quantization, and encoding for storage/transmission.
- File formats (e.g., JPEG for images, MP3 for audio) define compression methods, metadata, and compatibility.
- Lossless vs. lossy compression trade off quality and file size—critical for streaming (YouTube) and storage (eSewa).
- Metadata (e.g., EXIF in photos, ID3 in MP3) enables search, organization, and device compatibility.
- Standards (MPEG, JPEG, WAV) ensure interoperability across platforms (e.g., WhatsApp’s video calls use H.264).
- Real-world impact: Compression saves bandwidth (Pathao’s ride-hailing), while metadata powers eSewa’s bill searches.
Core Concepts: How Multimedia Data is Represented
Multimedia systems rely on digitizing real-world signals (sound, images, video) into binary data. This process involves three key steps:
- Sampling: Capturing discrete values of a continuous signal (e.g., audio waves).
- Quantization: Converting sampled values into finite digital levels (e.g., 16-bit audio).
- Encoding: Representing quantized data in binary (e.g.,
01010110for a pixel color).
Why Binary?
All multimedia data—whether audio, video, or images—is stored as binary digits (bits) because:
- Computers process only binary.
- Binary enables compression (reducing file size without losing quality, if done losslessly).
- Binary supports metadata (hidden data like timestamps, author names).
1. Data Representation for Different Media Types
Each multimedia type has unique binary representations:
| Media Type | Sampling Method | Binary Representation Example | Key Formats |
|---|---|---|---|
| Audio | Pulse-Code Modulation (PCM) | 16-bit samples (e.g., 00000000 11110000 for -128) |
WAV, MP3, AAC |
| Images | Pixel color values (RGB/HSV) | 24-bit RGB: RRRGGGBBB (8 bits per channel) |
JPEG, PNG, GIF |
| Video | Frames + audio + metadata | H.264 encodes frames as compressed binary streams | MP4, MKV, AVI |
Worked Example: How a Photo Becomes a JPEG
- Capture: A camera sensor records light as RGB values (e.g., red=200, green=150, blue=100).
- Quantization: RGB values are stored as 8-bit binary per channel:
- Red:
11001000(200 in decimal) - Green:
10010110(150 in decimal) - Blue:
01100100(100 in decimal)
- Red:
- Compression: JPEG discards redundant data (e.g., similar colors in large areas) to shrink file size by ~90%.
2. File Formats: Standards and Trade-offs
File formats define how data is encoded, compressed, and stored. Key formats:
A. Image Formats
| Format | Compression | Use Case | Pros/Cons |
|---|---|---|---|
| JPEG | Lossy (DCT) | Photos, web images | Small size, but loses quality on recompression |
| PNG | Lossless (LZW) | Logos, screenshots | No quality loss, but larger files |
| GIF | Lossless (LZW) | Animated images, simple graphics | Limited colors (256), small file size |
B. Audio Formats
| Format | Compression | Use Case | Pros/Cons |
|---|---|---|---|
| WAV | Uncompressed (PCM) | Raw audio editing | High quality, but huge file sizes |
| MP3 | Lossy (MP3 codec) | Music streaming | Small size, but loses high frequencies |
| AAC | Lossy (AAC codec) | YouTube, Apple Music | Better quality than MP3 at same bitrate |
C. Video Formats
| Format | Codec | Use Case | Pros/Cons |
|---|---|---|---|
| MP4 | H.264/AAC | YouTube, Netflix | Balanced quality/size |
| MKV | H.265/VP9 | High-quality downloads | Supports many codecs, but not all devices |
| AVI | DivX/Xvid | Legacy video editing | Uncompressed, large files |
3. Metadata: The Invisible Data
Metadata is hidden data embedded in files to describe content. Examples:
- EXIF (in images): Camera settings (ISO, aperture), GPS location, timestamp.
- ID3 (in MP3): Song title, artist, album art.
- XMP (in PDFs): Author, creation date, keywords.
Real-World Example: eSewa’s Bill Search
When you scan a bill in the eSewa app, the app reads:
- EXIF metadata from the photo (e.g., timestamp, device model).
- OCR (Optical Character Recognition) extracts text (e.g., bill number, amount).
- Database lookup matches the bill number to your account.
4. Why Compression is Essential
Compression reduces file size by removing redundancy or approximating data. Two types:
| Type | Method | Example | Use Case |
|---|---|---|---|
| Lossless | No data loss (e.g., ZIP, FLAC) | PNG, GIF, FLAC | Archives, medical imaging |
| Lossy | Sacrifices quality (e.g., JPEG) | MP3, H.264, JPEG | Streaming, mobile apps |
Worked Example: Compressing a YouTube Video
- Original: 1080p video = 10 GB (uncompressed).
- H.264 Compression:
- Removes redundant frames (e.g., static backgrounds).
- Uses discrete cosine transform (DCT) to approximate colors.
- Result: ~500 MB (95% smaller) with minimal quality loss.
## In the Real World
eSewa’s Bill Upload
- Idea Used: Metadata (EXIF + OCR) and lossless compression (PNG for bills).
- How: The app extracts text from scanned bills using metadata timestamps and OCR to verify authenticity before processing payments.
YouTube’s Video Streaming
- Idea Used: Lossy compression (H.264/AAC) and adaptive bitrate streaming.
- How: Videos are compressed into multiple bitrates (e.g., 720p, 1080p) so users get the best quality based on their internet speed.
Ncell’s Mobile Data Plans
- Idea Used: Data compression (HTTP/3, QUIC) and efficient formats (MP4 for videos).
- How: Compressed video formats (like MP4) reduce data usage, letting users stream more with limited MBs.
Daraz’s Product Images
- Idea Used: JPEG compression and metadata (alt text for SEO).
- How: Product photos are compressed to JPEG to load fast on mobile, while metadata (like product descriptions) helps search engines rank them.
NEPSE’s Stock Market Data
- Idea Used: Lossless compression (CSV/JSON) and metadata (timestamps, volume).
- How: Stock price data is stored in compressed CSV files to save storage, while metadata ensures traders get real-time, accurate updates.
## Exam Tip
Definitions Matter:
- Know the difference between lossless (e.g., PNG) and lossy (e.g., JPEG) compression.
- Memorize key formats: WAV (audio), JPEG (images), MP4 (video).
Real-World Applications:
- Link compression to bandwidth savings (e.g., Pathao apps, YouTube).
- Explain metadata using examples like eSewa bills or EXIF in photos.
Diagrams = Marks:
- Draw binary representations (e.g., RGB to binary).
- Sketch compression workflows (e.g., H.264 frames).
Common Pitfalls:
- ❌ Don’t confuse JPEG (lossy) with PNG (lossless).
- ❌ Avoid vague answers—always tie concepts to real products (e.g., "WhatsApp uses H.264 for video calls").
Past Exam Patterns:
- Short Questions: Define multimedia data representation, list 3 image formats.
- Long Questions: Explain compression in YouTube videos OR how eSewa uses metadata.
Final Visual Summary:
mindmap
root((Multimedia Data Representation))
DataTypes
Audio["PCM Sampling → Binary (WAV/MP3)"]
Video["Frames + Audio → Binary (MP4/H.264)"]
Compression
Lossless["No Quality Loss (PNG, ZIP)"]
Lossy["Smaller Size (JPEG, MP3)"]
Metadata
EXIF["Photos: Camera Settings, GPS"]
ID3["MP3: Song Title, Artist"]
XMP["PDFs: Author, Keywords"]
RealWorld
eSewa["Metadata + OCR for Bills"]
YouTube["H.264 Compression for Streaming"]
Ncell["MP4 Videos for Data Savings"]Based on the TU BCA syllabus for Multimedia System (CACS457), unit 2.
Discussion
Loading…