How much time I need to wait?

70 Views Asked by At

My Internet speed is slow to some extent $(100$ KB/s) and I like watching YouTube videos now I want to know the least amount of time I need to wait to guarantee that there is not going to be any "Loading" interruption until the end of the video assuming that the playback speed and the downloading or "loading" speed are constant

I don't know whether this is gonna be useful , but the quality of the video is maybe 720p or you can choose any quality

could anyone help me solve this problem mathematically ?

1

There are 1 best solutions below

0
On

Let me translate the problem to a mathematical problem and then solve it:

Let $N$ be the size of the video. Let $M$ be the KB/s required in order to watch the video with no "Loading interruptions". Let $S$ be your internet speed, in our case $S=100$. We want to find $L$ - the number of seconds to wait such that we will get no "loading interruptions".

Suppose you waited $L$ seconds then you downloaded $SL$ Kilo bytes. Now the amount of time you can watch the video without "loading interruptions" is exactly $\frac{SL}{M-S}$ (this is because every time you download extra $S$ KB, but use $M$ KB) - Note that if $S\geq M$ you can watch the video without waiting.

Therefore, in total after $\frac{SL}{M-S}$ seconds you would've download $S\frac{SL}{M-S} + SL$ Kilo bytes. (Where $SL$ is the Kilo bytes you already downloaded before you started to watch).

Thus, if you want to avoid having any "loading interruptions" you have to ensure that $$S\frac{SL}{M-S}+SL\geq N$$

Therefore, the minimum amount of time you have to wait is

$$L = \frac{N}{\frac{S^2}{M-S}+S}$$ when $S< M$

and $$L=0$$ when $S\geq M$