MP4不能在Chrome版本27.0上播放 [英] MP4 not playing on Chrome version 27.0
问题描述
截至2013年6月5日的最新版Chrome(版本27.0.1453.110米)不能播放mp4视频。例如 W3Schools Video Sandbox 给出了一个例子我的视频控制,没有别的。 (抱歉无法发布屏幕截图,刚刚注册到StackO。)
任何人都知道为什么?并修复?
是:
有一个回答这样的问题
chrome可以播放html5 mp4视频,但html5test表示chrome不支持mp4视频编解码器
和
有一个像这样的未答复问题:
在遇到同样的问题之后 - 这里是我的一些想法: 因为它只影响Chrome浏览器(其他浏览器可以很好地与 VideoForEverybody 解决方案)我已经使用的解决方案是:为每个mp4文件创建一个Theora编码的mp4文件(example.mp4 - > example_c.mp4) 应用以下js:
if(window.chrome)
$([type = vid ()函数()
{
$(this).attr('src',$(this).attr('src')。替换(。mp4,_c.mp4));
});
不幸的是,这是一个糟糕的Chrome黑客攻击,但嘿,至少它可以工作。
The latest version of Chrome (Version 27.0.1453.110 m) as of 5 June 2013 does not play mp4 videos. For an example W3Schools Video Sandbox gives me video controls and nothing else. (Sorry can't post a screen shot, just signed up to StackO.)
Anyone know why?? and a fix?
Yes:
There is an answered question like this
chrome could play html5 mp4 video but html5test said chrome did not support mp4 video codec
and
There is an unanswered question like this:
After running into the same issue - here're some of my thoughts:
- due to Chrome removing support for h264, on some machines, mp4 videos encoded with it will either not work (throwing an Parser error when viewing under Firebug/Network tab - consistent with issue submitted here), or crash the browser, depending upon the encoding settings
- it isn't consistent - it entirely depends upon the codecs installed on the computer - while I didn't encounter this issue on my machine, we did have one in the office where the issue occurred (and thus we used this one for testing)
- it might to do with Quicktime / divX settings (the machine in question had an older version of Quicktime than my native one - we didn't want to loose our testing pc though, so we didn't update it).
As it affects only Chrome (other browsers work fine with VideoForEverybody solution) the solution I've used is:
- for every mp4 file, create a Theora encoded mp4 file (example.mp4 -> example_c.mp4)
apply following js:
if (window.chrome) $("[type=video\\\/mp4]").each(function() { $(this).attr('src', $(this).attr('src').replace(".mp4", "_c.mp4")); });
Unfortunately it's a bad Chrome hack, but hey, at least it works.
这篇关于MP4不能在Chrome版本27.0上播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!