Multimedia System ApplicationUnit 58 min read
Video Fundamentals: Frame Rates, Codecs, Formats, Streaming & Compression
Unit 5 of Multimedia System Application explores how video works—key concepts like frame rates, resolution, codecs (H.264, VP9), container formats (MP4, MKV), streaming protocols (RTMP, HLS), and compression techniques (intra-frame vs. inter-frame). It covers real-world applications in apps like YouTube, Daraz Live, an
Core Concepts of Video Fundamentals
What is Video?
Video is a time-based medium that combines sequential images (frames) with audio to create motion. It relies on three fundamental principles:
- Persistence of vision: The brain perceives rapid image changes as continuous motion.
- Frame rate (fps): Number of frames displayed per second (e.g., 24fps for films, 60fps for gaming).
- Resolution: Pixel dimensions (e.g., 1080p = 1920×1080 pixels).
graph LR
A["Video"] --> B["Frames"]
A --> C["Audio"]
B --> D["Frame Rate (fps)"]
B --> E["Resolution (pixels)"]
C --> F["Sample Rate (Hz)"]
C --> G["Bit Depth (bits)"]Frame Rate and Motion Perception
Frame rate determines smoothness and realism of motion. Higher fps reduces motion blur but increases file size.
| Frame Rate (fps) | Use Case | Human Perception |
|---|---|---|
| 24fps | Films, cinematic | Slightly "film-like," natural motion |
| 30fps | Standard TV, YouTube | Smooth, widely compatible |
| 60fps | Gaming, sports, 4K TV | Ultra-smooth, reduces motion blur |
| 120fps+ | Slow-motion, VR | Highly detailed motion, large file sizes |
Worked Example: YouTube Upload
- A 60fps 1080p video requires ~100 Mbps bitrate (vs. 24fps at ~20 Mbps).
- Trade-off: Higher fps improves quality but increases storage/bandwidth costs.
Video Resolution and Aspect Ratio
Resolution defines pixel count, while aspect ratio defines shape (width:height).
| Resolution | Pixels | Aspect Ratio | Common Use |
|---|---|---|---|
| 480p (SD) | 854×480 | 4:3 or 16:9 | Old TVs, low-bandwidth |
| 720p (HD) | 1280×720 | 16:9 | Standard YouTube, streaming |
| 1080p (Full HD) | 1920×1080 | 16:9 | Blu-ray, modern TVs |
| 4K (UHD) | 3840×2160 | 16:9 | High-end gaming, cinema |
| 8K | 7680×4320 | 16:9 | Future-proof, niche |
Real-World Tie-In: Daraz Live
- Daraz Live streams in 720p at 30fps to balance quality and mobile bandwidth.
- Why? Most Nepali users have limited data (~500MB/month), so 4K would be impractical.
Video Codecs: Compression Algorithms
Codecs (codecer-decoder) compress raw video data to reduce file size. Key types:
| Codec | Type | Compression | Use Case |
|---|---|---|---|
| H.264 (AVC) | Lossy | High efficiency | YouTube, Netflix, Blu-ray |
| H.265 (HEVC) | Lossy | 50% smaller than H.264 | 4K streaming, OTT platforms |
| VP9 | Lossy | Open-source, efficient | YouTube, WebM |
| MPEG-2 | Lossy | Older standard | DVDs, broadcast TV |
| ProRes | Lossless | High quality | Professional editing (Final Cut) |
How Codecs Work:
- Intra-frame compression: Compresses each frame independently (e.g., JPEG for video).
- Inter-frame compression: Exploits similarities between frames (e.g., H.264 predicts motion).
- Keyframes (I-frames): Full frames for reference.
- P-frames: Predicted from previous frames.
- B-frames: Bidirectional (from past/future frames).
sequenceDiagram
participant I as I-Frame (Keyframe)
participant P as P-Frame
participant B as B-Frame
I->>P: Reference
P->>B: Forward Prediction
B->>P: Backward PredictionWorked Example: Ncell’s Video Calls
- Uses H.264 at 30fps, 720p to minimize latency.
- Why? Low bitrate (~1 Mbps) ensures smooth calls on 2G/3G networks.
Video Container Formats
Containers hold video + audio + metadata in a single file. Common formats:
| Format | Extension | Codecs Supported | Use Case |
|---|---|---|---|
| MP4 | .mp4 | H.264, AAC, MP3 | Web (YouTube, Vimeo), mobile |
| MKV | .mkv | Any (VP9, H.265, etc.) | Lossless archiving, subtitles |
| AVI | .avi | Older codecs (MPEG-2) | Legacy systems |
| MOV | .mov | ProRes, H.264 | Apple ecosystem (iPhone, Final Cut) |
| WebM | .webm | VP9, Vorbis | HTML5 video (open-source) |
Video Streaming Protocols
Streaming delivers video without full download. Key protocols:
| Protocol | Type | Use Case | Latency |
|---|---|---|---|
| RTMP | Real-time | Live streaming (Facebook Live) | Low (~2s) |
| HLS | HTTP-based | YouTube, Netflix | Medium (~5s) |
| DASH | Adaptive | High-end streaming (4K) | High (~10s) |
| WebRTC | Peer-to-peer | Video calls (Zoom, WhatsApp) | Very Low (~0.5s) |
Worked Example: YouTube Streaming
- HLS splits video into small chunks (2-10s).
- Adaptive bitrate: Switches between 720p/1080p based on user bandwidth.
- Buffering: Preloads chunks to avoid playback stutter.
timeline
title YouTube Buffering Process
YouTube Server: Requests chunk 1 (720p) | Updates: Chunk 1 loaded
User Device: Plays chunk 1 | Requests chunk 2
YouTube Server: Sends chunk 2 (adjusts to 1080p if bandwidth allows)Video Compression Techniques
1. Spatial Compression
- Reduces pixel redundancy in a single frame (e.g., JPEG for images).
- DCT (Discrete Cosine Transform): Converts pixels to frequency domains.
2. Temporal Compression
- Exploits similarities between frames (motion estimation).
- Example: A talking head changes little between frames → store only differences.
3. Quantization
- Reduces precision of data (e.g., storing 8-bit color instead of 16-bit).
- Trade-off: Higher quantization = smaller file but more artifacts.
In the Real World
YouTube (Google)
- Uses H.264/VP9 + HLS/DASH for adaptive streaming.
- Why? Balances quality and bandwidth for global users (including Nepal’s slow connections).
Daraz Live (Daraz)
- Streams in 720p at 30fps with RTMP for low-latency shopping events.
- Why? Most Nepali users have limited data (~500MB/month), so 4K is impractical.
Ncell’s Video Calls
- Uses H.264 at 30fps, 720p (~1 Mbps) to work on 2G/3G networks.
- Why? Older networks can’t handle 4K, but low latency is critical for calls.
Nepal Stock Exchange (NEPSE) Live Feeds
- Uses low-bitrate H.264 (480p, 15fps) to show stock prices in real-time.
- Why? Traders need speed over quality—high fps/4K would delay updates.
Exam Tip
Frame Rate vs. Resolution:
- 24fps = cinematic, 30fps = standard, 60fps+ = gaming/VR.
- 1080p is most common in exams; know its pixel count (1920×1080).
Codecs and Containers:
- H.264 = YouTube, H.265 = 4K, MP4 = web, MKV = lossless.
- RTMP = live, HLS/DASH = on-demand.
Compression Trade-offs:
- Lossy (H.264) = smaller files but artifacts.
- Lossless (ProRes) = no quality loss but huge files.
Real-World Applications:
- YouTube = H.264 + HLS.
- Daraz Live = 720p, 30fps, RTMP.
- Ncell calls = H.264, low bitrate.
Common Pitfalls:
- Don’t confuse frame rate (fps) with bitrate (Mbps).
- Aspect ratio is width:height (e.g., 16:9), not pixels.
- Keyframes (I-frames) are critical for seeking in videos.
Final Checklist for Exams: ✅ Can you list 3 frame rates and their uses? ✅ What’s the difference between H.264 and H.265? ✅ How does YouTube’s adaptive streaming work? ✅ What’s the pixel count of 1080p? ✅ Why does Daraz Live use 720p instead of 4K?
Based on the TU BIM syllabus for Multimedia System Application (IT273), unit 5.
Discussion
Loading…