RTSP流不接收数据(C#和套接字)

时间:2011-05-06 19:09:29

标签: c# sockets rtsp

---------------REQUEST-------------------
DESCRIBE rtsp://192.168.1.201:554 RTSP/1.0
CSeq: 1
User-Agent: Dummy
Accept: application/sdp

----------------------------------


-----------------RESPONSE-----------------
RTSP/1.0 200 OK
CSeq: 1
Date: Wed, Mar 22 2000 05:32:28 GMT
Server: RTSP Server (v1.2.3)
Content-Base: rtsp://192.168.1.201:554/
Content-Type: application/sdp
Content-Length: 440

v=0
o=H.264 0 0 IN IP4 192.168.1.201
s=RTSP Server (v1.2.3)
c=IN IP4 0.0.0.0
i=SP5562HSM
t=0 0
a=range:npt=now-
a=control:*
a=etag:1234567890
m=video 0 RTP/AVP 96
b=AS:1500
a=rtpmap:96 H264/90000
a=control:trackID=0
a=fmtp:96 packetization-mode=0;profile-level-id=42001E;sprop-parameter-sets=Z0IA
HukCg/I=,aM44gA==
a=x-dimensions:320,240
a=sendonly
m=audio 0 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=control:trackID=1
a=sendonly

----------------------------------
---------------REQUEST-------------------
SETUP rtsp://192.168.1.201:554/trackID=0 RTSP/1.0
CSeq: 2
Transport: RTP/AVP;unicast;client_port=58830-58831
User-Agent: Dummy

----------------------------------


-------------RESPONSE---------------------
RTSP/1.0 200 OK
CSeq: 2
Date: Wed, Mar 22 2000 05:32:29 GMT
Server: RTSP Server (v1.2.3)
Session: 2154251319;timeout=80
Transport: RTP/AVP;unicast;client_port=58830-58831;server_port=6004-6005



----------------------------------
SESSION:  2154251319;
SERVER PORT (inp): 6004
---------------REQUEST-------------------
SETUP rtsp://192.168.1.201:554/trackID=1 RTSP/1.0
CSeq: 3
Session: 2154251319;
Transport: RTP/AVP;unicast;client_port=58835-58836
User-Agent: Dummy

----------------------------------


----------------RESPONSE------------------
RTSP/1.0 200 OK
CSeq: 3
Date: Wed, Mar 22 2000 05:32:32 GMT
Server: RTSP Server (v1.2.3)
Session: 2154251318;timeout=80
Transport: RTP/AVP;unicast;client_port=58835-58836;server_port=6002-6003



----------------------------------
---------------REQUEST-------------------
PLAY rtsp://192.168.1.201:554/ RTSP/1.0
CSeq: 4
----------------------------------


----------------RESPONMSE------------------
RTSP/1.0 200 OK
CSeq: 4
Date: Wed, Mar 22 2000 05:32:33 GMT
Server: RTSP Server (v1.2.3)
Session: 2154251318;timeout=80
Range: npt=now-


----------------------------------

这是我的请求和回复的日志。我有一个单独的线程侦听端口58830接受udp数据包(测试从另一台计算机发送udp并被收到)。

Wireshark显示请求和响应,但没有显示udp数据包。我在服务器和vlc之间来回查看,我的请求几乎相同,但我仍然没有收到udp视频数据

1 个答案:

答案 0 :(得分:0)

您的SDP文件的IN ADDR似乎无效0.0.0.0 ...

某些堆栈使用SDP中的信息,这可以解释为什么您没有收到您正在侦听的地址上的任何数据包。

此外,您看起来正在进行多播,是否确保您事先正确设置了套接字?