Hint: a really, really long time.

**Introduction**

My goal for this post was to calculate approximately how long it would take to print out every video on the massively popular online video-sharing site, YouTube. I thought this might be something fun to try and work out. What I didn’t know was that it would lead me down a rabbit hole of data, calculations, and trillions of dollars of printer ink (see below). I got this idea from this video, where someone suggests printing every frame of video on their company servers to create a physical backup. I then began thinking about how long it would take someone to print out all the videos on YouTube, whether it was possible^{1}, and whether it was practical^{2}. This was a surprisingly fun project to work on, and the results were quite interesting.

**How much is there to print?**

I’m assuming that we’re going to print every frame of video on a separate sheet of paper, in full color, on a desktop printer. To print every video on YouTube, we need to know how many frames there will be to print^{3}. Let’s start by determining how many videos are on YouTube^{4}. It was hard to find actual data on this, but we can roughly approximate it based on available data. There are two things we need to know to determine how many videos are on YouTube: how long each video is and how much video content is on YouTube.

It is surprisingly hard to find the average length of a YouTube video, but we can estimate it by taking a sample of the lengths of a few videos. For this project, I decided to take the lengths of the first 20 videos from the YouTube Trending page and average them. Here are the lengths in minutes and seconds for each video:

- 6:08
- 13:54
- 31:04
- 4:13
- 3:38
- 5:07
- 3:23
- 3:24
- 7:09
- 3:33
- 3:14
- 6:52
- 1:06
- 7:43
- 6:30
- 2:11
- 4:45
- 4:25
- 2:31
- 2:34

We can convert all these lengths into seconds by multiplying the number of minutes by 60 and adding the seconds. For example, 6:08 is 6 minutes and 8 seconds. 6 minutes times 60 seconds in a minute is 360 seconds, so the video is 368 seconds long. After calculating the length of each video in seconds, these are the updated video lengths^{5}:

- 368
- 834
- 1864
- 253
- 218
- 307
- 203
- 204
- 429
- 213
- 194
- 412
- 66
- 283
- 390
- 131
- 285
- 265
- 151
- 154

Averaging all of these gives us an average video length of 361.2 seconds^{6}, or about 6:01. It’s hard to find exact figures for *how many videos* are on YouTube, but we can roughly approximate the figure with how much video content is uploaded to YouTube in a given amount of time. On average, YouTube users upload around 300 hours of video content per minute^{7}^{, }^{8}^{, }^{9}. However, the rate at which video is uploaded has not been constant since YouTube was founded. Since 2005, when YouTube was first created, there has been a clear upward trend in the rate at which new video content is added to YouTube. To find out how much video is on YouTube, we need to first find the average rate at which content has been uploaded. Since we only have data for up until 2013, we have to estimate the numbers for later years.

**Let’s Use Some Math**

To calculate roughly how much video was uploaded each year, I decided to create a function that represents how quickly new content is added to YouTube from what year it is. According to data published on Forbes, by 2013, 100 hours of video were being uploaded to YouTube each minute. I couldn’t find much more up-to-date data on the content uploaded to YouTube. To find the exact trend, I estimated the data points from this graph and used Microsoft Excel to plot them. I then calculated a polynomial regression trendline using Excel, with a degree 2 polynomial^{10} The graph looked like this:

The thicker blue line (behind the orange line) is the data that we already have – the video upload rates for YouTube from 2005 to 2013. The thinner orange line is a polynomial regression approximation of the data, created by Excel. After the blue line ends, you can see where the estimated values (from 2014 to 2018) are. The polynomial regression matches the data quite well, but I chose not to use it because of the way quadratic functions behave – their *y* value decreases and then increases again at their vertex, while our data is better represented by an exponential function^{11}.

This is the first exponential equation I tried^{12}. This fit the data that we already had quite well, but had far too sharp an increase, and showed that over 2,000 hours per minute of video were being uploaded by 2018, when the actual figure is closer to 300. An exponential curve fits the steepness of YouTube’s growth better than any other equation that I’ve tried.

