4

I'm curious how a web browser (say Google Chrome) plays a HTML5 video. Is it the same as how images are displayed? The image is first downloaded/cached into the file system so that subsequent request can be taken directly from the cache without the need to download from the server again. In other words, the image can be retrieved if we know the file system path that the browser is using.

So is HTML5 video cached too or completely loaded into memory? As I play a HTML5 video, I can pause the video and wait for it to finish loading, then disconnect from the internet and resume playing the entire video offline. This means that the video has completely downloaded into my computer. What I want to know is, is it stored in the file system which I can retrieve or in the memory. If it is the latter, is there any way I can extract the video out from the memory?

2
  • Probably totally depends on the browser. Do you refer to Google Chrome explicitly?
    – Marcel
    Commented May 21, 2013 at 13:43
  • That crossed my mind too. Let's just take Chrome and Firefox as examples. I couldn't find this kind of specification on the web.
    – Damien Law
    Commented May 21, 2013 at 13:52

1 Answer 1

3

This depends on the browser, operating system and length of video. Playback has to occur from memory. To avoid hiccups, browsers try to cache a number of seconds, usually at least 10 but this is often adaptive depending on measured throughput. If the first few seconds arrive quickly, then fewer seconds are kept.

For very short videos, this means that the entire video may be in memory at once. For long videos, this will almost never be the case. Most modern codecs allow for streaming video, so the entire video wont be downloaded before it start playing and there will be little need to keep it around. For a non-streamable codec, the entire video would be downloaded first and may appear in the file-system. It may not as you can have unnamed temporary files.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .