0

我正在尝试通过 rtsp 将视频流式传输到 Android 手机。我认为我的 SDP 不太正确,其中有些东西是手机不喜欢的。下面是手机的痕迹。知道导致玩家放弃的 SDP 有什么问题吗?

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)

在此先感谢您的帮助

问候

菲尔

4

1 回答 1

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 +
于 2010-10-21T16:22:20.903 回答