2012-02-27 170 views
0

我在播放流視頻時遇到問題。Android 2.3,4.0 rtsp視頻流錯誤:無視頻,但音頻

上的HTC Desire 2.2視頻播放很好,沒有任何問題,但 對Nexus One的2.3.4和歌Nexus S 4.0.3我只有音頻,但沒有視頻顯示

下面是對具有相同的問題塊日誌N1和NS

02-27 11:42:30.914: W/MyHandler(116): Unsupported format. Ignoring track #2. 
02-27 11:42:30.914: I/MyHandler(116): SETUP(2) completed with result -1010 (Unknown error: 1010) 

完整的日誌:

02-27 11:42:20.634: I/MyHandler(116): connection request completed with result 0 (Unknown error: 0) 
02-27 11:42:20.664: I/ARTSPConnection(116): status: RTSP/1.0 200 OK 
02-27 11:42:20.674: I/MyHandler(116): DESCRIBE completed with result 0 (Unknown error: 0) 
02-27 11:42:20.674: I/ASessionDescription(116): v=0 
02-27 11:42:20.674: I/ASessionDescription(116): o=- 952000 952000 IN IP4 178.124.133.2 
02-27 11:42:20.674: I/ASessionDescription(116): s=WowzaMediaServer 
02-27 11:42:20.674: I/ASessionDescription(116): i=<No author> <No copyright> 
02-27 11:42:20.674: I/ASessionDescription(116): c=IN IP4 0.0.0.0 
02-27 11:42:20.674: I/ASessionDescription(116): t=0 0 
02-27 11:42:20.674: I/ASessionDescription(116): a=SdpplinVersion:1610641560 
02-27 11:42:20.674: I/ASessionDescription(116): a=StreamCount:integer;2 
02-27 11:42:20.674: I/ASessionDescription(116): a=control:* 
02-27 11:42:20.674: I/ASessionDescription(116): a=LiveStream:integer;1 
02-27 11:42:20.674: I/ASessionDescription(116): a=Title:buffer;"V293emFNZWRpYVNlcnZlcg==" 
02-27 11:42:20.674: I/ASessionDescription(116): a=range:npt=0- 
02-27 11:42:20.674: I/ASessionDescription(116): a=tool:libavformat 53.5.0 
02-27 11:42:20.674: I/ASessionDescription(116): m=audio 7234 RTP/AVP 97 
02-27 11:42:20.674: I/ASessionDescription(116): b=AS:72 
02-27 11:42:20.674: I/ASessionDescription(116): b=TIAS:64000 
02-27 11:42:20.674: I/ASessionDescription(116): b=RR:1280 
02-27 11:42:20.674: I/ASessionDescription(116): b=RS:640 
02-27 11:42:20.674: I/ASessionDescription(116): a=maxprate:16.000000 
02-27 11:42:20.674: I/ASessionDescription(116): a=control:streamid=1 
02-27 11:42:20.674: I/ASessionDescription(116): a=range:npt=0- 
02-27 11:42:20.674: I/ASessionDescription(116): a=length:npt=0 
02-27 11:42:20.674: I/ASessionDescription(116): a=rtpmap:97 MP4A-LATM/44100/2 
02-27 11:42:20.684: I/ASessionDescription(116): a=fmtp:97 profile-level-id=41;cpresent=0;config=400024203fc0 
02-27 11:42:20.684: I/ASessionDescription(116): a=mimetype:string;"audio/MP4A-LATM" 
02-27 11:42:20.684: I/ASessionDescription(116): a=ASMRuleBook:string;"Marker=0,AverageBandwidth=64000,TimestampDelivery=TRUE,InterDepend=1;Marker=1,AverageBandwidth=0,TimestampDelivery=TRUE,InterDepend=0;" 
02-27 11:42:20.684: I/ASessionDescription(116): a=3GPP-Adaptation-Support:1 
02-27 11:42:20.684: I/ASessionDescription(116): a=Helix-Adaptation-Support:1 
02-27 11:42:20.684: I/ASessionDescription(116): a=AvgBitRate:integer;64000 
02-27 11:42:20.684: I/ASessionDescription(116): a=ForceRTP:integer;1 
02-27 11:42:20.684: I/ASessionDescription(116): m=video 7232 RTP/AVP 96 
02-27 11:42:20.684: I/ASessionDescription(116): b=AS:208 
02-27 11:42:20.684: I/ASessionDescription(116): b=TIAS:200000 
02-27 11:42:20.684: I/ASessionDescription(116): b=RR:4000 
02-27 11:42:20.684: I/ASessionDescription(116): b=RS:2000 
02-27 11:42:20.684: I/ASessionDescription(116): a=maxprate:16.000000 
02-27 11:42:20.684: I/ASessionDescription(116): a=control:streamid=2 
02-27 11:42:20.684: I/ASessionDescription(116): a=range:npt=0- 
02-27 11:42:20.684: I/ASessionDescription(116): a=length:npt=0 
02-27 11:42:20.684: I/ASessionDescription(116): a=rtpmap:96 H264/90000 
02-27 11:42:20.684: I/ASessionDescription(116): a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z0LAFdoCMK/r/wDTAMcQAAADABAAAAMB4PFi6g==,aM48gA== 
02-27 11:42:20.684: I/ASessionDescription(116): a=mimetype:string;"video/H264" 
02-27 11:42:20.684: I/ASessionDescription(116): a=ASMRuleBook:string;"Marker=0,AverageBandwidth=200000,TimestampDelivery=TRUE,InterDepend=1;Marker=1,AverageBandwidth=0,TimestampDelivery=TRUE,InterDepend=0;" 
02-27 11:42:20.684: I/ASessionDescription(116): a=3GPP-Adaptation-Support:1 
02-27 11:42:20.684: I/ASessionDescription(116): a=Helix-Adaptation-Support:1 
02-27 11:42:20.694: I/ASessionDescription(116): a=AvgBitRate:integer;200000 
02-27 11:42:20.694: I/ASessionDescription(116): a=ForceRTP:integer;1 
02-27 11:42:20.704: I/ARTSPConnection(116): status: RTSP/1.0 200 OK 
02-27 11:42:20.704: I/MyHandler(116): SETUP(1) completed with result 0 (Unknown error: 0) 
02-27 11:42:20.704: W/MyHandler(116): Missing 'source' field in Transport response. Using RTSP endpoint address. 
02-27 11:42:20.704: W/MyHandler(116): Unsupported format. Ignoring track #2. 
02-27 11:42:20.714: I/MyHandler(116): SETUP(2) completed with result -1010 (Unknown error: 1010) 
02-27 11:42:20.754: I/ActivityManager(163): Displayed by.tut.android/.tv.channelselector.VideoViewActivity: +338ms 
02-27 11:42:20.804: I/ARTSPConnection(116): status: RTSP/1.0 200 OK 
02-27 11:42:20.814: I/MyHandler(116): PLAY completed with result 0 (Unknown error: 0) 
02-27 11:42:30.824: W/MyHandler(116): Never received any data, switching transports. 
02-27 11:42:30.824: I/ARTSPConnection(116): status: RTSP/1.0 200 OK 
02-27 11:42:30.834: I/MyHandler(116): TEARDOWN completed with result 0 (Unknown error: 0) 
02-27 11:42:30.844: I/MyHandler(116): connection request completed with result 0 (Unknown error: 0) 
02-27 11:42:30.864: I/ARTSPConnection(116): status: RTSP/1.0 200 OK 
02-27 11:42:30.874: I/MyHandler(116): DESCRIBE completed with result 0 (Unknown error: 0) 
02-27 11:42:30.874: I/ASessionDescription(116): v=0 
02-27 11:42:30.874: I/ASessionDescription(116): o=- 139000 139000 IN IP4 178.124.133.2 
02-27 11:42:30.874: I/ASessionDescription(116): s=WowzaMediaServer 
02-27 11:42:30.874: I/ASessionDescription(116): i=<No author> <No copyright> 
02-27 11:42:30.874: I/ASessionDescription(116): c=IN IP4 0.0.0.0 
02-27 11:42:30.874: I/ASessionDescription(116): t=0 0 
02-27 11:42:30.884: I/ASessionDescription(116): a=SdpplinVersion:1610641560 
02-27 11:42:30.884: I/ASessionDescription(116): a=StreamCount:integer;2 
02-27 11:42:30.884: I/ASessionDescription(116): a=control:* 
02-27 11:42:30.884: I/ASessionDescription(116): a=LiveStream:integer;1 
02-27 11:42:30.884: I/ASessionDescription(116): a=Title:buffer;"V293emFNZWRpYVNlcnZlcg==" 
02-27 11:42:30.884: I/ASessionDescription(116): a=range:npt=0- 
02-27 11:42:30.884: I/ASessionDescription(116): a=tool:libavformat 53.5.0 
02-27 11:42:30.884: I/ASessionDescription(116): m=audio 7234 RTP/AVP 97 
02-27 11:42:30.884: I/ASessionDescription(116): b=AS:72 
02-27 11:42:30.894: I/ASessionDescription(116): b=TIAS:64000 
02-27 11:42:30.894: I/ASessionDescription(116): b=RR:1280 
02-27 11:42:30.894: I/ASessionDescription(116): b=RS:640 
02-27 11:42:30.894: I/ASessionDescription(116): a=maxprate:16.000000 
02-27 11:42:30.894: I/ASessionDescription(116): a=control:streamid=1 
02-27 11:42:30.894: I/ASessionDescription(116): a=range:npt=0- 
02-27 11:42:30.894: I/ASessionDescription(116): a=length:npt=0 
02-27 11:42:30.894: I/ASessionDescription(116): a=rtpmap:97 MP4A-LATM/44100/2 
02-27 11:42:30.894: I/ASessionDescription(116): a=fmtp:97 profile-level-id=41;cpresent=0;config=400024203fc0 
02-27 11:42:30.904: I/ASessionDescription(116): a=mimetype:string;"audio/MP4A-LATM" 
02-27 11:42:30.904: I/ASessionDescription(116): a=ASMRuleBook:string;"Marker=0,AverageBandwidth=64000,TimestampDelivery=TRUE,InterDepend=1;Marker=1,AverageBandwidth=0,TimestampDelivery=TRUE,InterDepend=0;" 
02-27 11:42:30.904: I/ASessionDescription(116): a=3GPP-Adaptation-Support:1 
02-27 11:42:30.904: I/ASessionDescription(116): a=Helix-Adaptation-Support:1 
02-27 11:42:30.904: I/ASessionDescription(116): a=AvgBitRate:integer;64000 
02-27 11:42:30.904: I/ASessionDescription(116): a=ForceRTP:integer;1 
02-27 11:42:30.904: I/ASessionDescription(116): m=video 7232 RTP/AVP 96 
02-27 11:42:30.904: I/ASessionDescription(116): b=AS:208 
02-27 11:42:30.904: I/ASessionDescription(116): b=TIAS:200000 
02-27 11:42:30.904: I/ASessionDescription(116): b=RR:4000 
02-27 11:42:30.904: I/ASessionDescription(116): b=RS:2000 
02-27 11:42:30.904: I/ASessionDescription(116): a=maxprate:16.000000 
02-27 11:42:30.904: I/ASessionDescription(116): a=control:streamid=2 
02-27 11:42:30.904: I/ASessionDescription(116): a=range:npt=0- 
02-27 11:42:30.904: I/ASessionDescription(116): a=length:npt=0 
02-27 11:42:30.904: I/ASessionDescription(116): a=rtpmap:96 H264/90000 
02-27 11:42:30.904: I/ASessionDescription(116): a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z0LAFdoCMK/r/wDTAMcQAAADABAAAAMB4PFi6g==,aM48gA== 
02-27 11:42:30.904: I/ASessionDescription(116): a=mimetype:string;"video/H264" 
02-27 11:42:30.904: I/ASessionDescription(116): a=ASMRuleBook:string;"Marker=0,AverageBandwidth=200000,TimestampDelivery=TRUE,InterDepend=1;Marker=1,AverageBandwidth=0,TimestampDelivery=TRUE,InterDepend=0;" 
02-27 11:42:30.904: I/ASessionDescription(116): a=3GPP-Adaptation-Support:1 
02-27 11:42:30.904: I/ASessionDescription(116): a=Helix-Adaptation-Support:1 
02-27 11:42:30.904: I/ASessionDescription(116): a=AvgBitRate:integer;200000 
02-27 11:42:30.904: I/ASessionDescription(116): a=ForceRTP:integer;1 
02-27 11:42:30.914: I/ARTSPConnection(116): status: RTSP/1.0 200 OK 
02-27 11:42:30.914: I/MyHandler(116): SETUP(1) completed with result 0 (Unknown error: 0) 
02-27 11:42:30.914: W/MyHandler(116): Unsupported format. Ignoring track #2. 
02-27 11:42:30.914: I/MyHandler(116): SETUP(2) completed with result -1010 (Unknown error: 1010) 
02-27 11:42:31.254: I/ARTSPConnection(116): status: RTSP/1.0 200 OK 
02-27 11:42:31.254: I/MyHandler(116): PLAY completed with result 0 (Unknown error: 0) 
02-27 11:42:32.866: I/AwesomePlayer(116): ARTSPController::connect returned 0 
+0

