2010-10-08 109 views
0

我試圖通過rtsp將視頻流式傳輸至Android手機。我認爲我的SDP並不完全正確,手機不喜歡它。以下是手機中的痕跡。任何想法導致玩家放棄的SDP有什麼問題?通過RTSP將視頻流式傳輸至Android

10-08 14:11:22.657 I/RTSPEngine(5031): RTSP Server response: 
10-08 14:11:22.657 I/RTSPEngine(5031): RTSP/1.0 200 OK 
10-08 14:11:22.657 I/RTSPEngine(5031): CSeq: 0 
10-08 14:11:22.657 I/RTSPEngine(5031): Date: Fri, 8 Oct 2010 21:11:24 GMT 
10-08 14:11:22.657 I/RTSPEngine(5031): Expires: Fri, 8 Oct 2010 21:11:24 GMT 
10-08 14:11:22.657 I/RTSPEngine(5031): Last-Modified: Fri, 8 Oct 2010 21:11:24 GMT 
10-08 14:11:22.657 I/RTSPEngine(5031): Session: 123456 
10-08 14:11:22.657 I/RTSPEngine(5031): Content-Type: application/sdp 
10-08 14:11:22.657 I/RTSPEngine(5031): Content-Length: 207 
10-08 14:11:22.657 I/RTSPEngine(5031): 
10-08 14:11:22.657 I/RTSPEngine(5031): v=0 
10-08 14:11:22.657 I/RTSPEngine(5031): o=- 21070 3 IN IP4 0.0.0.0 
10-08 14:11:22.657 I/RTSPEngine(5031): c=IN IP4 0.0.0.0 
10-08 14:11:22.657 I/RTSPEngine(5031): s=xxxxx H.263 video stream 
10-08 14:11:22.657 I/RTSPEngine(5031): i=Video stream 
10-08 14:11:22.657 I/RTSPEngine(5031): t=0 0 
10-08 14:11:22.657 I/RTSPEngine(5031): m=video 0 RTP/AVP 103 
10-08 14:11:22.657 I/RTSPEngine(5031): a=rtpmap:103 H263-1998/90000 
10-08 14:11:22.657 I/RTSPEngine(5031): a=fmtp:103 profile=0; level=40 
10-08 14:11:22.657 I/RTSPEngine(5031): b=TIAS:2048000 
10-08 14:11:22.667 E/PlayerDriver(5031): Command PLAYER_INIT completed with an error or info PVMFErrNotSupported 
10-08 14:11:22.667 E/MediaPlayer(13821): error (1, -4) 

在此先感謝您的幫助

問候

菲爾

+0

這是引發錯誤的MediaPlayer,而不是rtsp客戶端。這相當於你的視頻文件的標題不正確,至少是imho。 – methode 2010-10-08 21:47:41

+0

感謝您的評論,但我不這麼認爲。在這一點上我還沒有流媒體。這只是RTSP DESCRIBE的答案 - 我期待接下來的SETUP告訴服務器要傳輸哪些端口。我試圖理解爲什麼android在這個階段出來,我可以改變,以確保它不會 – 2010-10-08 22:27:29

回答

1

我寫我自己的RTSP服務器,我也嵌入在手機上。我沒有讓我的服務器響應DESCRIBE(: - >)的任何問題。我確實遇到了一些問題,讓客戶繼續進行響應。關鍵似乎是添加更多行到我的SDP並刪除a = fmtp行。坦率地說,我不完全確定SDP是什麼意思,但這些是我添加的行

//"a=fmtp:%d profile=0; level=40" + CRLF + 
    "a=cliprect:0,0,%d,%d" +CRLF+ //height, width 
    "a=framesize:%d %d-%d" +CRLF+ //payload type, width, height 
    "a=control:*" + CRLF + 
    "a=range:npt=0-158.60000" + CRLF + 
    "a=control:trackID=65536" + CRLF + 
+0

Philip, 你是如何得到RTSPEngine logcat消息的?我有類似的問題,並從來沒有看到從RTSPEngine引擎(但我想)的消息。 謝謝 克里斯 – 2011-01-25 19:48:58

+0

每部手機我看已經啓用一組不同的logcats的 - 只是碰巧運氣了一個。 – 2011-01-25 19:48:58

+0

親愛的菲利普珍珠, 請問如何獲得與您類似的錯誤? – 2011-03-21 17:52:19