
Ask HN: Why does a video rewind on YouTube require a rebuffer? - osrec
I&#x27;ve noticed that even after I&#x27;ve fully downloaded a video, it appears to rebuffer the entire thing when I replay it. Why is this? Why not just stream it once?
======
rasz
Google could use HTML storage
[https://developer.chrome.com/apps/offline_storage](https://developer.chrome.com/apps/offline_storage),
like MEGA does, and temp store played videos. I suspect either nobody bothered
because its not as glamorous as inventing more idiotic UI "improvements", or
someone ran the numbers and came to the conclusion saved BW is minuscule
compared to potential support issues (maintaining code, bugs etc). Not to
mention Offline means Google cant sp^track you.

I played with this idea, custom extension rewriting _:
//_.googlevideo.com/videoplayback?* webRequests, redirecting to my local proxy
server, but in the end it was more trouble than its worth, instead I just have
"download with yt-dl" button right under the videos I intend to watch multiple
times/later/offline
([https://github.com/raszpl/smplayer4YT](https://github.com/raszpl/smplayer4YT)).

~~~
osrec
I personally think the additional bandwidth requirements would be rather
large... I still don't get why they wouldn't optimise this (but would, for
example, optimise all their icons into a CSS sprite)

------
guilhas
Maybe downloaded content as an extra metric to track views. Also it is harder
to fake thousands of views if you have to download it every time.

Managing cache in my opinion is also complicated. For how long will should it
last? Will you delete it on finish/page close? Or will ppl accept watching yt
will take a big chunk of space, and disk performance? What if the browser
crash? In mobile it would not be possible.

------
MrEfficiency
Just a guess-

The way the video is generated is based on specific points in time.

While going back to that part of the video with it already downloaded would
make sense, it might require going back decently far to get all of the pixels.

------
cimmanom
Because they are explicitly preventing the whole thing from staying in memory
to make it more difficult to download/pirate.

~~~
0942v8653
That's ridiculous, YouTube videos are trivial to download.

~~~
chatmasta
It’s only trivial because so many people put continuous effort into
untrivializing it.

~~~
0942v8653
I certainly appreciate the work of youtube-dl developers, but (in order to
test it out) I was just able to go to the YouTube page, open the network
request log on my browser, and pick out the particular URLs (one for video,
one for audio) the content is downloaded from, just from the MIME types
displayed. Then I was able to replay those requests (using Copy as cURL),
removing the range argument, in order to download the video and audio to my
machine, in an easily-playable format. (From there, nearly any video
conversion software could combine video and audio into one container.)

That's a far cry from having to pick out those segments from the memory of my
browser as it runs.

Edit: I may have misread your comment, apologies if I misunderstood.

