Edit: To clarify:
Is it even possible, financially speaking, to keep adding storage? I mean, advertisements don’t even make a lot of money, is the indefinite growth of server storage even sustainable?
Or will they do what Twitch does with old content and just delete them?
Like LetMeEatCake said, storage is cheap, cheaper than CPU power. I don’t know for sure, but if you have a video that will be played 1000 times, what would be better? Transcode 1000 times or store 8 versions of the video?
I would imagine they store the highest available quality only by default and do on the fly transcoding until a certain threshold of views per time is reached. At this point they would then store the transcoded versions as well.
For videos with a lot of views it only makes sense to store the transcoded version as, like you say, storage is cheap. But fact is that the vast majority of uploaded videos get <1k views and for those it probably would make more sense to transcode them otf when needed.
I’d say there’s a significant amount of storage available for cache. On the first transcoding the video is saved to cache so that the cached version can be streamed in the future. After enough time lapses or the cache becomes full, the cached video is deleted