2010-07-27 27 views
1

我的主開發手機是運行2.2的Nexus 1。現在,我已經成功地從Wowza服務器上將實時視頻流式傳輸到此設備。RTSP直播只是不適用於Android 1.5/1.6嗎?

我已經把我的應用程序(沒有修改),並把它放在索尼愛立信Xperia運行1.6。視頻不會播放。我得到以下錯誤:

MediaPlayer: Couldn't open file on client side, trying server side 
... 
MediaPlayer: info/warning (1/26) 
PlayerDriver: Command PLAYER_INIT completed with an error or info PVMFFailure 
MediaPlayer: Error:(1,-1) 
VideoView: Error: 1,-1 

我一直在Google上搜索,但似乎無法得到明確的答案。有誰知道如果直播流只是不適用於某些版本的Android?

+0

能否請您分享提前 – Sam 2012-02-28 15:22:18

+0

嗨山姆項目鏈接u必須在現場完成Streaming.Thanks,對不起,有問題的應用程序是一個我做了工作,我沒有可用的源代碼。 – Aurora 2012-02-28 16:55:43

+0

感謝您的回覆@Aurora。 – Sam 2012-02-29 08:33:00

回答

0

我們在1.5,1.6和2.1上使用了RTSP Live streaming;所以你應該能夠得到這個工作;但是你可能有一個編碼只能在2.2上工作。您正在流式傳輸什麼類型的流?爲Android

+0

我有許多不同的流進來,所有最終都通過一些伏都教從另一個編碼器轉換爲H264。我不控制流,所以我並不總是知道事物的所有細節。儘管如此,聽到其他人已經開始工作,我感到非常欣慰。那裏的文檔可能會很糟糕,我找不到可以完成的明確聲明。 你可以得到我需要的拍頭的最佳答案。現在只要我能找出dang錯誤數字的含義。 – Aurora 2010-07-30 16:17:02

1

視頻流:

package com.test.videodemo; 

import android.app.Activity; 

import android.graphics.PixelFormat; 
import android.net.Uri; 
import android.os.Bundle; 
import android.widget.MediaController; 
import android.widget.VideoView; 

public class videodemo extends Activity { 

VideoView v1; 
String path; 
Uri url; 


/** Called when the activity is first created. */ 
@Override 
public void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    getWindow().setFormat(PixelFormat.TRANSLUCENT); 
    setContentView(R.layout.main); 
    VideoView videoHolder = new VideoView(this); 
    videoHolder.setMediaController(new MediaController(this)); 
    setContentView(videoHolder); 

    videoHolder.setVideoURI(Uri.parse("http://bitcast-in.bitgravity.com/web18/web18/3gp/indo_china_suhasini.3gp")); 
    videoHolder.requestFocus(); 
    videoHolder.start(); 

} 

}

+0

youtube視頻rtsp鏈接適用於任何android版本?我無法播放單個視頻。我使用http://gdata.youtube.com/feeds/api/videos/ api獲取了rtsp網址。 – 2012-02-14 10:01:38