我要播放一个点播的rtsp流,用vlc命令方式,如下:
vlc -vv --extraintf=logger "rtsp://58.223.255.198:554/vod/00000000020000338025.mpg?userid=softtysz0000001&stbip=61.155.39.215&clienttype=1&mediaid=0000000003020000401949&ifcharge=1&time=20100716084852+08&life=172800&usersessionid=3476&vcdnid=vcdn001&boid=001&srcboid=001&columnid=36050A&backupagent=58.223.255.198:554&ctype=1&playtype=0&Drm=0&EpgId=epg_nj_001&programid=00000000020000338025&contname=&fathercont=&bp=0&authid=255698593&tscnt=0&tstm=0&tsflow=0&ifpricereqsnd=1&nodelevel=3"
播放出错,vlc-log.txt记录的日志如下:
-- logger module started --
live555 warning: no data received in 10s. Switching to TCP
live555 error: SETUP of'video/MP2T' failed SETUP: cannot handle response: RTSP/1.0 461 Unsupported transport
live555 error: Nothing to play for
rtsp://58.223.255.198:554/vod/00000000020000338025.mpg?userid=softtysz0000001&stbip=61.155.39.215&clienttype=1&mediaid=0000000003020000401949&ifcharge=1&time=20100716084852+08&life=172800&usersessionid=3476&vcdnid=vcdn001&boid=001&srcboid=001&columnid=36050A&backupagent=58.223.255.198:554&ctype=1&playtype=0&Drm=0&EpgId=epg_nj_001&programid=00000000020000338025&contname=&fathercont=&bp=0&authid=255698593&tscnt=0&tstm=0&tsflow=0&ifpricereqsnd=1&nodelevel=3
live555 error: TCP rollover failed, aborting
先把错误情况描述一下,有需要的可以看下面的详细调试信息。
用上面的命令启动VLC播放器,并通过调试信息及抓包可以看到VLC完成了整个RTSP的交互过程,从OPTIONS到PLAY,但是PLAY后一会又重新请求RTSP交互了,但这次是从OPTIONS到SETUP,SETUP反馈“RTSP/1.0 461 Unsupported transport”,然后就停止了。
这里要问的是为何第一次RTSP交互完成,PLAY都通过了还会发送TEARDOWN命令来中断,然后又一次请求RTSP。在这个过程中VLC没有画面出现,从之前的调试来看,此RTSP地址的流媒体服务器是通过UDP方式传输数据的,VLC对UDP方式支持如何?以前还碰到过“live555 error: no data received in 10s, aborting”的错误。
我的联系方式是QQ:10594383,很急啊,搞了很久了,没弄出来,特借宝地来寻求帮助!
整个DEBUG调试过程如下:
[00bb3bb0] main playlist debug: rebuild done - 0 items, index -1
[02c53c40] main interface debug: looking for interface module: 1 candidate
[02c53c40] main interface debug: using interface module "globalhotkeys"
[02c53c40] main interface debug: TIMER module_need() : 3.000 ms - Total 3.000 ms
/ 1 intvls (Avg 3.000 ms)
[02c52308] main interface debug: looking for interface module: 1 candidate
[02c95378] main generic debug: looking for extension module: 1 candidate
[02c95378] lua generic debug: Opening EXPERIMENTAL Lua Extension module
[02c95378] lua generic debug: Trying Lua scripts in C:\Documents and Settings\Ad
ministrator\Application Data\vlc\lua\extensions
[02c95378] lua generic debug: Trying Lua scripts in D:\vlc\lua\extensions
[02c95378] lua generic debug: Trying Lua playlist script D:\vlc\lua\extensions\a
llocine-fr.lua
[02c95378] lua generic debug: Scanning Lua script D:\vlc\lua\extensions\allocine
-fr.lua
[02c95378] lua generic debug: Script D:\vlc\lua\extensions\allocine-fr.lua has t
he following capability flags: 0xc
[02c95378] main generic debug: using extension module "lua"
[02c95378] main generic debug: TIMER module_need() : 3.000 ms - Total 3.000 ms /
1 intvls (Avg 3.000 ms)
[02c52308] main interface debug: using interface module "qt4"
[02c52308] main interface debug: TIMER module_need() : 189.000 ms - Total 189.00
0 ms / 1 intvls (Avg 189.000 ms)
[00bb3bb0] main playlist debug: rebuilding array of current - root 播放列表
[00bb3bb0] main playlist debug: rebuild done - 1 items, index -1
[00bb3bb0] main playlist debug: processing request item null node 播放列表 skip
0
[00bb3bb0] main playlist debug: starting new item
[00bb3bb0] main playlist debug: creating new input thread
[02cd2f40] main input debug: Creating an input for 'rtsp://58.223.255.198:554/vo
d/00000000020000338025.mpg?userid=softtysz0000001&stbip=61.155.39.215&clienttype
=1&mediaid=0000000003020000401949&ifcharge=1&time=20100716084852+08&life=172800&
usersessionid=3476&vcdnid=vcdn001&boid=001&srcboid=001&columnid=36050A&backupage
nt=58.223.255.198:554&ctype=1&playtype=0&Drm=0&EpgId=epg_nj_001&programid=000000
00020000338025&contname=&fathercont=&bp=0&authid=255698593&tscnt=0&tstm=0&tsflow
=0&ifpricereqsnd=1&nodelevel=3'
[02cd2f40] main input debug: thread (input) created at priority 1 (../.././src/i
nput/input.c:214)
[02cd2f40] main input debug: thread started
[02cd2f40] main input debug: using timeshift granularity of 50 MiB
[02cd2f40] main input debug: using timeshift path 'C:\DOCUME~1\ADMINI~1\LOCALS~1
\Temp'
[02cd2f40] main input debug: `
rtsp://58.223.255.198:554/vod/00000000020000338025
.mpg?userid=softtysz0000001&stbip=61.155.39.215&clienttype=1&mediaid=00000000030
20000401949&ifcharge=1&time=20100716084852+08&life=172800&usersessionid=3476&vcd
nid=vcdn001&boid=001&srcboid=001&columnid=36050A&backupagent=58.223.255.198:554&
ctype=1&playtype=0&Drm=0&EpgId=epg_nj_001&programid=00000000020000338025&contnam
e=&fathercont=&bp=0&authid=255698593&tscnt=0&tstm=0&tsflow=0&ifpricereqsnd=1&nod
elevel=3' gives access `rtsp' demux `' path `58.223.255.198:554/vod/000000000200
00338025.mpg?userid=softtysz0000001&stbip=61.155.39.215&clienttype=1&mediaid=000
0000003020000401949&ifcharge=1&time=20100716084852+08&life=172800&usersessionid=
3476&vcdnid=vcdn001&boid=001&srcboid=001&columnid=36050A&backupagent=58.223.255.
198:554&ctype=1&playtype=0&Drm=0&EpgId=epg_nj_001&programid=00000000020000338025
&contname=&fathercont=&bp=0&authid=255698593&tscnt=0&tstm=0&tsflow=0&ifpricereqs
nd=1&nodelevel=3'
[02cd2f40] main input debug: creating demux: access='rtsp' demux='' path='58.223
.255.198:554/vod/00000000020000338025.mpg?userid=softtysz0000001&stbip=61.155.39
.215&clienttype=1&mediaid=0000000003020000401949&ifcharge=1&time=20100716084852+
08&life=172800&usersessionid=3476&vcdnid=vcdn001&boid=001&srcboid=001&columnid=3
6050A&backupagent=58.223.255.198:554&ctype=1&playtype=0&Drm=0&EpgId=epg_nj_001&p
rogramid=00000000020000338025&contname=&fathercont=&bp=0&authid=255698593&tscnt=
0&tstm=0&tsflow=0&ifpricereqsnd=1&nodelevel=3'
[02cd9cf8] main demux debug: looking for access_demux module: 1 candidate
[02c52308] qt4 interface debug: IM: Setting an input
Sending request: OPTIONS
rtsp://58.223.255.198:554/vod/00000000020000338025.mpg?
userid=softtysz0000001&stbip=61.155.39.215&clienttype=1&mediaid=0000000003020000
401949&ifcharge=1&time=20100716084852+08&life=172800&usersessionid=3476&vcdnid=v
cdn001&boid=001&srcboid=001&columnid=36050A&backupagent=58.223.255.198:554&ctype
=1&playtype=0&Drm=0&EpgId=epg_nj_001&programid=00000000020000338025&contname=&fa
thercont=&bp=0&authid=255698593&tscnt=0&tstm=0&tsflow=0&ifpricereqsnd=1&nodeleve
l=3 RTSP/1.0
CSeq: 1
User-Agent: LibVLC/1.1.2 (LIVE555 Streaming Media v2010.03.16)
Received OPTIONS response: RTSP/1.0 403 Forbidden
Server: ZXUSS100 1.0
CSeq: 1
Sending request: DESCRIBE
rtsp://58.223.255.198:554/vod/00000000020000338025.mpg
?userid=softtysz0000001&stbip=61.155.39.215&clienttype=1&mediaid=000000000302000
0401949&ifcharge=1&time=20100716084852+08&life=172800&usersessionid=3476&vcdnid=
vcdn001&boid=001&srcboid=001&columnid=36050A&backupagent=58.223.255.198:554&ctyp
e=1&playtype=0&Drm=0&EpgId=epg_nj_001&programid=00000000020000338025&contname=&f
athercont=&bp=0&authid=255698593&tscnt=0&tstm=0&tsflow=0&ifpricereqsnd=1&nodelev
el=3 RTSP/1.0
CSeq: 2
Accept: application/sdp
User-Agent: LibVLC/1.1.2 (LIVE555 Streaming Media v2010.03.16)
Received DESCRIBE response: RTSP/1.0 200 OK
Server: ZXUSS100 1.0
Cache-Control: must-revalidate
Content-Base:
rtsp://58.223.255.198:554/vod/00000000020000338025.mpg/
Content-Length: 235
Content-Type: application/sdp
CSeq: 2
Date: Tue, 10 Aug 2010 08:12:18 GMT
Expires: Tue, 10 Aug 2010 08:12:18 GMT
Need to read 235 extra bytes
Read 235 extra bytes: v=0
o=- 387657244 0 IN IP4 0.0.0.0
s=ZMSS RTSP Server
c=IN IP4 0.0.0.0
b=AS:1600
t=0 0
a=control:*
a=range:npt=0.00000-5212.84277
m=video 0 RTP/AVP 33
a=control:trackID=1
a=rtpmap:33 MP2T/90000
a=3GPP-Adaptation-Support:5
[02cd9cf8] live555 demux debug: RTP subsession 'video/MP2T'
Sending request: SETUP
rtsp://58.223.255.198:554/vod/00000000020000338025.mpg/tr
ackID=1 RTSP/1.0
CSeq: 3
Transport: RTP/AVP;unicast;client_port=3646-3647
User-Agent: LibVLC/1.1.2 (LIVE555 Streaming Media v2010.03.16)
Received SETUP response: RTSP/1.0 200 OK
Server: ZXUSS100 1.0
CSeq: 3
Date: Tue, 10 Aug 2010 08:12:18 GMT
Expires: Tue, 10 Aug 2010 08:12:18 GMT
Session: 131087272
Transport: RTP/AVP;unicast;destination=61.155.39.215;client_port=3646-3647;serve
r_port=10180-10181;source=58.223.255.153
[02c9b698] main stream debug: thread started
[02c9b698] main stream debug: thread (stream out) created at priority 1 (../../.
/src/input/stream_demux.c:100)
[02c9b698] main stream debug: creating demux: access='' demux='ts' path=''
[02cd9cf8] live555 demux debug: setup start: 0.000000 stop:5212.842770
Sending request: PLAY
rtsp://58.223.255.198:554/vod/00000000020000338025.mpg/ RT
SP/1.0
CSeq: 4
Session: 131087272
Range: npt=0.000-
User-Agent: LibVLC/1.1.2 (LIVE555 Streaming Media v2010.03.16)
Received PLAY response: RTSP/1.0 200 OK
Server: ZXUSS100 1.0
CSeq: 4
Range: npt=0.00000-
Scale: 1.0
Session: 131087272
RTP-Info: url=rtsp://58.223.255.153:10180/vod/00000000020000338025.mpg/trackID=1
;seq=3;rtptime=0