To improve the accuracy of the curve, I added the one more recent data point we have – about 300 hours of video uploaded per minute^{13} in (or close to) 2018, and generated another trendline. Unfortunately, the actual line of best fit misses our 300 hours per minute of video uploaded by a quite substantial margin^{14}, so I created a new equation from scratch. I focused the most on having it fit the first few data points and the latest data point, and came up with y = 1.37^{x} ^{15}.

Using the exponential trendline, we can recalculate the values for every year from 2005 to 2018^{16}. To find out how much video is uploaded to YouTube, we can find the average value of our video-uploading curve^{17}. This gives us the following values for how much video is uploaded each minute in each year that YouTube has been available:

Years Since 2000 |
Approximate Hours of Video Uploaded Each Minute |

5 | 4.826172446 |

6 | 6.611856251 |

7 | 9.058243063 |

8 | 12.409793 |

9 | 17.00141641 |

10 | 23.29194048 |

11 | 31.90995845 |

12 | 43.71664308 |

13 | 59.89180102 |

14 | 82.05176739 |

15 | 112.4109213 |

16 | 154.0029622 |

17 | 210.9840582 |

18 | 289.0481598 |

This gives us an average of about 75.51 hours of video uploaded per minute since 2005. This works out to about 271,836 seconds^{18} of video being uploaded each minute, or 4530.6 seconds per second^{19}. Next, we need to find how many seconds have passed since YouTube was created until now. YouTube was started on February 14, 2005^{20}, and as I am writing this, it is April 7, 2018. This works out to about 13 years 1 month 24 days, 4.147 × 10^{8} seconds, or roughly 414,700,000 seconds^{21}. If we multiply this by our figure of 4530.6 seconds per second of video that we have from earlier, we find that^{22} 1,878,839,820,000, or 1 trillion 878 billion 839 million 820 thousand seconds of video have been uploaded to YouTube. For comparison, this is over 6 times the number of stars in our galaxy and 18 times the total number of all the people who have ever lived^{23}. Now that we know how much video content is *on* YouTube, we should be able to work out roughly how many videos are on the site. If we divide the total number of seconds of video on YouTube (~1,878,839,820,000) by the average number of seconds per video (~361.2), we find that about 5.201 × 10^{9}, 5,201,000,000, or **5 billion 201 million videos** have been uploaded to YouTube. Keep in mind that this is a *very *rough estimate, but it should be in the range of how many YouTube videos are available, and is more than accurate enough for our purposes.

**Now what?**

If we want to print out all of YouTube, we will need 1 sheet of paper for each frame in each video. If we assume^{24} that half of the videos on YouTube use a 24 frames per second video codec, and the other half use 60 frames per second, we have an average framerate of 42 FPS. After multiplying this by our roughly 1,878,839,820,000 seconds of video on YouTube, we can calculate that there are about 78,911,272,440,000^{25} frames of video on YouTube^{26}, and therefore that you would need to print out 78,911,272,440,000 frames^{27}. To find out how long this would take to print, we first need to know how long printers take to print a single page. I couldn’t find much information on this, so we’ll need to make some more assumptions^{28}. Let’s assume that printing one frame takes, on average, 8 seconds. In this case, printing all the frames on YouTube 6.3129018 × 10^{14} seconds^{29} (if you only had one printer). This is about **20 million years**, or 120 times as much time has passed since Earth’s last glacial period^{30}.

**How much paper would I need?**

Since there are 78,911,272,440,000 frames to print, you would need 78,911,272,440,000 sheets of paper. Let’s assume we are using standard printer paper with a thickness of about 0.1 millimeters. To print all of the frames, you would need a stack of paper **5 million miles** tall^{31}, or enough to go to the Moon from Earth and back again nearly 10 times^{32}. The volume of this stack would be about **0.5 cubic kilometers**^{33}, which is about the total volume of water in Sydney Harbour, or the total volume of all the humans alive today^{35}. Finally, the stack would weigh about **4×10 ^{9} metric tons**, as much as all humans would weigh together

