7. 7. CDN caches video manifests and segments from Streaming Origin Server.
8. 8. Client Player requests video manifest from CDN and starts playback.
9. 9. Client Player monitors network conditions and switches between bitrates adaptively.
Database Schema
Entities:
- Video: id (PK), title, description, upload_time, uploader_id
- TranscodingJob: id (PK), video_id (FK), status, created_at, completed_at
- VideoSegment: id (PK), video_id (FK), bitrate, resolution, segment_url
Relationships:
- One Video has many TranscodingJobs
- One Video has many VideoSegments representing different qualities
Scaling Discussion
Bottlenecks
Transcoding workers overwhelmed by high upload volume
Storage I/O bottleneck due to large video files
Streaming origin server unable to handle many manifest requests
The user device then selects the best quality based on bandwidth from these options.
Final Answer:
Server transcodes -> Adaptive bitrate streaming prepares multiple qualities -> User device selects quality -> Option A
Quick Check:
Transcoding before streaming, device selects quality [OK]
Hint: Transcode first, then device picks quality [OK]
Common Mistakes:
Thinking user device does transcoding
Assuming adaptive bitrate transcodes video
Believing server streams single fixed quality
3. Given a video streaming system where the server transcodes a 4K video into 1080p, 720p, and 480p qualities, what happens when a user with low bandwidth starts streaming?
medium
A. The user receives the 4K stream regardless of bandwidth
B. The user cannot stream the video at all
C. The user receives the 1080p stream only
D. The user receives the 480p stream to avoid buffering
Solution
Step 1: Identify adaptive bitrate behavior for low bandwidth
Adaptive bitrate streaming selects the lowest quality stream that fits the user's bandwidth to reduce buffering.
Step 2: Match user bandwidth to available qualities
For low bandwidth, the system chooses 480p to ensure smooth playback.
Final Answer:
The user receives the 480p stream to avoid buffering -> Option D
Quick Check:
Low bandwidth = lowest quality stream [OK]
Hint: Low bandwidth means lowest quality stream chosen [OK]
Common Mistakes:
Assuming user always gets highest quality
Thinking 1080p is default for all users
Believing low bandwidth blocks streaming
4. A streaming service notices frequent buffering despite using adaptive bitrate streaming. Which issue below is the most likely cause?
medium
A. User devices are not switching to lower bitrate streams when bandwidth drops
B. Server is transcoding videos into too many qualities
C. Videos are encrypted with strong DRM
D. Adaptive bitrate streaming is disabled on the server
Solution
Step 1: Analyze buffering cause in adaptive bitrate streaming
Buffering happens if user devices do not switch to lower bitrate streams when bandwidth decreases.
Step 2: Evaluate other options
Too many qualities or encryption do not directly cause buffering; disabling adaptive bitrate would stop quality switching entirely.
Final Answer:
User devices are not switching to lower bitrate streams when bandwidth drops -> Option A
Quick Check:
Buffering = no bitrate switch on bandwidth drop [OK]
Hint: Buffering often means no bitrate switch on poor network [OK]
Common Mistakes:
Blaming transcoding quantity for buffering
Ignoring device behavior in adaptive streaming
Confusing encryption with buffering issues
5. You are designing a scalable video streaming system that supports millions of users with adaptive bitrate streaming. Which architectural choice best supports efficient transcoding and delivery?
hard
A. Use a centralized transcoding server that processes all videos on demand
B. Transcode videos on user devices to reduce server load
C. Pre-transcode videos into multiple qualities and store them in a distributed CDN
D. Stream only the highest quality video and rely on user buffering
Solution
Step 1: Consider scalability and latency in transcoding
Centralized on-demand transcoding causes delays and bottlenecks; user device transcoding is impractical.
Step 2: Evaluate delivery efficiency
Pre-transcoding and storing multiple qualities in a distributed CDN allows fast delivery and adaptive bitrate streaming at scale.
Final Answer:
Pre-transcode videos into multiple qualities and store them in a distributed CDN -> Option C