视频流(或渐进式下载)到Droid的浏览器 [英] Streaming Video (or Progressive Download) to the Droid Browser

查看:357
本文介绍了视频流(或渐进式下载)到Droid的浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想视频流(或使用渐进式下载)到摩托罗拉Droid浏览器和我没有很多运气。用我的iPhone,我可以直接Safari浏览器 http://xxx.xxx.xxx/FileName.mp4 (这是一个MPEG-4视频文件),和Safari打开QuickTime和视频播放。然而,随着Droid的,我去同一个网址,我面对的是一个错误,指出无法播放视频....很抱歉,此视频是无效的流到该设备。

I am trying to stream video (or use progressive download) to a Motorola Droid Browser and am not having a lot of luck. With my iPhone, I can direct Safari to http://xxx.xxx.xxx/FileName.mp4 (which is an MPEG-4 video file), and Safari opens quicktime, and the video plays. However, with the Droid, I go to the same web address and am faced with a error stating "Cannot play video.... Sorry, this video is not valid for streaming to this device".

当我直接Droid的浏览器WMV文件,它会完全下载的视频文件,然后在这似乎是Droid的视频播放器,如果我点击它玩。

When I direct the Droid's browser to a WMV file, it will fully download the video file and then play it in what appears to be the Droid video player if I click on it.

在理想情况下,我想复制iPhone在Droid上,在视频播放器弹出的完整下载前的视频开始的行为。视频格式是不是一个问题,因为我可以连接code中的视频以pretty的多任何标准。我尝试了.MP4文件,因为Droid的文件说,它支持MPEG-4视频,虽然我不能让它从浏览器中运行。

Ideally, I'd like to replicate the behavior of the iPhone on the Droid, where the video player pops up and the video starts before the complete download. Video format isn't an issue, as I can encode the video to pretty much any standard. I was trying the .mp4 file because the Droid documentation says that it supports MPEG-4 video, although I can't get it to work from the browser.

任何有识之士将是非常美联社preciate。

Any insight would be much appreciate.

推荐答案

流在Android中是一个痛苦的屁股。最好的办法是用流协议RTSP视频。

Streaming in Android is a pain in the ass. The best option is to stream the video with RTSP protocol.

如果您的Droid更新为2.2,你也可以建立一个简单的网页与嵌入式Flash播放器一样jwplayer(不要忘记设置备用内容时,Flash播放器未安装在设备上,使用户可以下载它从Adobe)。

If your Droid is updated to 2.2 you can also set up a simple webpage with an embedded Flash player like jwplayer (don't forget to set up alternate content when Flash player is not installed on the device so the user can download it from Adobe).

我成功地部署了解决方案。 RTSP为< 2.1和嵌入式Flash播放器从RTMP流播放视频(也可以播放来自服务器的本地文件)

I successfully deployed both solutions. RTSP for <2.1 and embedded Flash player playing video from RTMP stream (you can also play local file from the server)

请注意,在某些设备(英雄),你不能嵌入的WebView与Flash播放器你的应用程序中。

Note that in some devices (Hero) you can't embed the WebView with the Flash player inside your app.

如果你在寻找一个快速的解决方案我想给一个尝试3GP。

If you look for a fast solution I would give a try to 3gp.

此外,当连接不够快,播放视频,你会得到你发布了同样的错误(即使有正确的连接codeD视频)。

Also, when connectivity is not fast enough to play the video you will get that same error you posted (even with properly encoded videos).

编辑:我使用H.264对RTSP流和VP6的RTMP。 VP8只由较新的设备支持。

I used H.264 on RTSP streams and VP6 on RTMP. VP8 is supported by newer devices only.

这篇关于视频流(或渐进式下载)到Droid的浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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