Computer Science compression question

Click For Summary

Discussion Overview

The discussion revolves around a computer science problem related to video compression, specifically calculating data requirements for streaming a two-hour movie on Netflix. Participants are addressing various parts of the problem, including calculations for uncompressed data size, compression ratios, and cost analysis.

Discussion Character

  • Homework-related
  • Mathematical reasoning
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant calculated that a single frame of a movie requires 1012.5 kilobytes to encode without compression.
  • Another participant questioned the calculation for the total size of a two-hour movie, suggesting a need for reevaluation.
  • One participant detailed their calculation for the total number of pixels in a two-hour movie and confirmed their result of 0.0231742859 GB, based on their method of converting bytes to gigabytes.
  • There was a correction regarding the frame rate, clarifying that 24 frames per second should be applied over the entire duration of the movie, leading to a revised calculation of total bytes needed.
  • One participant realized they needed to multiply the total bytes by the number of seconds in two hours to find the total GB required for the movie, arriving at an estimate of 167 GB.
  • Another participant pointed out the need to calculate the compression ratio based on the streaming rate of 2200 kB/sec compared to the uncompressed data rate.
  • There was a discussion about converting bytes to kilobytes and how this relates to the compression ratio calculation.

Areas of Agreement / Disagreement

Participants do not fully agree on the calculations for parts b and c, with some questioning the accuracy of the initial calculations and others providing corrections. The discussion remains unresolved regarding the final answers for parts c and d.

Contextual Notes

There are limitations in the calculations due to potential misunderstandings about frame rates and the conversion between bytes and gigabytes. Some participants have not yet completed all parts of the problem, leading to uncertainty in the overall discussion.

Who May Find This Useful

This discussion may be useful for students studying video compression, data transfer rates, and related mathematical calculations in computer science.

overlyeducate
Messages
9
Reaction score
0
1. A streaming Netflix movie is usually 720 by 480 pixels. The color for each pixel takes 3 bytes to encode, and a feature film shows 24 frames (individual still images) per second.
a.) How many kilobytes are needed to encode one frame, without compression?

b.) How many GB are there in a two-hour movie, without compression?

c.) The maximum data transfer rate used by the Netflix software is 2200 kbps. What compression ratio does are they using? (To find the compression ratio, divide the number of bits per second actually transferred by the number of bits per second for the uncompressed movie. Express the result as a percentage.)

d.) At the compressed data transfer rate, how many GB must be transmitted to stream a two-hour movie?

e.) If Netflix pays 3 cents per GB to send out data, how much does it cost to deliver a two-hour movie? Compare this to their cost of 78 cents to send a physical DVD by mail.


Could I please have some help? For part A, I have an answer of 1012.5 kilobytes, and for part b, I have an answer of .0231742859 GB. In order to solve parts c and e, I would need to know the answer for part d. In this case, would the compressed data transfer rate be 2200 kbps, and if so, how could I determine how many GB must be transferred to stream the two hour movie? I would appreciate any help I could get. Thank you so much.
 
Physics news on Phys.org
I think you need to check your calculation for part b) again.
 
For part b, I first calculated how many pixels there would be in a two hour movie. Since each individual frame has 720X480 pixels, or 345600 pixels, the number of pixels for a movie, which is 24 frames, would be 345,600X24, which would be 8,294,400 pixels. Since each pixel would take 3 bytes to encode, I did 8,294,400X3, which would be 24,883,200 bytes for the entire movie. This is the movie in bytes, so to convert it to gigabytes, I took the 24,883,200 and divided it by 1,073,741,824, since 1 gigabyte =1,073,741,824 bytes. My answer was .0231742859 GB. Do you agree? Please let me know.
 
overlyeducate said:
For part b, I first calculated how many pixels there would be in a two hour movie. Since each individual frame has 720X480 pixels, or 345600 pixels, the number of pixels for a movie, which is 24 frames, would be 345,600X24, which would be 8,294,400 pixels.
No, a movie is not 24 frames. That's only one second of a movie. For one second of a movie, 8,294,400 pixels X 3 bytes/pixel = 24,883,200 bytes need to be streamed.
overlyeducate said:
Since each pixel would take 3 bytes to encode, I did 8,294,400X3, which would be 24,883,200 bytes for the entire movie. This is the movie in bytes, so to convert it to gigabytes, I took the 24,883,200 and divided it by 1,073,741,824, since 1 gigabyte =1,073,741,824 bytes. My answer was .0231742859 GB. Do you agree? Please let me know.
 
Oh, I see what I did there. I have to take the 24,883,200 bytes and multiply it by 7200 seconds, because that's how many seconds there are in 2 hours. I would then take that answer, which is 1.7915904 x10^11, and divide that by the 1,073,741,824. That gives me an answer of 166.85, or 167 GB. I believe this is the right answer. Would anyone happen to know how to do part d?
 
Did you do part c? They're asking you for the compression rate. Part b says that the Netflix software can stream up to 2200 kB/sec. How many kB are there in 1 second of the movie (24 frames)?
 
If one second of a movie is 24883200 bytes, then in kilobytes, that would be 24,300 kilobytes, since you would have to do 24883200 divided by 1024. Can that be used to solve part c? I seem to be confused on parts c and d. Once I have those, I could solve part e.
 
I didn't check your numbers, but assuming they're correct for the moment, 1 second of the movie is 24,300 KB, but Netflix can stream only 2,200 KB per second. So what's the compression ratio? That's what they're asking for in part c.

The way it works is something like this.
Raw movie bytes ---> compression SW ---> internet ---> home connection ---> decompression SW---> TV
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
Replies
4
Views
2K
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 36 ·
2
Replies
36
Views
5K
  • Sticky
  • · Replies 13 ·
Replies
13
Views
8K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K