^{36}or as much as all the trash produced by the United States in one year

^{37}. Then again, you could never actually print all of YouTube out because new video content is being added all the time.

**Could you keep up? How many printers would you need? What would it cost?**

Let’s print the frames of every single YouTube video in full color using a desktop printer. For simplicity, let’s assume that the rate at which new video is added to YouTube stops increasing after this year and remains at a steady 300 hours per minute from now on. This is equal to 18,000 seconds of video uploaded per second^{38}. If we multiply this by our 8 seconds per frame printing rate, and multiply that by our 42 frames per second framerate, we can find that 6,048,000 (just over 6 million) frames of video will be uploaded while we print each frame. This means that we would need just over **6 million printers** to continually print out YouTube, costing roughly $362.9 million^{39}upfront. This is about one printer for every person in Maryland or Missouri^{40}. If we replaced the printers every 2 months on average^{41}, this would be another **$181.45 million** per month. Replacing the ink cartridges would also cost plenty of money^{42}. Let’s use HP high-yield color ink cartridges, which cost about $55.89 each^{43}. If we had to replace the cartridges every 100 frames or so^{44}, and we can print 1,986,768,000,000 frames total, per month^{45}^{, }^{46}, we would spend about ** $252.4 billion** per month, on ink cartridges alone

^{47}

^{, }

^{48}

^{, }

^{49}. To print, we also need paper

^{50}. 2,500 sheets of HP paper is about $29.99 online. If we divide our figure of 1,986,768,000,000 frames per month by 2,500, we find that we need 794,707,200 boxes of paper each month, which costs

**$23.83 billion**. Electricity also adds a small amount to the cost of doing this

^{51}. The electricity price of running a home printer continually is about $0.0051, or 0.51¢, per hour

^{52}. This is roughly $0.000001416 (0.0001416¢) per second, per printer

^{53}. Every month, this adds up to

**$22.506 million**per month for all 6,048,000 printers. After adding all these costs together

^{54}, we get a total figure of $276.4 billion each month, or

**$3.317 trillion**per year

^{55}. Whew.

**Pixels**

How many pixels are on YouTube? Every frame that makes up every video on YouTube consists of many millions or billions of individual pixels. To find out just how many, we need to know how many frames are in the video and what the length of the video is. We’ll assume an average resolution somewhere between 640 × 480 (standard definition), 1280 × 720 (high definition), and 1920 × 1080 (full high definition). If we average the number of horizontal and vertical pixels from each resolution, we get an average resolution of 1280 × 760. To find the total number of pixels, we can multiply the horizontal and vertical resolutions together^{56}, and find that each video frame contains 972,800 pixels. This means that the average 361.2 second-long YouTube video, which has 15170.4 frames, would have roughly 14,757,765,120 pixels, more than twice the number of people alive today^{57}. For all 78,911,272,440,000 frames, this would be about **76,764,885,829,632,000,000**, or 76 quintillion 764 quadrillion 885 trillion 829 billion 632 million, **total pixels**. If each pixel was a kilogram, this would weigh roughly as much as all the biomass on Earth right now^{58}.

**How Much Data is This?**

