News for hackers. Stuff that matters.
Re:Ask HN: Why does a video rewind on YouTube require a rebu... by rasz on Tuesday October 02, 2018 @01:48AM (#18119098)
Google could use HTML 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).

Re:Ask HN: Why does a video rewind on YouTube require a rebu... by osrec on Wednesday October 03, 2018 @12:35AM (#18127663)
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)
Re:Ask HN: Why does a video rewind on YouTube require a rebu... by guilhas on Wednesday October 03, 2018 @01:02PM (#18132311)
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.

Re:Ask HN: Why does a video rewind on YouTube require a rebu... by MrEfficiency on Monday October 01, 2018 @09:54AM (#18112515)
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.

Re:Ask HN: Why does a video rewind on YouTube require a rebu... by cimmanom on Monday October 01, 2018 @12:48PM (#18114399)
Because they are explicitly preventing the whole thing from staying in memory to make it more difficult to download/pirate.
Re:Ask HN: Why does a video rewind on YouTube require a rebu... by 0942v8653 on Monday October 01, 2018 @01:24PM (#18114758)
That's ridiculous, YouTube videos are trivial to download.
Re:Ask HN: Why does a video rewind on YouTube require a rebu... by chatmasta on Monday October 01, 2018 @06:05PM (#18117213)
It’s only trivial because so many people put continuous effort into untrivializing it.
Re:Ask HN: Why does a video rewind on YouTube require a rebu... by 0942v8653 on Monday October 01, 2018 @07:22PM (#18117627)
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.

Re:Ask HN: Why does a video rewind on YouTube require a rebu... by rasz on Monday October 01, 2018 @11:21PM (#18118576)
wat? YT video is just a mp4 file on "someone elses computer "