iPhone 状态中的视频标签

发布于 2024-09-04 23:14:21 字数 536 浏览 4 评论 0原文

有没有任何电影可以使用视频标签在 iPhone/iPad safari 中实际播放?我们尝试了很多格式和代码片段。我听说 mp4/h264 应该可以,但不适合我们。

谁能给我指出一个在线的工作示例吗?

如果您知道 iPhone 上 videotag 的代码或规格/格式,那就太好了。

更新:

这是我们拥有的 mp4 文件的链接:http://aino.se/media/207 .mp4 以下是我们尝试过的最新代码:

<video width="480" height="270" controls autoplay>
    <source src="http://aino.se/media/207.mp4" type="video/mp4">
</video>

在 Safari/Chrome 中运行良好,但在 iPhone/iPod 中没有显示

Is there any movie that actually works in iPhone/iPad safari using the video tag? We tried so many formats and code snippets. I've heard that mp4/h264 should work, but not for us.

Can anyone point me to a working example online?

If you know the code or specs/formats for the videotag on iphone, that would be great.

Update:

Here is a link to the mp4 file we have: http://aino.se/media/207.mp4
Here is the latest code we tried:

<video width="480" height="270" controls autoplay>
    <source src="http://aino.se/media/207.mp4" type="video/mp4">
</video>

Works great in Safari/Chrome but no show in iPhone/iPod

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

浅忆流年 2024-09-11 23:14:21

是的,视频标签有效。 www.sup.com.tw 有一些(不是全部。虽然该网站是中文的。单击右上角的视频链接。)

该网站上的较新视频适用于 IE 6/7/8(通过回退到flash 播放器,未在 IE9 上测试)、Firefox(由于不支持 h.264,必须渲染单独的 ogv 文件)、Safari、Chrome、iPhone Safari、Android 浏览器(Desire 模型,未弄清楚浏览器类型)。

问题出在你的编码上。请查看此页面,了解有关如何转换的详细说明:

http://diveintohtml5.ep.io/video。 html

我认为关键是h.264转换的配置文件。需要确保您正在转换为基线配置文件。 iPhone 不支持其他配置文件。

我在 Mac OS X 中使用 handbrakeCLI 和 Automator 来进行批量渲染。

Yes, the video tag works. www.sup.com.tw has some (not all. The site is in Chinese though. Click the video links on the top right hand corner.)

Newer videos on this site works with IE 6/7/8 (through fall back to flash player, not tested on IE9), Firefox (had to render a separate ogv file since no h.264 support), Safari, Chrome, iPhone Safari, Android browser (the Desire model, didn't figure out the browser type).

Problem is with your encoding. Look at this page for detail instructions on how to convert:

http://diveintohtml5.ep.io/video.html

The key I think is the profile of the h.264 conversion. Need to make sure you're converting to Baseline profile. Other profiles are not supported in iPhone.

I used the handbrakeCLI with Automator in Mac OS X to batch render.

凉薄对峙 2024-09-11 23:14:21

事实上,这些视频可以在桌面版 Chrome 和 Safari 上运行,这表明问题出在视频的编码方式上。虽然 iPhone 和 iPad 通过 HTML5 支持 H.264 视频,但它们仅支持可用的最基线配置文件。这意味着您可以做一些额外的事情来使视频看起来更好(例如额外的参考帧、B 帧、CABAC 等),但这些都会导致视频在 iOS 上无法播放。

您使用什么编码软件?我会尝试使用最普通的可用设置再次对视频进行编码:设置平均比特率,保持 FPS 相同,如果您认为这有助于提高质量,则可以进行两次通过。除此之外的一切都是相当不稳定的。

编辑: 例如,vimeo.com 的所有视频均采用 iPhone 就绪格式。

The fact that the videos are working on desktop versions of Chrome and Safari suggest that the problem is how your videos are encoded. While the iPhone and iPad support H.264 video via HTML5, they only support the most baseline profile available. This means that extra things you can do to make the video look better (like extra Reference Frames, B-Frames, CABAC, etc) all render the video unplayable on iOS.

What encoding software are you using? I would try encoding the videos again with the most vanilla settings available: set an average bit rate, keep the FPS the same, and maybe do a two-pass if you think it'll help with quality. Everything beyond that is pretty shaky ground.

Edit: As for examples, vimeo.com has all of their videos in an iPhone-ready format.

一场信仰旅途 2024-09-11 23:14:21

Apple 提供了使用 HTML5 与 iPad 正常配合使用的网站列表:http:// www.apple.com/ipad/ready-for-ipad/

HTML5 的带有 h264 源的 video 标签应该可以正常工作。

Apple has a list of sites that use HTML5 to work properly with iPad: http://www.apple.com/ipad/ready-for-ipad/

HTML5's video tag with a h264 source should work just fine.

死开点丶别碍眼 2024-09-11 23:14:21

视频标签适用于 iPad 和 iOS4,不适用于 iPhone OS 3.1 及更早版本。

The video tag works on the iPad and iOS4, not iPhone OS 3.1 and earlier.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文