在Firefox 33中无法使用HTML5 vidio进行播放 [英] Trouble getting HTML5 vidio to play, in Firefox 33

查看:185
本文介绍了在Firefox 33中无法使用HTML5 vidio进行播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在准备将一些旧页面更新为HTML5,并且很惊讶地发现它在Chrome中有效,但并不是最新的Firefox(v.33.1 ...也尝试过v.32)。这是什么奇怪的...在Firefox中,它实际上会发挥,如果你哄它。如果您将视频位置滑块移动到一开始(约5秒钟),然后单击播放,一切都很好。进一步检查显示,当我点击播放时,文件指针跳到文件的末尾,使我的海报照片完好无损,导致观看者认为没有什么可以做的。但是,如果您手动将指针移回任何位置,超出文件前几秒钟(真的!),然后单击播放按钮,FF将播放视频的其余部分。

$ b $有时候,我认为,对我们来说,技术上更加科学的是,宇宙在愚昧的问题上,而上帝却笑了起来。



我怀疑视频文件损坏,但是所有的转换都是用非常可靠的ffmpeg实用程序进行的,并使用VLC进行测试。再一次,Chrome可以使用相同的视频格式。这是一个链接...



FF将播放旧的ogv文件,所以如果这是FF的一个,现在在33版本是错的,我我们必须检测浏览器,并用document.write()自己写命令。但是,要知道是否有更加严格的前进方案是很好的。



请注意,我已尝试将mime类型添加到我的HTACESS文件中。但是,当我的浏览器直接在本地机器上的文件时,行为是一样的事实,使我怀疑是这个问题。



http://pixyland.org/peterpan/OurWedding2a.html



这里是页面代码

 <!DOCTYPE html> 

< html>
< head>
< title>我们的仙女精彩婚礼当天...到达!
< / title>

< link rel =快捷图标href =/ pixyland.ico>

< / head>

< body marginwidth =10leftmargin =10rightmargin =10bgcolor =#33cc99link =#333399>



< table align =centerborder =1>< tr>< td align =center>
< div id ='vtLocation'align =center>

< video width =640height =480controls poster =Imagezz / Wedding / arIMG_2280.JPG>
< source src =../ vids / Arrival.mp4type =video / mp4> <! - cSafari / iOS - >
< source src =../ vids / Arrival.webmtype =video / webm> <! - Firefox / Opera / Chrome - >
< source src =../ vids / Arrival.ogvtype =video / ogg> <! - 旧版Firefox / Opera / Chrome - >


<! - 作为最后的手段下载 - >
< p>如果您无法查看视频,请点击下面的一些链接< br>
在一些很好支持的视频格式。您可能只能下载< br>
,并且在没有浏览器的情况下播放这些文件之一。< br>< br>
< strong>下载视频:< / strong> nbsp;
nbsp;< a href =../ vids / Arrival.mp4>MP4< / a>
nbsp;< a href =../ vids / Arrival.webm>WEBM< / a>
nbsp;< a href =../ vids / Arrival.ogv>Ogg< / a>
< / p>

< / video>
< / div>
< / table>



< / body>
< / html>


解决方案

发现这个可能值得尝试的建议

  fmpeg -i input.webm -codec copy -avoid_negative_ts 1 output.webm 

https://stackoverflow.com/a/19639848/1686036



似乎帮助我,虽然它可能是其他不寻常的与FF


I'm preparing to update some old pages to HTML5, and was surprised to see that it worked in Chrome, but not the latest Firefox (v.33.1... also tried v.32). What is odd is this... In Firefox it actually WILL play IF you "coax it". If you move the video position slider to someplace beyond the start (about 5 seconds in) and THEN click play, all is well. Further inspection showed that when I click play, the file pointer was jumping to the end of the file leaving my "poster" photo intact, leading the viewer to think there is nothing else they can do. If, however, you manually move the pointer back to anyplace beyond the first couple of seconds of the file (really!), and THEN click the PLAY button, FF will play the rest of the video fine.

Sometimes i think that to the more technically minded among us, the universe doles out the weirder problems, while God laughs.

I'd suspect video file corruption, but all my conversions were made with the very reliable ffmpeg utility, and tested with VLC. Again, it works fine from Chrome, which supposedly uses the same video format. Here's a link...

FF will play the older type ogv files, so if this is one of those things where FF, now at version 33 is at fault, I'll have to detect the browser and write the order myself with a document.write(). But it would be nice to know if there is a more straigh forward solution.

Note that I have tried adding the mime types to my HTACESS file. But the fact that the behavior is the same when point my browsers directly the file on my local machine, makles me doubt that is the problem.

http://pixyland.org/peterpan/OurWedding2a.html

And here is the page code

 <!DOCTYPE html > 

<html>
<head>
    <title>Our Fairy Wonderful Wedding Day... The Arrival!! 
</title>

    <link rel="shortcut icon" href="/pixyland.ico" >

</head>

<body  marginwidth="10" leftmargin="10"  rightmargin="10" bgcolor="#33cc99" link="#333399"  >



<table align="center" border="1"><tr><td align="center">
<div id='vtLocation' align="center">

<video width="640" height ="480" controls poster="Imagezz/Wedding/arIMG_2280.JPG">
 <source src ="../vids/Arrival.mp4" type="video/mp4">  <!--cSafari / iOS -->
 <source src ="../vids/Arrival.webm" type="video/webm"> <!-- Firefox / Opera / Chrome -->
 <source src ="../vids/Arrival.ogv" type="video/ogg" > <!-- older Firefox / Opera / Chrome -->


 <!-- download as last resort -->
 <p>If you are unable to view the video, here are some links to download <br>
  in a a few well supported video formats. You may be able to just download <br>
  and play one of these files without the browser.<br><br>
  <strong>Download Video:</strong>nbsp;
    nbsp;<a href="../vids/Arrival.mp4">"MP4"</a>
    nbsp;<a href="../vids/Arrival.webm">"WEBM"</a>
    nbsp;<a href="../vids/Arrival.ogv">"Ogg"</a>
 </p>

 </video>
 </div>
 </table>



</body>
</html>

解决方案

Found this suggestion that may be worth trying

fmpeg -i input.webm -codec copy -avoid_negative_ts 1 output.webm

https://stackoverflow.com/a/19639848/1686036

It seemed to help me, although it could be something else "unusual" with FF

这篇关于在Firefox 33中无法使用HTML5 vidio进行播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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