onvif bidirectional intercom (RTSP protocol)

Source: Internet
Author: User
Tags error code require rfc

The ONVIF2.0 agreement is as follows:





Principle Description:

1.

Establish a two-way connection between the client and the server. The reverse channel connection is processed using the RTSP protocol [RFC 2326]. Here there will be a mechanism to indicate that the client wants to establish a back-channel connection. RTSP provides a feature tag to handle such additional functions.

Devices that support two-way connections, such as audio or metadata connections, should support the RTSP extensions that have been introduced. 2.

The RTSP standard for [RFC 2326], which can be extended with additional object headers. For this purpose, a request label will be introduced to handle specialized additional functions (see RFC2326], 1.5 expansion of RTSP and 12.32 requirements)

The request tag is used to determine whether this feature is supported. This header should contain any requests and require the server to understand these features and be able to respond correctly to these requests.

A device that supports a reverse channel, which should understand the label of the reverse channel:

Www.onvif.org/ver20/backchannel

Customers wishing to establish an RTSP connection with a data reverse channel should include the requested require header 3 in the request information,

The client should include the attribute tag in its description request to indicate that a two-way data connection should be established.

The server that understands this requirement label should include an additional streaming medium in the SDP protocol, as configured in the media category.

Depending on the RTSP standard, a non-understandable feature label for the reverse channel or the RTSP server that does not support bidirectional data connection will respond to error code 551 Option not supported. The client can then attempt to establish an RTSP connection without a reverse channel.

An SDP file is used to describe the session. The server should include a a= sendonly or b= recvonly attribute in each media option to indicate the direction in which the data will be sent.

The server should enumerate all the supported decoding rules as its own media option and which one the customer should choose.


my RTSP signaling is as follows:

time:1495797881.558125; Send Request [OPTIONS RTSP://192.168.8.9:8554/1 rtsp/1.0
Cseq:1
user-agent:lavf57.56.100

]
Time:1495797881.558452;set Prequestmst Finish
Time:1495797881.570014;onoptionsresponse 1
Time:1495797881.570432;send Buff len = 153,buf = [[0rtsp/1.0] OK
Cseq:1
Date:fri, May 11:24:40 GMT
Public:options, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, Get_parameter, Set_parameter

]]

time:1495797881.576634; Send Request [DESCRIBE RTSP://192.168.8.9:8554/1 rtsp/1.0
Accept:application/sdp
Cseq:2
user-agent:lavf57.56.100
Require:www.onvif.org/ver20/backchannel

] time:1495797884.851540;send Buff len = 978,buf = [[0rtsp/1.0] OK
Cseq:2
Date:fri, May 11:24:44 GMT
content-base:rtsp://127.0.0.1:50164/camera/0/01020304050607080900
Content-type:application/sdp
content-length:792

V=0
o=-1495797858134194 1 in IP4 192.168.8.9
S=session streamed by "Rtspserver"
I=1
T=0 0
a=tool:live555 Streaming Media v2014.07.18
A=type:broadcast
A=control:rtsp://192.168.8.9:8554/1
a=range:npt=0-
A=x-qt-text-nam:session streamed by "Rtspserver"
A=x-qt-text-inf:1
M=video 0 RTP/AVP 96
C=in IP4 0.0.0.0
b=as:500
a=rtpmap:96 h264/90000
A=fmtp:96 Packetization-mode=1;profile-level-id=42c01f;sprop-parameter-sets=z0lah7kqcgc3qgaaawacaaadafeemgva, am48ga==
A=recvonly;
A=control:rtsp://192.168.8.9:8554/1/trackid=1
M=audio 0 RTP/AVP 8
C=in IP4 0.0.0.0
b=as:96
A=rtpmap:8 pcma/8000
A=recvonly;
a=control:rtsp://192.168.8.9:8554/1/trackid=2
M=audio 0 RTP/AVP 8
C=in IP4 0.0.0.0
B=as:8
A=rtpmap:8 pcma/8000
A=sendonly;
A=control:rtsp://192.168.8.9:8554/1/trackid=3
]]

