.webm视频可在Chrome和Opera中播放,但不能在Firefox中播放 [英] .webm video plays in Chrome and Opera but not Firefox

查看:74
本文介绍了.webm视频可在Chrome和Opera中播放,但不能在Firefox中播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Miro 将一些.mp4文件转换为.webm.它们可以在Chrome和Opera中运行,但不能在Firefox 16中运行.Firefox已受支持从FF 4开始的.webm.我测试了 video.canPlayType()并返回可能".我知道MIME类型在.htaccess中是正确的.我从 html5rocks 下载了一个测试.webm文件,并将其上传到了同一文件服务器,它在FF中表现良好,这使我认为它一定是编码.我尝试多次转换视频,但仍然没有骰子.谁能想到会导致他们在FF中无法正常工作的原因?是否有更可靠的方法将视频转换为.webm?

I converted some .mp4 files to .webm with Miro. They play in Chrome and Opera but they do not play in Firefox 16. Firefox has supported .webm since FF 4. I tested video.canPlayType() and it returns "probably". I know that the MIME types are correct in .htaccess. I downloaded the a test .webm file from html5rocks and uploaded it to the same server and it played fine in FF, which makes me think it must be the encoding. I tried converting the videos multiple times and still no dice. Can anyone think of what would cause the them to not work in FF? Is there a more reliable way to convert videos to .webm?

Chrome_ImF.webm < ==在FF中有效

Chrome_ImF.webm <== works in FF

amber-miro.webm < ==在FF中不起作用

amber-miro.webm <== does not work in FF

costa-miro.webm < ==在FF中不起作用

costa-miro.webm <== does not work in FF

推荐答案

编码似乎没有问题,但是使用Miro创建的webm文件的文件格式存在一些错误.我建议使用 ffmpeg .

There seems to be no problem with the encoding, however there are some errors with the file format on the webm files you created with Miro. I suggest using ffmpeg.

我已经测试了您作为示例提供的amber.webm.我使用ffmpeg使用命令行将其重新格式化为webm,而无需进行编码:

I've tested amber.webm which you provided as a sample. I used ffmpeg to re-format it into webm, without encoding, using the commandline:

ffmpeg -i amber.webm -acodec copy -vcodec copy amber1.webm

生成的文件似乎可以在Firefox中很好地播放.

And the resulting file seems to play well in Firefox.

要通过ffmpeg将.mov直接转换为.webm,可以使用:

To directly convert .mov to .webm via ffmpeg you can use:

ffmpeg -i amber.mov -qscale 0 amber.webm

-qscale 0 旨在保留最高质量.请参见 ffmpeg文档.

-qscale 0 is meant to retain the highest quality. See the ffmpeg docs.

这篇关于.webm视频可在Chrome和Opera中播放,但不能在Firefox中播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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