Streaming media and adjusting bitrate

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Streaming media and adjusting bitrate

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A video keeps pausing on a slow connection. What does an adaptive bitrate stream do?
A Lowers the bitrate so the video keeps playing smoothly
B Keeps the bitrate high and waits until the video catches up
2. Which statement about streaming services is true?
A They send compressed audio and video
B They send raw uncompressed files
3. What is buffering?
A The video being compressed again by your phone
B Playback pausing while the device waits for more data to arrive
4. Your streaming app suddenly makes the picture blurry on a weak Wi-Fi signal. Why?
A It switched to a lower bitrate automatically
B The video file was permanently damaged
5. What is the trade-off when a stream uses a lower bitrate?
A Higher quality but more buffering
B Lower quality but smoother playback

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1bitrate = 320 kbps AA high bitrate gives better audio quality but needs a fast connection and more data
2if speed < 2: quality = "360p" Bif data_saver: max_bitrate = 128
3Buffering happens when the data arrives slower than the video needs it to play Cif download_speed < video_bitrate: buffering = True
4Mobile data saver mode caps the bitrate so a stream uses less of the data limit DAutomatic quality change: the stream drops to a lower quality when the connection is slow
5if speed is slow: raise bitrate to 1080p ERaising the bitrate on a slow connection makes buffering worse. Adaptive streaming should lower the bitrate.
6Lower bitrate = bigger file and better quality FA lower bitrate means less data per second, so a smaller stream and lower quality, not bigger and better.

Definitions

adaptive bitrate

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
__ speed < 2 THEN bitrate ← 500 END IF
2.
IF dataUsed _ dataLimit THEN bitrate ← 500 END IF
3.
IF speed < 2 THEN bitrate _ 500 END IF
4.
IF speed < 2 THEN bitrate ← 500 ____ bitrate ← 4000
5.
IF _________ = TRUE THEN bitrate ← bitrate - 500 END IF

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A speed ← measure_speed()
B IF speed > 3 THEN
C bitrate ← 480
D ENDIF
Question 2
A WHILE buffer > 5
B keep loading video
C ENDWHILE
D play video
Question 3
A speed ← 1 Mbps
B IF speed < 2 THEN
C quality ← HIGH
D ENDIF
Question 4
A data_left ← 200
B WHILE data_left > 0
C stream_chunk(bitrate
D data_left ← data_left - size
E ENDWHILE
Question 5
A IF buffering = TRUE
B lower bitrate
C ENDIF

Answer Key

Streaming media and adjusting bitrate
Section A: Quick Questions
Q1
A — Lowers the bitrate so the video keeps playing smoothly
Q2
A — They send compressed audio and video
Q3
B — Playback pausing while the device waits for more data to arrive
Q4
A — It switched to a lower bitrate automatically
Q5
B — Lower quality but smoother playback
Section B: Match the Pairs
Q1
bitrate = 320 kbps → A high bitrate gives better audio quality but needs a fast connection and more data
Q2
if speed < 2: quality = "360p" → Automatic quality change: the stream drops to a lower quality when the connection is slow
Q3
Buffering happens when the data arrives slower than the video needs it to play → if download_speed < video_bitrate: buffering = True
Q4
Mobile data saver mode caps the bitrate so a stream uses less of the data limit → if data_saver: max_bitrate = 128
Q5
if speed is slow: raise bitrate to 1080p → Raising the bitrate on a slow connection makes buffering worse. Adaptive streaming should lower the bitrate.
Q6
Lower bitrate = bigger file and better quality → A lower bitrate means less data per second, so a smaller stream and lower quality, not bigger and better.
Section C: Definitions
Q1
adaptive bitrate — Streaming that lowers the bitrate of compressed audio and video on slow connections, trading quality for smooth playback with less buffering.
Section D: Fill in the Blanks
Q1
IF speed < 2 THEN bitrate ← 500 END IF
Q2
IF dataUsed > dataLimit THEN bitrate ← 500 END IF
Q3
IF speed < 2 THEN bitrate ← 500 END IF
Q4
IF speed < 2 THEN bitrate ← 500 ELSE bitrate ← 4000
Q5
IF buffering = TRUE THEN bitrate ← bitrate - 500 END IF
Section E: Spot the Error
Q1
B — The bitrate should be lowered when the connection is slow. The condition must be speed < 3. With > the bitrate drops on fast connections, not slow ones.
Q2
A — The player should keep loading while the buffer is low (buffer < 5). With > it would only load once the buffer was already full, so the video would stall.
Q3
C — A slow connection (1 Mbps is below 2) should drop to LOW quality so the video plays smoothly. Choosing HIGH would cause buffering.
Q4
C — The closing bracket is missing. The call must be stream_chunk(bitrate).
Q5
A — The IF line is missing THEN. It should be IF buffering = TRUE THEN.