time:1495797884.879539; Send Request [SETUP rtsp://192.168.8.9:8554/1/trackid=1 rtsp/1.0
transport:rtp/avp/udp;unicast;client_port=15550-15551
Cseq:3
user-agent:lavf57.56.100

]

Time:1495797884.921316;send Buff len = 207,buf = [[0rtsp/1.0] OK
Cseq:3
Date:fri, May 11:24:44 GMT
Transport:rtp/avp;unicast;destination=192.168.8.1;source=192.168.8.9;client_port=20006-20007;server_port=0-1
Session:1ac69105;timeout=65

]]
time:1495797884.921602; Sendresponse OK

time:1495797884.961160; Send Request [SETUP rtsp://192.168.8.9:8554/1/trackid=2 rtsp/1.0
transport:rtp/avp/udp;unicast;client_port=15550-15551
Cseq:4
user-agent:lavf57.56.100
session:1ac69105

]time:1495797884.971279;send Buff len = 196,buf = [[0rtsp/1.0] OK
Cseq:4
Date:fri, May 11:24:44 GMT
Transport:rtp/avp;unicast;destination=192.168.8.1;source=192.168.8.9;client_port=20008-20009;server_port=0-1
session:1ac69105

]]
time:1495797884.993622; Send Request [SETUP rtsp://192.168.8.9:8554/1/trackid=3 rtsp/1.0
transport:rtp/avp/udp;unicast;client_port=15554-15555
Cseq:4
user-agent:lavf57.56.100
session:1ac69105
Require:www.onvif.org/ver20/backchannel

]
Time:1495797885.6728;onsetupresponse 4
Time:1495797885.6856;strtransport rtp/avp;unicast;destination=192.168.8.1;source=192.168.8.9;client_port= 15554-15555;server_port=6974-6975
Time:1495797885.6925;receive Backchannel, transport = rtp/avp;unicast;destination=192.168.8.1;source=192.168.8.9; client_port=15554-15555;server_port=6974-6975
Time:1495797885.7004;m_ibackchannelserverport: = 6974,6975
Time:1495797885.7075;delete Pmsglst Finish
Time:1495797885.197751;receive Play 11
Time:1495797885.197859;send Request Info
Time:1495797885.197917;onplayrequest 5
Time:1495797885.197968;m_cseqno = 3
Time:1495797885.198013;m_bhasreceivebackchannelinfo = 1
Time:1495797885.198059;send Play MSG
Time:1495797885.198129;sendrequest 5
time:1495797885.198354; Send Request [PLAY RTSP://192.168.8.9:8554/1 rtsp/1.0
range:npt=0.000-
Cseq:5
user-agent:lavf57.56.100
session:1ac69105
Require:www.onvif.org/ver20/backchannel

]
Time:1495797885.198474;set Prequestmst Finish
Time:1495797885.212947;onplayresponse 5
TIME:1495797885.213324;STRRTP url=rtsp://192.168.8.9:8554/1/trackid=1;seq=50197;rtptime=675344710,url=rtsp:// 192.168.8.9:8554/1/trackid=2;seq=27630;rtptime=2250740295,url=rtsp://192.168.8.9:8554/1/trackid=3;seq=0; Rtptime=0
Time:1495797885.213823;send Buff len = 352,buf = [[0rtsp/1.0] OK
Cseq:5
Date:fri, May 11:24:44 GMT
range:npt=0.000-
session:1ac69105
Rtp-info:url=rtsp://127.0.0.1:50164/camera/0/0102030405060708090092.168.8.9:8554/1/trackid=1;seq=50197;rtptime =675344710,url=rtsp://192.168.8.9:8554/1/trackid=2;seq=27630;rtptime=2250740295,url=rtsp://192.168.8.9:8554/1/ trackid=3;seq=23230;rtptime=2153740195

]]

Download: http://download.csdn.net/detail/yuanchunsi/9862503

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.