8

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".

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.

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.

Any insight would be much appreciate.

4

4 に答える 4

1

Android でのストリーミングは面倒です。最適なオプションは、RTSP プロトコルを使用してビデオをストリーミングすることです。

Droid が 2.2 にアップデートされている場合は、jwplayer などの Flash プレーヤーが埋め込まれた単純な Web ページをセットアップすることもできます (Flash プレーヤーがデバイスにインストールされていない場合は、代替コンテンツをセットアップして、ユーザーが Adob​​e からダウンロードできるようにすることを忘れないでください)。 .

両方のソリューションを正常に展開しました。RTMP ストリームからビデオを再生する <2.1 および組み込み Flash プレーヤー用の RTSP (サーバーからローカル ファイルを再生することもできます)

一部のデバイス (Hero) では、アプリ内の Flash プレーヤーに WebView を埋め込むことができないことに注意してください。

迅速な解決策を探しているなら、私は 3gp を試してみます。

また、接続がビデオを再生するのに十分な速度でない場合、投稿したのと同じエラーが発生します (適切にエンコードされたビデオであっても)。

編集: RTSP ストリームでは H.264 を使用し、RTMP では VP6 を使用しました。VP8 は、新しいデバイスでのみサポートされています。

于 2011-12-04T04:31:42.790 に答える
1

インテントを起動し、タイプを「video/*」に設定して、ブラウザではなくビデオ プレーヤーで直接開くようにする必要があります。

于 2011-05-12T20:06:02.043 に答える
0

ブラウザからの mp4 ファイルの再生がサポートされています。特定のリンクが機能していない場合は、そのリンクを投稿してください。また、「adb logcat」が何を示しているかを確認すると便利です。

于 2010-03-06T23:58:13.667 に答える
0

これについては完全にはわかりませんが、本当に可能だとは思いません。

私が知る限り、「サポートされている」とは、箱から出してすぐに再生できることを意味するだけですが、ブラウザ用のプラグインがないため、それと関係があることを認識していません.

Android でファイルを再生できるかどうかを確認したい場合は、ファイルを SD カードに入れ、ギャラリーから再生します。

于 2010-01-22T19:52:17.343 に答える