Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from webmasters.stackexchange.com May 21 '13 at 18:07

This question came from our site for pro webmasters.

    
Probably totally depends on the browser. Do you refer to Google Chrome explicitly? –  Marcel May 21 '13 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 May 21 '13 at 13:52
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.