同樣的問題在這裏... – 2012-03-09 16:10:54

回答

0

什麼服務器是從這個?編輯 - 我剛剛看到WowzaMediaServer

真的,可能沒有足夠的信息,服務器日誌也會非常有幫助。

首先,android在這些版本中改變了媒體服務器,從OpenCore轉移到StageFright。

錯誤是 「11月2日至27日:42:20.704:W/MyHandler的(116):不支持的格式忽略磁道#2」

Android的RTP客戶端已經返回錯誤 「設立」 的視頻跟蹤。 顯而易見的第一個: 您的SDP文件指定端口7232「m = video 7232 RTP/AVP 96」。該端口是否已被使用?

根據APacketSource.cpp從libstagefright媒體播放器, 的原因設置可能會失敗,這個錯誤是因爲:
1)在SDP或編碼sprops沒有有效的圖片dimenions(嘗試手動解碼它們)與2)如果使用AMR和採樣率!= 8000並且存在多於1個通道(您不是)
3)如果使用的是base64工具(以及支持二進制數據,而不僅僅是ascii文本) AMR WB和採樣率!= 16000,並且有超過1個通道(您不是)
4)您的字符串描述不符合以下其中一個: 「H264 /」,「H263-2000 /」,「H263-1998 /」,「MP4A-LATM /」,「AMR /」,「AMR-WB /」,「MP4V-ES /」,「mpeg4- generic /」

