9

As I know , in Flash player, if it is progressive video and moov atom at the end of file, we have to wait for the entire video download before we can start to watch it.

but when I use Html5 videojs to view a progressive video, even the moov atom at the end of file, but it still can play and watch at the same time.

Can anyone know how Html5 handle video with moov atom at the end?

Liu Hebian
  • 91
  • 2
  • to likeitlikeit:so you mean is in different browser, even all using HTML5 player, the behavior maybe different. e.g.: in chrome HTML5 play progressive video without download the whole file but in firefox HTML5 play progressive video may download the whole file. – Liu Hebian May 02 '13 at 06:19
  • Exactly. The behavior, in addition to the browser, may even depend on the OS as libraries used to play some content may differ from e.g. Mac OS to Windows. – likeitlikeit May 02 '13 at 07:40
  • likeitlikeit, worst comment ever... of course the handling of the video will be left to the browser / os... the question was on devices that DO stream even tho the moov atom is at the end of the file (and has not been 'fetched yet'), how does this work? – anonymous-one Jul 18 '13 at 12:02
  • I'd like to have an answer to this question as well. Why can the browser natively playback mp4 h.264 videos when flash can't? – TheLostOne Aug 21 '13 at 15:49
  • 1
    The answer is range requests – alexander farkas Aug 02 '14 at 10:57

1 Answers1

7

The comment by Alexander Farkas from 8/2 is a perfect, if succinct, answer. Range requests (also known as "Byte Serving") allow the client to request (any) part of the file.

The client makes (at least) three GET requests with HTTP 206 responses (provided the server is capable of handling range requests): one for the file headers (Content-Length is what matters, along with "Accept-Ranges: bytes"). Then the client requests the end of the file, usually less than the last MB of content (this seems to vary by browser); once the client has the moov atom from the end of the file, it requests the rest of the content. When you seek, the metadata allows the client to know how to map time to byte range, and issues a new request for partial content.

A reasonable transcript of what this looks like in practice is at Sample http range request session

Community
  • 1
  • 1
sdupton
  • 1,869
  • 10
  • 9