smotbd
asked on
500: RTSP realplayer implementation
Not sure if this is the most applicable topic area….please advise if you think differently…..
I have tried to implement a very basic rtsp server that negotiates with the client realplayer ™ Win32 version 10.5. However, the video is not playing on the client side and I get the error message – “A general error has occurred”. I cannot figure out why this is. I have tried to stream different files (.mpg and .wmv). I know that the video file is sent across the network because the ethereal trace proves it (as seen below) but the client only has a black screen coming up but nothing is played. Any clues on why this maybe? I want to get it working on both UDP and TCP but I started on TCP first because the negotiations are simpler. I have used TCP socket to listen on a particular port. When I compare both the ethereal trace of a successful RTSP streaming session with one of my failed ones then I do notice that all my packets are TCP only and not RTSP(as it should be) even though exactly the same bytes are sent, is this causing the problem. If so then how can implement and interpret data in to RTSP packets???? I am using PHP and only TCP and UDP sockets are available i.e. they don’t understand the rtsp//: protocol.
Any inputs will be much appreciated.........
The trace is found below:
OPTIONS rtsp://193.63.131.67:3001 RTSP/1.0 CSeq: 1 User-Agent: RealMedia Player (HelixDNAClient)/10.0.0.0 (win32) ClientChallenge: 0e6da7b9cb35056dc37265072a eaca55 ClientID: WinNT_5.1_6.0.12.1698_Real Player_RN3 0DL_en-us_ UNK CompanyID: wymfa1UFf8sOX4/UuC15HA== GUID: 00000000-0000-0000-0000-00 0000000000 PlayerStarttime: [10/11/2006:18:09:59 00:00] Pragma: initiate-session RegionData: CF37 1RN
RTSP/1.0 200 OK
CSeq: 1
Date: Fri, 10 Nov 2006 18:09:55 +0000
Session: 1720561872-1
Server: Helix Server Version 9.0.6.1262 (linux-2.2-libc6-i586-serv er) (RealServer compatible)
Public: OPTIONS, DESCRIBE, ANNOUNCE, PLAY, SETUP, GET_PARAMETER, SET_PARAMETER, TEARDOWN
RealChallenge1: 6444b84fde531ae38a23136b33 29d110 StatsMask: 3
DESCRIBE rtsp://193.63.131.67:3001/ Blazer.mpe g RTSP/1.0
CSeq: 2
User-Agent: RealMedia Player (HelixDNAClient)/10.0.0.0 (win32)
Accept: application/sdp
Session: 1720561872-1
Bandwidth: 10485800
ClientID: WinNT_5.1_6.0.12.1698_Real Player_RN3 0DL_en-us_ UNK
GUID: 00000000-0000-0000-0000-00 0000000000
Language: en-us
RegionData: CF37 1RN
Require: com.real.retain-entity-for -setup
SupportsMaximumASMBandwidt h: 1
RTSP/1.0 200 OK
CSeq: 2
Date: Fri, 10 Nov 2006 18:09:55 +0000
Content-base: rtsp://193.63.131.67:3001/ Blazer.mpe g/
ETag: 1720561872-1
Session: 1720561872-1
Content-type: application/sdp Content-length: 1504
v=0
o=- 1022199156 1022199156 IN IP4 193.63.131.67
s=Blazer.mpeg
i=<No author> <No copyright>
t=0 0
a=SdpplinVersion:161064149 2
a=DefaultLicenseValue:inte ger;1
a=StreamCount:integer;2
a=Title:buffer;"bXBnMXZpZG VvLm1wZwA= "
a=FileType:string;"MPEG1"
a=LicenseKey:string;"licen se.Summary .Datatypes .RealMPEG1 .Enabled"
a=range:npt=0-7.845000
m=video 0 RTP/AVP 32
b=AS:1116
a=control:streamid=0
a=range:npt=0-7.845000
a=length:npt=7.845000
a=mimetype:string;"video/M PV"
a=Width:integer;320
a=StartTime:integer;0
a=AvgBitRate:integer;11160 00
a=RMATimestampConversionFa ctor:integ er;1
a=AvgPacketSize:integer;10 24
a=RTPTimestampConversionFa ctor:integ er;90
a=Height:integer;240
a=Preroll:integer;1500
a=HasOutOfOrderTs:integer; 1
a=MaxPacketSize:integer;15 00
a=MaxBitRate:integer;16740 00
a=ASMRuleBook:string;"mark er=0, Priority=9, timestampdelivery=true; marker=1, Priority=9, timestampdelivery=true;"
m=audio 0 RTP/AVP 14
b=AS:112
a=control:streamid=1
a=range:npt=0-7.845000
a=length:npt=7.845000
a=mimetype:string;"audio/M PA"
a=StartTime:integer;0
a=AvgBitRate:integer;11200 0
a=RMATimestampConversionFa ctor:integ er;1
a=SampleRate:integer;44100
a=AvgPacketSize:integer;10 24
a=RTPTimestampConversionFa ctor:integ er;90
a=Preroll:integer;1500
a=NumChannels:integer;2
a=HasOutOfOrderTs:integer; 1
a=MaxPacketSize:integer;15 00
a=MaxBitRate:integer;16800 0
a=ASMRuleBook:string;"mark er=0, Priority=9, timestampdelivery=true; marker=1, Priority=9, timestampdelivery=true;"
SETUP rtsp://193.63.131.67:3001/ Blazer.mpe g/streamid =0 RTSP/1.0
CSeq: 3
RealChallenge2: db0062d0568e5e775e765f716c 9b8d2901d0 a8e3, sd=d6555568
RDTFeatureLevel: 2
Transport: x-pn-tng/tcp;mode=play,x-r eal-rdt/tc p;mode=pla y,RTP/AVP/ TCP;unicas t;mode=pla y
User-Agent: RealMedia Player (HelixDNAClient)/10.0.0.0 (win32)
If-Match: 1720561872-1
RTSP/1.0 200 OK
CSeq: 3
Date: Fri, 10 Nov 2006 18:09:55 +0000
Session: 1720561872-1
Reconnect: true
RealChallenge3: 2fe4384a4893ef35ce89ced60a 2ba5864f21 3d09,sdr=2 34ecc0a
RDTFeatureLevel: 2
Transport: x-pn-tng/tcp;interleaved=0
SETUP rtsp://193.63.131.67:3001/ Blazer.mpe g/streamid =1 RTSP/1.0
CSeq: 4
RDTFeatureLevel: 2
Transport: x-pn-tng/tcp;mode=play
User-Agent: RealMedia Player (HelixDNAClient)/10.0.0.0 (win32)
Session: 1720561872-1
RTSP/1.0 200 OK
CSeq: 4
Date: Fri, 10 Nov 2006 18:09:55 +0000
Session: 1720561872-1
RDTFeatureLevel: 2
Transport: x-pn-tng/tcp;interleaved=0
SET_PARAMETER rtsp://193.63.131.67:3001/ Blazer.mpe g RTSP/1.0
CSeq: 5
Subscribe: stream=0;rule=0,stream=0;r ule=1,stre am=1;rule= 0,stream=1 ;rule=1
Session: 1720561872-1
PLAY rtsp://193.63.131.67:3001/ Blazer.mpe g RTSP/1.0
CSeq: 6
User-Agent: RealMedia Player (HelixDNAClient)/10.0.0.0 (win32)
Session: 1720561872-1 Range: npt=0-7.844000
RTSP/1.0 200 OK
CSeq: 5 Date: Fri, 10 Nov 2006 18:09:55 +0000 Session: 1720561872-1
RTSP/1.0 200 OK CSeq: 6 Date: Fri, 10 Nov 2006 18:09:55 +0000 RTP-Info: url=rtsp://193.63.131.67:3 001/Blazer .mpeg/stre amid=0;seq =0;rtptime =0
......`..W......Encoded by North Valley Research, Beaverton, OR
128x96, 30.00fps, I:P:B of 1:3:2
Logrithmic. mot. est., radius 16
fixed rate 140000 b/s
.
........@............b..LC .az....T.. s.. ...........M..).^.w......[ |..x.).... z.`U...... ...K...ga. x.....fP.. ...w]kqx.^ .........S ..Q.^Y]..w .........C ..N.*..0.^ .._..,...I ......g.pn ..;.Ti..E. ....'.5..e Xa1%.!.... 0{....K..1 .....S./2R ..u;f}.... ...4!..k.C .......... .....3.#.. Vmy....... .QN..|...| ....P.j... ...P.p.... ....J.+.44 .3.@c.X..u k..JF,4..3 '......J.. .....#2.?. ..f.U.p[.. g.g.;..... ....(....O ..@.....P. .BK/.B..?. ..O;`...M& .4.Y7...^I D..L!..... ..,[.....o ...M.....P .U.~YN..=G a?.Nz.^... K.[:...w.n .%n.~.-Mh. %.>F.A...Y |...=.;..7 :...s.r... ?....}..+. ......c3u+ ...o>..VQ' -*...s.... ..s..|.N.. ._.AiG.... >.}b...?.. RQ.H.....G n.s.s^{..} t...D...:. :N<.8 ..)....@.w._D.j....5..bK.. ..=H._...\ .!....|.O. .H.RF..... ...)fa.v.l [..6.M.... ..{..U.... .78X._...
|.Q......Om.........2....t ..g{..r... .s..... o../.....WS.n.AIJ.gg....n. ~4...
G.....71Ds=....._..%...... ..4BK.BKX. .Nf.....1. M....II+.w .w.D..._/. ..u..cOq.. Y5 0F.+b_f..#...r~.+.q}-.:..V .q.^8u.... .....}.J.5 _.e ..
.
...r.......0.e....7I.b.1
q]+O..k^..O..k.....o.>.... +..TS./U.. .A....i.q. ..+.:vA/.. .....>.B,. :v.%.....' ....NF^.|. +..!...... Z~!'~.1.5% .....s.0.. 4.....t... .N......0q ....^..~v. ;a?...(... ..~.....[. ....=yB... {.......(b :.._<R...D ...<..N.F. ......F..& .~'......( .BBHo..... ..E..).q.b ....<'...B .'....V@.K q...a.k:.Q \pHN...~ .V...9...._...6(hJ..+....| ..}......" ...S..i[.. -U.u...g.. ..*.Y..cm. w.}Q..)%.. ...m...(.. ......!X=? ....n..-.. .8V...:..4 ....4..... .4........ /...0...a, G....
....RR.-#7.l...;fkw...t.T. ........eU <..RS.>... ...b...d.. ...^.!4... .....wF... m..HA_..% .b...{..Q././.....-....v.. ..u.i1..#. .oW{..D... ....@|...v .U.t....(. 3>.N...... e......... @|...3.._- o.....q ...............}..Wu....y. ..-.j..... ..fcO.....
.....f..` f.VR.......nwJ..f..m..?..m xjqe...;o. .......0.A [...s..w.. ..C..O2... ]..e..k^m. UVd....CD. ..yow#.j.. .:..`B.&.H .H.x..;.Pb h$...P.+.. ...q...... ..x.A.... i I.`C.PRh$..."Z...Fq..-...W ....U..... i V.....AI........P?...;..k! .g.e..P... .A..0...., .....l.c.< :.$0..`... .._Y.z.... S...._.... !,..7s...] ...$..?.O. ......l.W. &%......dv a.).N;.... .tC.. .........."...H.H.9].#a... '....>..=. .:.....A$ $.......(h$...d.J.h...8.}] ...L.A..4. @.@....`C. &.H.H..... ./Hg...... .......... R#`xXPt... ...G.8.... 4Xv.:.p..% P.<w^.}.y. .;/.>..... .=.._f.=.. .....U..yF 8.&..o.z#f G|......#. .......... ..>.....\( X.....
...D|x.k......k.8......f.o .6.....c.8 g..|..)... .$}......
R..........3i..#.;.....+.. .V'[.n..t" ..s.V5.s.. .......... .......... ... ` @.....>`x.." .pP..qq.a.....?...'......
...&..!<.....Y....p.,|X.O. a.C.P..5.. .x...0Xq.[ ....5...E/ .....~W... ...P.F.T.. .u3.;..NQ. q.2... ....0....Lf.>.+..[>.n.wn.n ...%....$. ..v3..z$8w .on....... .+:Go.{.F. ..0..~.... .8...>.>.B .:.@.. ....#..9...1j.<{...k.p.... .G>..7.K.. .,..O`.e.. .)......6d G...&.[... .|."(-...` p)l.._'..< ..<.....p. .Dw=dW#.&. .;...9.... '....o.U.. d.<.$....^ Z.....q... .9......R. ..rO..%(.. +3.d...... ......s... Y...Q.=..? .......a.q .ti..v.... wi...q...e ....8q.... D..Y.>9|.. K
.q}X......p..|...../...."P .......{.. .......%X! .~ x.............8....m...... ...A?..... ..J@...... 3....p.... .....~...v ?.{....... .>
.O.%G..........~..%:Y.A.?. .v-.7f}... .gB.o..G.[ .~n...p>.] .......g_9 .....6.... .._f@....~ ...E-....O .q...#.).. ;.s~.6|... ...0..[... .'...F.... .vV..7K'.. 8<Wf.;..5. }!dj%..... I.R.OabH.. .......[.. .-.N.. l......#=.8.=.C..a..C..... ...
.T....._.......b$t..;a .@..#(~_S....D..TU..x.=..I .....GQ... ....d...@. ;...0..#.. ...A.9.... ......4..~ s......8.. ..$..~..9. .....8...a .[.....TS. ......G.X. .......Q'z ".......)| A..J
...Q../.|H..(.~..X+Bn..K.i ....(..... .y.O.~.5.. 3:.......S (>.....X.. ....{.?2#. .8..I....p .1...2.... h.^p..4.?.G<...O0......... .......... ....w..!.3 ....../n.[ .+.o.EX.@. .......wg. E=.....G.. .|..89d... l.m.<..../ g......_.. .W.......| Z... .
.
.
.Rest of file transfer….
.
.
.
.
I have tried to implement a very basic rtsp server that negotiates with the client realplayer ™ Win32 version 10.5. However, the video is not playing on the client side and I get the error message – “A general error has occurred”. I cannot figure out why this is. I have tried to stream different files (.mpg and .wmv). I know that the video file is sent across the network because the ethereal trace proves it (as seen below) but the client only has a black screen coming up but nothing is played. Any clues on why this maybe? I want to get it working on both UDP and TCP but I started on TCP first because the negotiations are simpler. I have used TCP socket to listen on a particular port. When I compare both the ethereal trace of a successful RTSP streaming session with one of my failed ones then I do notice that all my packets are TCP only and not RTSP(as it should be) even though exactly the same bytes are sent, is this causing the problem. If so then how can implement and interpret data in to RTSP packets???? I am using PHP and only TCP and UDP sockets are available i.e. they don’t understand the rtsp//: protocol.
Any inputs will be much appreciated.........
The trace is found below:
OPTIONS rtsp://193.63.131.67:3001 RTSP/1.0 CSeq: 1 User-Agent: RealMedia Player (HelixDNAClient)/10.0.0.0 (win32) ClientChallenge: 0e6da7b9cb35056dc37265072a
RTSP/1.0 200 OK
CSeq: 1
Date: Fri, 10 Nov 2006 18:09:55 +0000
Session: 1720561872-1
Server: Helix Server Version 9.0.6.1262 (linux-2.2-libc6-i586-serv
Public: OPTIONS, DESCRIBE, ANNOUNCE, PLAY, SETUP, GET_PARAMETER, SET_PARAMETER, TEARDOWN
RealChallenge1: 6444b84fde531ae38a23136b33
DESCRIBE rtsp://193.63.131.67:3001/
CSeq: 2
User-Agent: RealMedia Player (HelixDNAClient)/10.0.0.0 (win32)
Accept: application/sdp
Session: 1720561872-1
Bandwidth: 10485800
ClientID: WinNT_5.1_6.0.12.1698_Real
GUID: 00000000-0000-0000-0000-00
Language: en-us
RegionData: CF37 1RN
Require: com.real.retain-entity-for
SupportsMaximumASMBandwidt
RTSP/1.0 200 OK
CSeq: 2
Date: Fri, 10 Nov 2006 18:09:55 +0000
Content-base: rtsp://193.63.131.67:3001/
ETag: 1720561872-1
Session: 1720561872-1
Content-type: application/sdp Content-length: 1504
v=0
o=- 1022199156 1022199156 IN IP4 193.63.131.67
s=Blazer.mpeg
i=<No author> <No copyright>
t=0 0
a=SdpplinVersion:161064149
a=DefaultLicenseValue:inte
a=StreamCount:integer;2
a=Title:buffer;"bXBnMXZpZG
a=FileType:string;"MPEG1"
a=LicenseKey:string;"licen
a=range:npt=0-7.845000
m=video 0 RTP/AVP 32
b=AS:1116
a=control:streamid=0
a=range:npt=0-7.845000
a=length:npt=7.845000
a=mimetype:string;"video/M
a=Width:integer;320
a=StartTime:integer;0
a=AvgBitRate:integer;11160
a=RMATimestampConversionFa
a=AvgPacketSize:integer;10
a=RTPTimestampConversionFa
a=Height:integer;240
a=Preroll:integer;1500
a=HasOutOfOrderTs:integer;
a=MaxPacketSize:integer;15
a=MaxBitRate:integer;16740
a=ASMRuleBook:string;"mark
m=audio 0 RTP/AVP 14
b=AS:112
a=control:streamid=1
a=range:npt=0-7.845000
a=length:npt=7.845000
a=mimetype:string;"audio/M
a=StartTime:integer;0
a=AvgBitRate:integer;11200
a=RMATimestampConversionFa
a=SampleRate:integer;44100
a=AvgPacketSize:integer;10
a=RTPTimestampConversionFa
a=Preroll:integer;1500
a=NumChannels:integer;2
a=HasOutOfOrderTs:integer;
a=MaxPacketSize:integer;15
a=MaxBitRate:integer;16800
a=ASMRuleBook:string;"mark
SETUP rtsp://193.63.131.67:3001/
CSeq: 3
RealChallenge2: db0062d0568e5e775e765f716c
RDTFeatureLevel: 2
Transport: x-pn-tng/tcp;mode=play,x-r
User-Agent: RealMedia Player (HelixDNAClient)/10.0.0.0 (win32)
If-Match: 1720561872-1
RTSP/1.0 200 OK
CSeq: 3
Date: Fri, 10 Nov 2006 18:09:55 +0000
Session: 1720561872-1
Reconnect: true
RealChallenge3: 2fe4384a4893ef35ce89ced60a
RDTFeatureLevel: 2
Transport: x-pn-tng/tcp;interleaved=0
SETUP rtsp://193.63.131.67:3001/
CSeq: 4
RDTFeatureLevel: 2
Transport: x-pn-tng/tcp;mode=play
User-Agent: RealMedia Player (HelixDNAClient)/10.0.0.0 (win32)
Session: 1720561872-1
RTSP/1.0 200 OK
CSeq: 4
Date: Fri, 10 Nov 2006 18:09:55 +0000
Session: 1720561872-1
RDTFeatureLevel: 2
Transport: x-pn-tng/tcp;interleaved=0
SET_PARAMETER rtsp://193.63.131.67:3001/
CSeq: 5
Subscribe: stream=0;rule=0,stream=0;r
Session: 1720561872-1
PLAY rtsp://193.63.131.67:3001/
CSeq: 6
User-Agent: RealMedia Player (HelixDNAClient)/10.0.0.0 (win32)
Session: 1720561872-1 Range: npt=0-7.844000
RTSP/1.0 200 OK
CSeq: 5 Date: Fri, 10 Nov 2006 18:09:55 +0000 Session: 1720561872-1
RTSP/1.0 200 OK CSeq: 6 Date: Fri, 10 Nov 2006 18:09:55 +0000 RTP-Info: url=rtsp://193.63.131.67:3
......`..W......Encoded by North Valley Research, Beaverton, OR
128x96, 30.00fps, I:P:B of 1:3:2
Logrithmic. mot. est., radius 16
fixed rate 140000 b/s
.
........@............b..LC
|.Q......Om.........2....t
G.....71Ds=....._..%......
.
...r.......0.e....7I.b.1
q]+O..k^..O..k.....o.>....
....RR.-#7.l...;fkw...t.T.
.....f..` f.VR.......nwJ..f..m..?..m
...D|x.k......k.8......f.o
R..........3i..#.;.....+..
...&..!<.....Y....p.,|X.O.
.q}X......p..|...../...."P
.O.%G..........~..%:Y.A.?.
.T....._.......b$t..;a .@..#(~_S....D..TU..x.=..I
...Q../.|H..(.~..X+Bn..K.i
.
.
.Rest of file transfer….
.
.
.
.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.