HTML 5视频问题 [英] HTML 5 Video Problem

查看:338
本文介绍了HTML 5视频问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将我的网站设置为使用HTML 5视频. mp4文件从S3提供.我的MIME类型正确,URL也正确.虽然没有用.我唯一能想到的就是编解码器是错误的.

I'm trying to set up my site to use HTML 5 videos. The mp4 files are served from S3. I've got the MIME type right, and the URL is right. It's not working though. The only thing I can think of is the codec being wrong.

这是我的代码:

<video width="320" height="240" controls>
<source src="{url}"  type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
</video>

据我所知,音频编解码器始终是相同的. mp4a.40.2.该视频被编码为基线,但是根据 http://wiki.whatwg.org/wiki/Video_type_parameters#MPEG-4 ,在我的代码1E中,视频编解码器的最后两个字符是可变的.

Now as I understand it, the audio codec is always the same. mp4a.40.2. The video is encoded as baseline, but according to http://wiki.whatwg.org/wiki/Video_type_parameters#MPEG-4, the last two characters of the video codec, in my code 1E are variable.

字符是否足以导致视频无法正常工作?如果是这样,我如何找到正确的设置?

Is having the wrong characters enough to cause the video to not work? If so, how do I find the right settings?

我很难缠这些东西.感谢您提供的任何帮助.

I'm having a hard time wrapping my head around this stuff. Thanks for any help you can provide.

推荐答案

视频编解码器信息的想法是,如果浏览器无法播放视频,则它不会下载该视频. (在这里找到了.)因此,我认为即使使用了错误但又常见的avc级别(最后2个字符) ),它应该下载并播放. 我发现了本指南如何使用十六进制编辑器确定和更改您的avc级别. Megui 显然也适用.

The idea of the video codecs information is that your browser won't download the video if it can't play it. (found that here) So I think even with a wrong, but common, avc level (last 2 chars) it should download and play. I found this guide how to determine and change your avc level using a hex editor. Megui apparently also works for that.

这篇关于HTML 5视频问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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