MP4不能在Chrome版本27.0上播放 [英] MP4 not playing on Chrome version 27.0

查看:238
本文介绍了MP4不能在Chrome版本27.0上播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

截至2013年6月5日的最新版Chrome(版本27.0.1453.110米)不能播放mp4视频。例如 W3Schools Video Sandbox 给出了一个例子我的视频控制,没有别的。 (抱歉无法发布屏幕截图,刚刚注册到StackO。)



任何人都知道为什么?并修复?



是:

有一个回答这样的问题



chrome可以播放html5 mp4视频,但html5test表示chrome不支持mp4视频编解码器





有一个像这样的未答复问题:

chrome html5视频问题

解决方案

在遇到同样的问题之后 - 这里是我的一些想法:


  • 由于Chrome删除了h264的支持,在某些机器上,mp4使用它编码的视频将无法正常工作(在Firebug / Network标签下查看时出现解析器错误 - 与提交的问题一致 here ),或者浏览器崩溃,具体取决于编码设置。 b $ b
  • 不一致 - 完全取决于编解码器安装在计算机上 - 虽然我没有在我的机器上遇到这个问题,但我们确实在办公室发现了问题(因此我们使用这个问题进行了测试)

  • 它可能与Quicktime / divX设置有关(相关机器的Quicktime版本比我的原生版本 - 我们不想放弃我们的测试电脑,所以我们没有更新它)。


  • 因为它只影响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:

html5 video issue with chrome

解决方案

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屋!

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