3

在我目前正在处理的网站上,我们使用带有 h.264 的 html5 视频。如果它不可用,我们使用 Flash 后备。flash 后备在 chrome 23 和 24 中都可以正常工作,但 html5 视频仅适用于 chrome 23。

我在每个版本的 chrome 中打开了它自己的选项卡中的视频文件(然后 chrome 有一个简单的 html 引导片段来播放它)并保存了请求和响应信息。它实际上提出了三个请求,但我发现第一个是最有趣的。这是两者的请求和响应的标头信息。

铬 23:

Request:
URL:http://localhost:8040/media/preview/ab0eca40ffee4f/c268a6240b08ff/MP4_360
Request Method:GET
Status Code:200 OK
Request Headersview source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Cache-Control:no-cache
Connection:keep-alive
Cookie:beaker.session.id=c59137ff184428045f317d6b2385aa384    4c30f
Host:localhost:8040
Pragma:no-cache
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko)     Chrome/23.0.1271.97 Safari/537.11
-------------------------------
Response Headersview source
Accept-Ranges:bytes
Content-Disposition:inline; filename="2af3dc86e4fae33370c268a6240b08ff"
Content-Length:5817287
Content-Type:video/mp4
Date:Wed, 06 Feb 2013 15:51:25 GMT
Last-Modified:Fri, 07 Dec 2012 19:47:51 GMT
Server:CherryPy/3.2.0

铬 24:

Request URL:http://localhost:8040/media/preview/ef5a0220219b8e0/a4fe5f21c26f/MP4_360
Request Method:GET
Status Code:200 OK
Request Headersview source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Cache-Control:max-age=0
Connection:keep-alive
Cookie:beaker.session.id=5c080dc2b3343dc725ea368dae30cb1bc324
Host:localhost:8040
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.68 Safari/537.17
-----------------------------------
Response Headersview source
Accept-Ranges:bytes
Content-Disposition:inline; filename="e10cce5997514651851aa4fe5f21c26f"
Content-Length:3632612
Content-Type:video/mp4
Date:Wed, 06 Feb 2013 18:45:04 GMT
Last-Modified:Tue, 05 Feb 2013 20:15:20 GMT
Server:CherryPy/3.2.0

有没有其他人经历过这个?我也愿意按照要求做进一步的测试。

4

1 回答 1

3

You may fix this problem by doing the following: There is an option in chrome://flags called "Disable hardware-accelerated video decode" enable it.

https://productforums.google.com/forum/?fromgroups=#!searchin/chrome/mp4/chrome/ilqhiTTZcaY/hkPGA3GK6BIJ

And this is a bug filed three weeks ago: http://src.chromium.org/viewvc/chrome?view=rev&revision=178906. According to its status it is “Fixed”. However, later on in the comments it is saying the fix might be pushed for version M25 and is fixed with version 26.0.1395.1.

As a test, I have downloaded version 26 of Chrome (the developer version), (re)disabled the “Disable hardware-accelerated video decode”, and everything works fine. If you want to do the same, visit Chrome’s release page and choose “Dev channel for Windows”.

于 2013-02-21T18:56:13.527 回答