2010-10-08 108 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