If we were treating the YouTube video database as a series of images, we could simply multiply the number of total frames by the average amount of digital storage space that one 1280 × 760 image takes up. However, due to interframe compression and interpolation, some of this storage space usage can be eliminated by combining similar parts of consecutive frames^{59}^{, }^{60}. So let’s instead look at the average file size of a video, to get a more accurate measurement. I selected a random video file from my hard drive, which was 52 seconds long. It had a 59.94 frames per second framerate, and a 1920 × 1080 resolution. The total file size was 150,873,130 bytes, or around 143 megabytes^{61}. If we divide this by the video length, we get a bitrate of about 2.901 megabytes per second^{62}. To compare this to our hypothetical 1280 × 760, 42 FPS video^{63}, we need to account for the change in both framerate and video resolution. First, we’ll look at the resolution. If we divide our 1920 horizontal resolution for our sample video by our 1280 horizontal resolution for our average video, to find that the horizontal resolution is 1.5 times larger. We can then do the same thing for the vertical resolution (1080 / 760), and find that the sample video has a roughly 1.421 times larger vertical resolution^{64}. We can then scale our bitrate to our average video by dividing by both of these, and get a 1.361 megabytes per second bitrate. However, we also need to factor in the framerate. If we divide 59.94 (our sample video framerate) by 42 (or average video framerate), we get a ratio of 1.427^{65}. This gives us a final bitrate of roughly 0.9537 megabytes, or 953.7 kilobytes. Now back to our original quantity for all the video on YouTube – 1,878,839,820,000 seconds. After multiplying these 2 figures together, we find that there is about^{66} **1.7918 exabytes** of video content on YouTube^{67}. This is about as much data as all the words that have *ever been spoken*^{68}. It’s a lot.

**Is this practical?**

**No**^{69}**.** Not at all. But it would be a lot of fun. Anyway, the point is – YouTube is really big. See you next weekend in the next post.

