如何处理Chrome中糟糕的HTML5视频效果? [英] How to deal with poor HTML5 video performance in Chrome?

查看:264
本文介绍了如何处理Chrome中糟糕的HTML5视频效果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一年前,我们在网站上添加了视频页面。当时OGV不是很好,而且没有好的WebM编码器,所以我们决定将HTML5和h.264用于webkit浏览器(Chrome,Safari等),然后回退到其他浏览器的Flash(使用相同的h.264源文件。)

Over a year ago we added an video page on our site. At the time OGV wasn't very good, and there was no good WebM encoders available, so we decided to use HTML5 and h.264 for webkit browsers (Chrome, Safari, etc.) and then fallback to Flash for other browsers (using the same h.264 source file.)

这已经有一段时间了。最近(可能是一两个月,因此多个Chrome版本 - 目前版本为24.0.1312.52米),我们发现Chrome确实在播放方面落后。我们认为这是一个服务器问题,所以我们升级了服务器,它仍然表现相同。我记得读过谷歌希望放弃h.264并将每个人都移到WebM,并认为这种表现是其中的一部分。我们将一些视频转换为WebM并使用Chrome进行测试,但它们的延迟也同样糟糕。同样的视频(WebM)在FireFox中精彩流动,而MP4通过Flash插件在FireFox中流畅。

This has been working great for a while. Recently (month or two maybe, so over multiple Chrome versions - currently Version 24.0.1312.52 m) we discovered Chrome really lagging on the playback. We thought it was a server issue, so we upgraded the server, and it is still behaving the same. I remembered reading that Google wanted to drop h.264 and move everyone to WebM, and thought this performance was part of that. We converted some videos to WebM and tested them with Chrome and they lag just as bad. Same video (WebM) streams beautifully in FireFox, and the MP4 streams great in FireFox via the Flash plug in.

我去了YouTube并开启了HTML5视频支持,并且发现视频在Chrome中也会滞后(在高清时运行),而在Flash模式下播放效果很好。 (即使启用HTML5,某些视频仍然可以通过Flash播放。)

I went to YouTube and turned on the HTML5 video support, and found the videos to lag in Chrome too (when running at HD) while they play fine in Flash mode. (Even when HTML5 is enabled, some videos still play via Flash.)

在Windows 8和Mountain Lion上进行测试。

Tested on both Windows 8 and Mountain Lion.

我和同事谈过,他们也看到了同样的问题。所以这不仅仅是我。所以我的问题是:

I've talked to co-workers and they are seeing the same issues. So it isn't just me. So my question is:


  1. 这是我们视频编码的问题吗?

  2. 这是一个Chrome的错误?

  3. 或者它只是本地化给我们?

  4. 除了切换回Flash之外,还有办法解决这个问题吗?

  1. Is this an issue with our video encoding?
  2. Is it a bug with Chrome?
  3. Or is it just localized to us?
  4. Is there a way to deal with this besides switching back to Flash?


推荐答案

这是我的意思。如果该标志是禁用,则浏览器会尝试使用hw-accelerated视频解码,我可以在某些设备中授予错误和慢速视频渲染。如果启用,则永远不会使用hw-accelerated视频解码,但上述问题会消失。它理论上增加了实际能够使用这种加速度的设备的解码时间,但我已经在这个领域工作了将近一年,我仍然没有意识到在这个问题上有任何区别。尽管如此,仍然没有知道如何识别设备是否会正常运行(此功能的可用性似乎没有给出正确的行为),而没有进行测试。

This is the flag I mean. If the flag is disabled, the browser tries to use hw-accelerated video decoding, which I can grant provokes wrong and slow video renderization in some devices. If enabled, hw-accelerated video decode is never used, but the above mentioned problems disappear. It theorically increases decoding time in devices actually able to use such acceleration, but I've been working around this field for almost a year and I still didn't realize any difference in that matter. Still didn't get to know how to identify if a device will behave properly (the availability of this feature doesn't seem to grant its proper behavior) with such acceleration without testing, though.

这篇关于如何处理Chrome中糟糕的HTML5视频效果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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