免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 13688 | 回复: 4
打印 上一主题 下一主题

[桌面系统] RTSP完成后,Live555接收不到UDP数据? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-06-12 12:12 |只看该作者 |倒序浏览
30可用积分
RTSP Client:VLC+Live555的RTSP库
RTSP Server:DarwinStreamingServer(由第三方作过改动)

交互信息如下:
  1. CSeq: 1

  2.     Accept: application/sdp

  3.     User-Agent: (v2008.07.24)


  4.     Received DESCRIBE response: RTSP/1.0 200 OK

  5.     Server: DSS/5.0.3.2 (Build/452.22.3; Platform/Linux; Release/Panther; Update/3GPP; )

  6.     CSeq: 1

  7.     Last-Modified: Tue,8 Jun 2010 09:45:52 GMT

  8.     Cache-Control: must-revalidate

  9.     Content-length: 1166

  10.     Date: Tue,8 Jun 2010 09:45:52 GMT

  11.     Expires: Tue,8 Jun 2010 09:45:52 GMT

  12.     Content-Type: application/sdp

  13.     x-Accept-Retransmit: our-retransmit

  14.     x-Accept-Dynamic-Rate: 1

  15.     Content-Base: rtsp://58.196.13.15/sitv/10084_E001070600002361.mp4/


  16.     Need to read 1166 extra bytes
  17.     Read 1166 extra bytes: v=0

  18.     o=StreamingServer 3330517155 1118784660000 IN IP4 58.196.13.15

  19.     s=/10084_E001070600002361.mp4

  20.     u=http:///

  21.     e=admin@

  22.     c=IN IP4 0.0.0.0

  23.     t=0 0

  24.     a=control:*

  25.     a=mpeg4-iod:"data:application/mpeg4-iod;base64,AoIvAE/+AQ/zAQOBQgABQKRkYXRhOmFwcGxpY2F0aW9uL21wZWc0LW9kLWF1O2Jhc2U2NCxBVjRCUFFVZkF6a0F5U0FBWlFRdklCRVVVQUFBS0tBQUFCUlFBQVVnQUFBQnNDSUFBQUcxRHFDZ29LQUFBQUVBQUFBQklBQ0VRUHdvb0NGYW93QUdBUVFCSFFLZkF4a0FaUUFFRVVBVkFBWUFBQU1BQUFBQmdBQUZBaElRQmdFRAQNAQUACCEAAAAAAAAAAAYJAQAAAAAAAAAAA2EAAkA+ZGF0YTphcHBsaWNhdGlvbi9tcGVnNC1iaWZzLWF1O2Jhc2U2NCx3QkFTZ1RBcUJYSmhCSWhRUlFVL0FBPT0EEgINAAAUAAAAAAAAAAAFAwAAQAYJAQAAAAAAAAAA"

  26.     a=ISMA-compliance:1,1,1

  27.     a=range:npt=0-5165.000

  28.     m=audio 0 RTP/AVP 97

  29.     a=rtpmap:97 mpeg4-generic/44100/2

  30.     a=mpeg2-AudioPID:482

  31.     a=fmtp:97 streamtype=5; profile-level-id=15; mode=AAC-hbr; config=1210; SizeLength=13; IndexLength=3; IndexDeltaLength=3; Profile=1

  32.     a=mpeg4-esid:101

  33.     a=x-envivio-verid:00001029

  34.     a=control:trackID=1

  35.     m=video 0 RTP/AVP 96

  36.     a=rtpmap:96 MP4V-ES/1008

  37.     a=fmtp:96 profile-level-id=243; config=000001B022000001B50EA0A0A0A00000010000000120008440FC28A0215AA300

  38.     a=mpeg4-esid:201

  39.     a=x-envivio-verid:0000102e

  40.     a=control:trackID=2


  41.     [0x9b0f470] live555 demux debug: RTP subsession 'audio/MPEG4-GENERIC'
  42.     Sending request: SETUP rtsp://58.196.13.15/sitv/10084_E001070600002361.mp4/trackID=1 RTSP/1.0

  43.     CSeq: 2

  44.     Transport: MP2T/UDP;unicast;destination=172.20.32.198;client_port=37668-37669,MP2T/RTP/UDP;unicast;destination=172.20.32.198;client_port=37668-37669,MP2T/TCP;unicast;destination=172.20.32.198;interleaved=0-1,MP2T/RTP/TCP;unicast;destination=172.20.32.198;interleaved=0-1

  45.     User-Agent: (v2008.07.24)


  46.     Received SETUP response: RTSP/1.0 200 OK

  47.     Server: DSS/5.0.3.2 (Build/452.22.3; Platform/Linux; Release/Panther; Update/3GPP; )

  48.     CSeq: 2

  49.     Last-Modified: Tue,8 Jun 2010 09:45:52 GMT

  50.     Cache-Control: must-revalidat

  51.     Session: 12340005

  52.     Date: Tue,8 Jun 2010 09:45:52 GMT

  53.     Expires: Tue,8 Jun 2010 09:45:52 GMT

  54.     Transport: MP2T/UDP;unicast;client_port=37668-37669;server_port=8889-8890;ssrc=12345677;mode=PLAY


  55.     [0xb7300e88] main input debug: selecting program id=0
  56.     [0x9b0f470] live555 demux debug: RTP subsession 'video/MP4V-ES'
  57.     Sending request: SETUP rtsp://58.196.13.15/sitv/10084_E001070600002361.mp4/trackID=2 RTSP/1.0

  58.     CSeq: 3

  59.     Transport: MP2T/UDP;unicast;destination=172.20.32.198;client_port=47060-47061,MP2T/RTP/UDP;unicast;destination=172.20.32.198;client_port=47060-47061,MP2T/TCP;unicast;destination=172.20.32.198;interleaved=0-1,MP2T/RTP/TCP;unicast;destination=172.20.32.198;interleaved=0-1

  60.     Session: 12340005

  61.     User-Agent: (v2008.07.24)


  62.     Received SETUP response: RTSP/1.0 200 OK

  63.     Server: DSS/5.0.3.2 (Build/452.22.3; Platform/Linux; Release/Panther; Update/3GPP; )

  64.     CSeq: 3

  65.     Last-Modified: Tue,8 Jun 2010 09:45:52 GMT

  66.     Cache-Control: must-revalidat

  67.     Session: 12340005

  68.     Date: Tue,8 Jun 2010 09:45:52 GMT

  69.     Expires: Tue,8 Jun 2010 09:45:52 GMT

  70.     Transport: MP2T/UDP;unicast;client_port=47060-47061;server_port=8889-8890;ssrc=12345678;mode=PLAY


  71.     [0x9b0f470] live555 demux debug: setup start: 0.000000 stop:5165.000000
  72.     Sending request: PLAY rtsp://58.196.13.15/sitv/10084_E001070600002361.mp4/ RTSP/1.0

  73.     CSeq: 4

  74.     Session: 12340005

  75.     Scale: 1.000000

  76.     Range: npt=now-

  77.     User-Agent: (v2008.07.24)


  78.     [0x98e3050] qt4 interface debug: IM: Setting an input
  79.     [0x98e3050] qt4 interface debug: Updating the geometry
  80.     [0x98e3050] qt4 interface debug: Updating the geometry
  81.     Received PLAY response: RTSP/1.0 200 OK

  82.     Server: DSS/5.0.3.2 (Build/452.22.3; Platform/Linux; Release/Panther; Update/3GPP; )

  83.     CSeq: 4

  84.     Session: 12340005

  85.     Scale: 1.000000

  86.     [0x9b0f470] live555 demux debug: play start: 0.000000 stop:5165.000000
  87.     [0x9b0f470] main demux debug: using access_demux module "live555"
  88.     [0x9b0f470] main demux debug: TIMER module_need() : 1110.356 ms - Total 1110.356 ms / 1 intvls (Avg 1110.356 ms)
  89.     [0x99f0380] main decoder debug: looking for decoder module: 56 candidates
  90.     [0x99f0380] main decoder debug: using decoder module "faad"
  91.     [0x99f0380] main decoder debug: TIMER module_need() : 7.720 ms - Total 7.720 ms / 1 intvls (Avg 7.720 ms)
  92.     [0x99f0380] main decoder debug: thread (decoder) created at priority 5 (input/decoder.c:315)
  93.     [0x99f0380] main decoder debug: thread started
  94.     [0x9b42e90] main decoder debug: looking for decoder module: 56 candidates
  95.     [0x9b42e90] avcodec decoder debug: libavcodec initialized (interface 0x344200)
  96.     [0x9b42e90] avcodec decoder debug: using direct rendering
  97.     [0x98e3050] qt4 interface debug: Updating the geometry
  98.     [0x9b42e90] avcodec decoder debug: ffmpeg codec (MPEG-4 Video) started
  99.     [0x9b42e90] main decoder debug: using decoder module "avcodec"
  100.     [0x9b42e90] main decoder debug: TIMER module_need() : 18.044 ms - Total 18.044 ms / 1 intvls (Avg 18.044 ms)
  101.     [0x9b42e90] main decoder debug: thread (decoder) created at priority 0 (input/decoder.c:315)
  102.     [0x9b42e90] main decoder debug: thread started
  103.     [0xb7300e88] main input debug: `rtsp://58.196.13.15/sitv/10084_E001070600002361.mp4' successfully opened
  104.     [0x98e3050] qt4 interface debug: Updating the geometry
  105.     [0x98e3050] qt4 interface debug: Updating the geometry
  106.     [0x98e3050] qt4 interface debug: Updating the geometry
  107.     [0x9b0f470] live555 demux warning: no data received in 10s. Switching to TCP
  108.     [0x99f0380] main decoder debug: removing module "faad"
  109.     [0x99f0380] main decoder debug: killing decoder fourcc `mp4a', 0 PES in FIFO
  110.     [0x98e3050] qt4 interface debug: Updating the geometry
  111.     [0x9b42e90] avcodec decoder debug: ffmpeg codec (MPEG-4 Video) stopped
  112.     [0x98e3050] qt4 interface debug: Updating the geometry
  113.     [0x9b42e90] main decoder debug: removing module "avcodec"
  114.     [0x9b42e90] main decoder debug: killing decoder fourcc `mp4v', 0 PES in FIFO
  115.     [0xb7300e88] main input debug: Program doesn't contain anymore ES
  116.     Sending request: TEARDOWN rtsp://58.196.13.15/sitv/10084_E001070600002361.mp4/ RTSP/1.0

  117.     CSeq: 5

  118.     Session: 12340005

  119.     User-Agent: (v2008.07.24)

  120.     [0x98e3050] qt4 interface debug: Updating the geometry
  121.     [0x98e3050] qt4 interface debug: Updating the geometry
  122.     Received TEARDOWN response: RTSP/1.0 200 OK

  123.     Server: DSS/5.0.3.2 (Build/452.22.3; Platform/Linux; Release/Panther; Update/3GPP; )

  124.     CSeq: 5

  125.     Session: 12340005

  126.     Date: Tue,8 Jun 2010 09:46:04 GMT

  127.     Connection: Close
复制代码
整个过程用Wireshark抓包,在RTSP PLAY后,显示有IP数据流过来,10秒后又被cut掉,然后又用rtsp over tcp的方式又交互了一次,最后失败,VLC无法完成播放。

请高人指点指点,谢谢!

最佳答案

查看完整内容

这个提示应该是 udp 协议栈自己的信息,当它发现没有程序 listen 这个请求的 port 的时候便返回这种 icmp 信息了

论坛徽章:
0
2 [报告]
发表于 2010-06-12 12:12 |只看该作者
这个不知道,至少正确的交互是不会出现这个error的, 。
djstava 发表于 2010-06-19 11:20



    这个提示应该是 udp 协议栈自己的信息,当它发现没有程序 listen 这个请求的 port 的时候便返回这种 icmp 信息了

论坛徽章:
0
3 [报告]
发表于 2010-06-17 16:48 |只看该作者
本帖最后由 djstava 于 2010-06-17 17:12 编辑

用live555自带的openRTSP测试了下,用wireshark抓包,服务端每次发1480bytes的数据过来,都是通过video的RTP端口接收,开始阶段一切正常,过了一段时间发现由本地向服务端发送了一个udp包,是实现客户端RTCP的(从端口看出),由于服务端没有实现RTCP,可能会忽视client发过来的包,出现一条error:ICMP Destination unreachable (Port unreachable),server继续发包,上述情况持续了大概10分钟,最后client发RTCP包和server回ICMP错误连续出现,停止发包。再看本地生成的audio-MPEG4-GENERIC-1和video-MP4V-ES-2文件,大小都是0。

论坛徽章:
0
4 [报告]
发表于 2010-06-18 11:36 |只看该作者
如果 server 不返回 ICMP Destination unreachable (Port unreachable),结果会不会正常呢?

论坛徽章:
0
5 [报告]
发表于 2010-06-19 11:20 |只看该作者
如果 server 不返回 ICMP Destination unreachable (Port unreachable),结果会不会正常呢?
platinum 发表于 2010-06-18 11:36


这个不知道,至少正确的交互是不会出现这个error的,
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP