2013-08-21 62 views
1

我正在嘗試播放使用h264/aac編碼並通過多播從VLC傳輸的流。我在啓動視頻視圖之前設置了wifi多播鎖定。使用從SD卡讀取SDP文件,我在logcat中在啓動時得到這些錯誤: Android VideoView無法播放多播流

 
E/ASessionDescription: ASessionDescription::getServerSessionURL: Did not get the Server URL info from the control attribute...Checking in Origin Info 
E/ASessionDescription: ASessionDescription::getServerURLFromOriginAndSessionName : URL info not present in the Session name 
E/ASessionDescription: ASessionDescription::getServerSessionURL: Did not get the Server URL info Origin field 
E/NuPlayer: getServerSessionURL for SDP Failed 
這是我的SDP文件的內容:

 
v=0 
o=- 2890844526 2890842807 IN IP4 192.168.16.1 
s=Multicast stream test 
c=IN IP4 239.10.1.1/127 
t=0 0 
a=recvonly 
m=video 5004 RTP/AVP 96 97 
a=rtpmap:96 H264/90000 
a=fmtp:96 packetization-mode=1 
a=rtpmap:97 MPEG-4-GENERIC/44100/2 
a=fmtp:97 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexltalength=3; config=1210 
a=orient:portrait 

所有設備都在同一個網絡上。這顯示了代碼的簡單:

VideoView videoView = (VideoView) findViewById(R.id.playback_view); 
videoView.setVideoPath(Environment.getExternalStorageDirectory() + "/test.sdp"); 
videoView.start(); 

我也試過這種VLC產生的SDP與MP3音頻,它也無法播放

 
v=0 
o=- 15403293578011388063 15403293578011388063 IN IP4 192.168.1.2 
s=Unnamed 
i=N/A 
c=IN IP4 239.10.1.1/255 
t=0 0 
a=tool:vlc 2.0.7 
a=recvonly 
a=type:broadcast 
a=charset:UTF-8 
m=audio 5004 RTP/AVP 14 
b=AS:128 
b=RR:0 
a=rtpmap:14 MPA/90000/2 
m=video 5006 RTP/AVP 96 
b=AS:800 
b=RR:0 
a=rtpmap:96 H264/90000 
a=fmtp:96 packetization-mode=1;profile-level-id=64001e;sprop-parameter-sets=Z2QAHqzZQLQnsBEAAAMAAQAAAwAyjxYtlg==,aOvssiw=; 

回答

0

這仍然不支持的Android作爲版本4.4。我不得不最終爲這個項目使用JavaCV。

相關問題