HTML5视频如何处理最后带有moov原子的视频 [英] how HTML5 video handle video with moov atom at the end

查看:122
本文介绍了HTML5视频如何处理最后带有moov原子的视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,在Flash Player中,如果它是渐进式视频且文件末尾有Moov Atom,则必须等待整个视频下载后才能开始观看.

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.

但是当我使用Html5 videojs观看逐行视频时,即使是文件末尾的moov原子,也仍然可以同时播放和观看.

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.

有人知道Html5如何处理最后带有moov原子的视频吗?

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

推荐答案

亚历山大法尔卡斯(Alexander Farkas)8/2的评论是一个完美的答案,如果简洁的话.范围请求(也称为字节服务")允许客户端请求文件的任何部分.

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.

客户端发出(至少)三个具有HTTP 206响应的GET请求(只要服务器能够处理范围请求):一个用于文件头(内容长度很重要,以及接受范围:字节" ").然后,客户端请求文件的结尾,通常少于内容的最后一个MB(这似乎因浏览器而异);一旦客户端从文件末尾获得了moov原子,它就会请求其余的内容.当您进行搜索时,元数据使客户端可以知道如何将时间映射到字节范围,并发出对部分内容的新请求.

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.

有关实际情况的合理记录,请参见示例HTTP范围请求会话

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

这篇关于HTML5视频如何处理最后带有moov原子的视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