- Yes.
- No.
- This ended up being a
*slightly*more complicated process than I had at first imagined, due in no small part to the frustratingly limited amount of data available, but it was an interesting project nevertheless. The only data I could find from YouTube was from their press page, which mostly contained audience and reach statistics, but not content. - Not strictly necessary for determining how many frames of video there are, but still good to know.
- Assuming I didn’t make any mistakes.
- Source: https://www.wolframalpha.com/input/?i=Average+368+834+1864+253+218+307+203+204+429+213+194+412+66+283+390+131+285+265+151+154
- Source: https://fortunelords.com/youtube-statistics/
- WOW. Every time I see this statistic it amazes me, no matter what.
- The figures on this vary – I have read that anywhere from 100 to 500 hours of video are uploaded to YouTube each minute, but I find it is best to use a more moderate figure when the publicly available data is this inconsistent or unreliable.
- Effectively a quadratic function.
- To be completely honest, I definitely could have used a quadratic function for this, and it
*might*even have worked better than the exponential function that I decided to go with, but a 3-term equation seemed somewhat like overkill for this project, in addition to the reasons that I already discussed. - Excel formats exponential trendlines with a logarithmic formula, where
*e*is the mathematical constant that acts as the base of a natural logarithm. - I realize that this figure is rounded and probably not extremely accurate, but it’s close enough for the purposes of this post.
- At least ~50 hours or so.
- A very rough approximation; again, more than accurate enough for the purposes of this post.
- I’m recalculating the values from 2005 to 2013 that we already have as well, so that they fit our model better. Whether this is a good idea or not, I’m not sure.
- I won’t be bothering with calculus to find the average value of the curve; for this application, taking averaging 10 or so points is fine for this purpose.
- 75.51 hours • 60 minutes • 60 seconds = 271,836 seconds
- 271,836 seconds / 60 seconds = 4530.6 seconds
- Source: https://youtube.googleblog.com/2010/02/youtube-online-video-revolution.html; Also see the featured snippet for the Google search: https://www.google.com/search?q=When+was+youtube+started
- Source: https://www.wolframalpha.com/input/?i=Seconds+between+February+14,+2005+and+April+7,+2018
- [
*Very roughly*] - Source: https://www.wolframalpha.com/input/?i=414,700,000+*+4530.6
- I am making a lot of assumptions here.
- Or 7.891 × 10
^{13}or 78 trillion 911 billion 272 million 440 thousand. - Again, WOW.
- Good luck with that.
- Of course, this also depends on the type of printer you are using, how many colors are in the frame/image, how much of the page is used, what ink you are using, etc.
- Again, good luck with that.
- Source: https://www.wolframalpha.com/input/?i=78,911,272,440,000+*+8+seconds+in+years
- Source: https://www.wolframalpha.com/input/?i=Thickness+of+a+sheet+of+paper+*+78,911,272,440,000
- Source: https://www.wolframalpha.com/input/?i=5+million+miles+%2F+Distance+from+the+Earth+to+the+Moon
- Source: https://www.wolframalpha.com/input/?i=8.5+inches+*+11+inches+*+Thickness+of+a+sheet+of+paper+in+inches+*+78,911,272,440,000
- Source: https://www.wolframalpha.com/input/?i=0.5+cubic+kilometers]
^{, }^{34}In other words, about as much as one giant human smoothie. Yuck. - A
*slightly*less gruesome scenario than the aforementioned “human smoothie.” - Source: https://www.wolframalpha.com/input/?i=Weight+of+a+sheet+of+paper+*+78,911,272,440,000
- 300 hours * 60 minutes * 60 seconds / 60 seconds = 18,000
- In US dollars, at about $60.00 per inkjet printer.
- As I am writing this. Source: https://www.wolframalpha.com/input/?i=US+states+with+population+of+about+6,048,000
- This is downright generous for a desktop printer printing in full color, running 24/7.
- A considerable amount, at the current and totally ridiculous ink cartridge prices.
- Note how this is about as much as the printer itself.
- This would also add some time to the total printing time, but this would be inconsistent and hard to measure, so I’m going to leave it out of my calculations.
- 6,048,000 printers * 2.628 × 10
^{6}seconds in a month / 8 seconds per frame = 1,986,768,000,000 - If we divide the approximate total number of frames on YouTube (78,911,272,440,000) by this, we get a figure of ~39 months to print out all of YouTube, with enough printers to keep up with all the new content constantly being added to YouTube.
- 1,986,768,000,000 frames per month / 440 frames per cartridge * $55.89 per cartridge = $252.4 billion
- This is using the estimated cartage yield of ~440 pages, which we might not (read: “will not”) actually get when printing every page in full color.
- Compared to this amount, the costs of the
*printers themselves*, the paper, and the electricity required to run them seems downright negligible. - Believe it or not, the first time I did these calculations, I forgot to account for paper. And that paper was even a thing that you need to print stuff.
- Although why anyone would
*ever*want to, I am not sure. - Source: http://energyusecalculator.com/electricity_printer.htm
- $0.000001416 dollars per hour / 60 minutes / 60 seconds
- And assuming that I did everything right.
- This isn’t counting having to pay people to do this for you. After explaining why they should – “If the internet ever explodes, this would be the safest way to store humanity’s information and collective knowledge!”
- I’m going to ignore video compression for now.
- Source: https://www.wolframalpha.com/input/?i=15170.4+*+972,800
- Source: https://www.wolframalpha.com/input/?i=78,911,272,440,000+kilograms
- For more information, check out this great video about interframe video compression by Tom Scott.
- A new record for the number of footnotes I have in one post. This is also probably my longest post so far.
- https://cseducators.stackexchange.com/questions/4425/should-i-teach-that-1-kb-1024-bytes-or-1000-bytes
- I guess I could’ve just looked at the actual bitrate ~ 23,165 kilobits per second, if you’re wondering.
- Certainly an interesting choice of resolution and framerate.
- Unfortunately, not a nice, terminating decimal like 1.5 – closer to 1.421052631578947368421052631578947368421052631578947368421.
- A repeating decimal this time; still scarily close to our vertical resolution factor.
- Again,
*very roughly*. - This is not the actual amount of traffic that YouTube handles, sending videos to and from computers around the world every day. This is just how much video data YouTube actually
*has*stored on their servers (technically Google’s servers now). - Source: https://www.wolframalpha.com/input/?i=0.9537+megabytes+*+1,878,839,820,000
- One last footnote. (Is this excessive? Probably.) It could be
*possible*if you were really,*really*rich, and equally bored, and convinced every printer manufacturer in the world that this was a good idea.