HTML5视频以Chrome格式播放,但不播放IE9 [英] HTML5 video plays in chrome but not IE9

查看:102
本文介绍了HTML5视频以Chrome格式播放,但不播放IE9的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试过你可以在互联网上找到的所有混合物,这里有关于编码,htaccess和视频元素标记的SO,但我无法在IE9中播放这些视频,而它们在Chrome中完美运行。有谁知道魔法仙尘让这个工作?在IE中显示的所有内容都是一个黑色框,中间是红色x。以下是测试页面的链接:(已删除链接)

I've tried every concoction you can find on the internet and here on SO with regard to encoding, htaccess, and video element markup but I cannot get these videos to play in IE9 while they work perfectly in Chrome. Does anyone know the magic fairy dust to get this to work? All that shows in IE is a black box with the red x in the center. Here is a link to the test page: (link removed)

请注意,我会显示两个视频和两个标记变体。一个是Mark Pilgrim关于视频类型的书的直接副本。第一个视频使用miro编码。第二个用ffmpeg。我在我的视频目录中的htaccess中包含了'AddType video / mp4 .mp4'。

Note that I show two videos and two variations of the markup. One is a direct copy from Mark Pilgrim's book for the video type. The first video was encoded using miro. The second with ffmpeg. I do include 'AddType video/mp4 .mp4' in my htaccess in that video directory.

我从未尝试过的东西或ffmpeg的预设组合,似乎没什么用。我对听到有关javascript库或任何其他库的建议不感兴趣。

It's never mattered what I've tried or which combinations of presets for ffmpeg, nothing seems to work. I am NOT interested in hearing suggestions about javascript libraries or any other libraries.

EDIT1:

在下面的@heff看到一个测试页后,看来我的问题可能与我的主持人HostGator有关,他的支持团队给了我一些不支持使用HTML5的网页设计工作。我还在IE9中使用可在其他浏览器和其他Web主机上运行的音频和标记来处理HTML5音频问题。我不知道我的问题与主机有关,但我倾向于相信,并且会考虑与其他主机进行测试。

After seeing a test page by @heff below, it appears my problems may be related to my host, HostGator, who's support team has given me the brush off that they don't support web design efforts using HTML5. I also have issues with HTML5 audio in IE9 using audio and markup that works in other browsers and from other web hosts. I don't know that my problem is host related but I am inclined to believe so and will be looking into testing with other hosts.

我看到很多类似的问题我在互联网上挖掘这里,我想知道他们是否和我有同样的主机问题。

I see a lot of similar questions to mine on the internet and here at SO and I'm wondering if they are having the same host issues as me.

EDIT2:

我把视频放在我办公室的本地服务器上,以及使用Apache和FreeBSD完全相同的网页(HostGator使用Centos)。这些视频在IE9中播放得很好。

I put the videos on a local server in my office along with the exact same web pages using Apache and FreeBSD (HostGator uses Centos). The videos play just fine in IE9.

EDIT3:
所以我得到了Uncle Buck Bunny的工作。这是我下载的众所周知的MP4。为什么它有效,我不知道,但我认为它使用的是相同的编码器。他们必须拥有其他没有的魔法仙尘。

So I got "Uncle Buck Bunny" to work. It's a well known MP4 I downloaded. Why it works, I don't know, but I used the same encoder they did, I think. They must possess that magic fairy dust no on else has.

EDIT4:
任何人都可以复制我的一个视频和标记并使其在非HostGator主机上工作?

Can anyone copy one of my videos and the markup and make it work on their non-HostGator host?

EDIT5:
因此看来IE9正在下载mp4视频,但只是在播放红色时没有播放或显示控件'X'。我原本认为这些视频根本没有从他们的开发工具中下载给我看。仍然迷失了做什么。当我重新加载页面时,我会看到闪烁的控件。

So it appears IE9 is downloading the mp4 videos but just not playing them or showing the controls while displaying a red 'x'. I originally thought the videos were not being downloaded at all from the their dev tools was showing me. Still lost as to what to do. I DO see a flash of the controls when I reload the page.

EDIT6:已解决
解决方案,正如我在其他地方暗示的那样,是在编码。有什么不同,我不知道,但我使用ffmpeg使用编码方法。编码显示在下面的答案中。

Solved The solution, as I implied elsewhere, is in the encoding. What is different, I do not know, but I got this working using an encoding method using ffmpeg. The encoding is shown in my answer below.

正如我所说,没有其他浏览器存在我使用的问题。

As I also stated, no other browser has an issue with what I was using.

推荐答案

编辑:正如我上面编辑的问题所述,我找到了解决方案。以下情况仅在您按照显示的顺序进行时才有效:

As stated in my edited question above, I found the solution. The following works only if you put it in the order shown:

ffmpeg  -i <infile> \
        -vcodec libx264 -vpre normal \
        -acodec libfaac \
        -threads 0 <outfile>.mp4

原始答案:

我花了几周时间试图工作无济于事。在网上搜索我看到无数其他人也在努力解决这个问题。我找不到一个可以让它工作并展示它是如何完成的人(除了使用@heff这里使用的特殊工具)。

I've spent weeks trying to get this to work to no avail. Searching the web I see countless others struggling with this, too. I've not been able to find one person who can get this to work and show how it was done (except with a special tool as @heff used here).

我无法在自己的论坛和文章中找到微软的任何回复。关于可能导致问题的编码,我找不到任何结果。我发现无数的线程在论坛中以相同的方式开始......没有解决方案。

I am unable to find any responses from Microsoft on their own forums and articles. There is nothing I could find regarding encoding that could be causing the issue. I find countless threads started in forums that end the same way...no solution.

所以答案很简单。 IE9坏了。但我们都已经知道了。最多是无能为力,它是这个星球上最糟糕的浏览器。虽然微软声称它可以处理像这样的视频文件,但它没有这样做,而其他浏览器没有任何问题。

So the answer is simple. IE9 is broken. But we all already know that. Inept at best, it's the worst browser on the planet. While Microsoft claims it can handle video files such as this, it fails to do so while other browsers have no issues whatsoever.

因此,除非有人出现并提供指导,否则我会接受这个答案作为最佳答案,因为它是。当然,微软不能或不会提供更好的产品。

So unless someone comes along and provides guidance, I will accept this answer as the best answer because it is. Surely Microsoft can't or won't provide a better one.

这篇关于HTML5视频以Chrome格式播放,但不播放IE9的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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