,你既有 「H264/90000」 和 「視頻/ H264」

我會失去了 「A = MIME類型:字符串;」 視頻/ H264 「」 字符串中的SDP文件,看看有用??這是一個長期雖然(但這並不能解釋爲什麼音頻工作,因爲它是相同的)

雖然有* shoudn't「有任何問題與此,在我的經驗與Android和RTP/RTSP/SDP到目前爲止,stagefright不太適合處理擴展類型,只能處理最小數量。

如果你想看看我在上面解釋的東西,你可以查看android源代碼,文件位於「/ 。媒體/ libstagefrigt/RTSP /」的相關文件MyHandler.h和APacketSource.cpp

更新:您有另一個/糟糕的問題

我剛剛在你的日誌中看到這個: 「02-27 11:42:30.824:W/MyHandler(116):從未收到任何數據,切換傳輸。」我注意到兩次嘗試是背靠背的,而不是我以爲是你複製並粘貼兩次嘗試。

這裏有兩個問題,一個是視頻設置失敗,另一個是整個第一個會話設置失敗。

Android發出PLAY命令並且它在10秒內沒有接收數據之間的10秒超時之後發生「從未收到任何數據,切換傳輸」錯誤。然後它斷開會話並嘗試通過TCP建立會話。

很可能有一些UDP端口在您的計算機/防火牆等被阻止或未打開。這會導致第一個會話失敗。它甚至可以解釋視頻設置失敗的原因。檢查服務器嘗試用於視頻設置的端口。確保它們在1024以上。

此外,我不喜歡你的SDP如何首先列出音頻,然後是視頻,但音頻使用低於後續視頻的端口(可能很好,只是「看起來」很奇怪)