SlideShare una empresa de Scribd logo
1 de 13
Descargar para leer sin conexión
RTSP Protocol
Explanation to develop API of RTSP Protocol
1. RTSP protocol explanation
(1)URL address format: rtsp://<ipaddress>/<videotype>/ch<number>/<streamtype>
/av_stream. Of these, ipaddress is the IP address of device, videotype is mpeg4 or h.264,
number is numeric, streamtype is main or sub stream. It is not sensitive to the capital letter
or lowercase letter.
For example: rtsp://192.0.1.100/mpeg4/ch1/main/av_stream /*the video type is
MPEG4 and it comes from main stream of device’s channel 1 which IP address is
192.0.1.100*/
(2)the explanation of authentication
Support URL carry with user name and password.
Support authentication in Describe step.
(3)Grammar
Request grammar:
COMMAND URI RTSP/1.0<CRLF>
Headerfield1: val1<CRLF>
Headerfield2: val2<CRLF>
...
<CRLF>
Feedback grammar:
RTSP/1.0 ResultCode ResultString<CRLF>
Headerfield3: val3<CRLF>
Headerfield4: val4<CRLF>
...
<CRLF>
(4)device support the following command formats
Support the following header-field and omit other header-field
Header-field description
Authorization the certification information come
from client terminal(only support
certification information that
dragged-in in Describe period
CSeq Request the serial NO
Session Session remark NO (return by
server in SETUP period
Content-Length Length of content
Head information generated when RTSP server feedback
Header-field description
CSeq Serial NO feedback(matching with
the request serial NO)
Session Session label symbol
(5)Take all of the RTSP commands that interacted between player and device for
example: C means rtsp client and S means rtsp server
RTSP OPTIONS,C inquire S for the method that can be used and all methods that
can be used are in S’s reply information.
C-S:OPTIONS rtsp://192.0.1.100/mpeg4/ch1/main/av_stream RTSP/1.0
CSeq:1// there is label in every message, normaly, the first packet is request
message from option
User-Agent: Hikplayer
S-C:RTSP/1.0 200 OK
CSeq: 1
Public: DESCRIBE,PLAY,SETUP,TEARDOWN
RTSP DESCRIBE, return back the described information of SDP(RFC2327)
appointed by URL. And DESCRIBEcommand accept the following header-field:
Accept The content list type supported by client software(only support
application/sdp)
DESCRIBE command generate the extra following information of header:
Content-Type Content type(application/sdp)
Content-Length The length of SDP that described
C-S : DESCRIBE rtsp://admin:12345@192.0.1.100/mpeg4/ch1/main/av_stream
RTSP/1.0
CSeq: 2
Accept: application/sdp
User-Agent: Hikplayer
S-C:RTSP/1.0 200 OK
CSeq: 2
Content-type: application/sdp
Content-length: 692
v=0//SDP version information
o=- 1109162014219182 1109162014219192 IN IP4 x.y.z.w //owner/creator and
conversation label symbol
s=Media Presentation//conversation name e=NONE//Email address
c=IN IP4 0.0.0.0// connection information
t=0 0// conversation time
a=control:*
If the codec is mpeg4
m=video 0 RTP/AVP 96//media description
a=rtpmap:96 MP4V-ES/90000
a=fmtp:96 profile-level-id=8;config=000001B0F5000001B50900000100000001200886
C400670CA0116851;//Stream configuration information described by config, config is changing
with video parameter setting.
a=range:ntp=now-
a=control:trackID=1//Video stream using track1
m=audio 0 RTP/AVP 0//media description
a=rtpmap:0 PCMU/8000
a=control:trackID=2//audio stream use track2
a=Media_header:MEDIAINFO=494D4B48010100000400010010710110401F000000FA0000000
00000000000000000000000000000;//HIK Header, 40 bytes.
a=appversion:1.0//sdp version
If the codec is H.264
m=video 0 RTP/AVP 96
a=rtpmap:96 H264/90000
a=control:trackID=1
a=fmtp:96
profile-level-id=4D0014;packetization-mode=0;sprop-parameter-sets=Z0LAH4iLUCgC3QgAAD
hAAAr8gBA=,aM44gA==
m=audio 0 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=control:trackID=2
a=Media_header:MEDIAINFO=494D4B48010100000400010010710110401F000000FA0000000
00000000000000000000000000000;
a=appversion:1.0
a=range:ntp=now-
a=mpeg4-iod:"data:application/mpeg4-iod;base64,AoDUAE8BAf/1AQOAbwABQFBkYXRhOm
FwcGxpY2F0aW9uL21wZWc0LW9kLWF1O2Jhc2U2NCxBUjBCR3dVZkF4Y0F5U1FBWlFRT
klCRUVrK0FBZWhJQUFIb1NBQVlCQkE9PQQNAQUABAAAAAAAAAAAAAYJAQAAAA
AAAAAAAzoAAkA2ZGF0YTphcHBsaWNhdGlvbi9tcGVnNC1iaWZzLWF1O2Jhc2U2NCx3Q
kFTWVFTSVVFVUZQd0E9BBICDQAAAgAAAAAAAAAABQMAAEAGCQEAAAAAAAA
AAA=="
m=video 0 RTP/AVP 96// media description
a=control:trackID=1// indicate that track1 is used for video stream
a=rtpmap:96 MP4V-ES/90000
a=fmtp:96 profile-level-id=245;config=000001B0F5000001B50900000100000001
200886C400670C58112051; //bit stream configured information is express by config,the
information of config is vary along with the video parameters configuration.
a=mpeg4-esid:201
RTSP SETUP, this command is used for remind the server to establish conversation,
configuration method of data transmission. It is required to generate the following
header-filed.
Transport Prescribe the way of data stream transmission, support the
following format:
RTP/AVP;unicast;client_port=port1-port2
RTP/AVP;multicast;client_port=port1-port2
RTP/AVP/TCP;unicast;client_port=port1-port2
RTP/AVP/TCP;unicast
C-S:SETUP rtsp://192.0.1.100/mpeg4/ch1/main/av_stream/trackID=1 RTSP/1.0
CSeq: 3
Transport: RTP/AVP;unicast;client_port=1094-1095
User-Agent: Hikplayer
S-C:RTSP/1.0 200 OK
CSeq: 3
Session:1389957320//the conversation label symbol that responded from server.
Transport: RTP/AVP;unicast;client_port=1094-1095;server_port=12028-12029
RTSP PLAY, this command is for client to start the data transmit and it requires to
generate the following header-field:
Range Prescribe the play range, for it only support real time stream, so
it only has beginning time but not ending time
RTP-Info About the information of RTP stream, including next RTP serial
No
C-S:PLAY rtsp://192.0.1.100/mpeg4/ch1/main/av_stream RTSP/1.0
CSeq: 4
Session: 1389957320
Range: npt=0.000- //set the range of playing time
User-Agent: Hikplayer
S-C:RTSP/1.0 200 OK
CSeq: 4
Session: 1389957320
Range: npt=now-
RTP-Info: url=trackID=1;seq=29626 //seq is information that in rtp packet
RTSP TEARDOWN, this command finishing the data transmission of server
C-S:TEARDOWN rtsp://192.0.1.100/mpeg4/ch1/main/av_stream RTSP/1.0
CSeq: 5
Session: 1389957320
User-Agent: Hikplayer
S-C:RTSP/1.0 200 OK
CSeq: 5
Session: 1389957320
The above methods is usually used in the process of interaction, there are also lots of
important methods that we do not supported, such as: get/set_parameter,pause,redirect,
etc.
2. RTP OVER TCP
(1)the specialness when get bit stream:
When in the period of setup, user send a setup command that trackID=1 and take
over the ports
User use the port to connect to the device
User send the playing command
Device send the video/audio to user
(2)some examples for different periods in the process of SETUP:
C-S:SETUP rtsp://192.0.1.100/mpeg4/ch1/main/av_stream/trackID=1 RTSP/1.0
CSeq: 3
Transport: RTP/AVP/TCP;unicast;client_port=13000-13001
User-Agent: Hikplayer
S-C:RTSP/1.0 200 OK
CSeq: 3
Session:1389957320
Transport:
RTP/AVP/TCP;unicast;client_port=13000-13001;server_port=8200-8201
(3)We use the TPKT protocol to guarantee the transmission and get the whole RTP
packet, and distinguish the video from audio via RTP load, the value of video is 96 and
audio is 0.
The first 4 bytes is TPKT protocol.
The first byte is version of TPKT
The second byte is pre-reserve field of TPKT protocol
The third byte is TPKT header and 4th is length of RTP packet
From the 5th byte to 16th bytes are the header of RTP
The first two bits of 5th byte are the version No of RTP packet
The third bit of 5th byte is the padding bit of RTP packet
The 4th bit of 5th byte is the extend bit of RTP packet.
The 5th, 6th, 7th, 8th bytes are CSRC of RTP packet
The 9th, 10th, 11th, 12th bytes are timestamp of RTP packet
The 13th 14th 15th 16th bytes are SSRC of RTP packet(fixed value:0x55667788)
(3)Port configuration, TCP(data port) of server terminal is gotten through calculate, the
formula is: 8000+200+(chan-1)
3. RTP OVER UDP
(1)User send a SETUP command in the SETUP period, when trackID1=1 means it can
only got video.
(2)User send a SETUP command in the SETUP period, when trackID1=2 means it can
only got audio.
(3)User send a SETUP command in the SETUP period, when trackID1=1 and
trackID1=2 means it can got video and audio.
(4) The range of ports configured, UDP(data port) of server terminal is gotten through
calculate, the formula is: 8000+200+(chan-1)*6 - 8000+200+(chan-1)*6+9
(5) Some examples for different periods in the process of SETUP:
C-S:SETUP rtsp://192.0.1.100/mpeg4/ch1/main/av_stream/trackID=1 RTSP/1.0
CSeq: 3
Transport: RTP/AVP;unicast;client_port=13000-13001
User-Agent: Hikplayer
S-C:RTSP/1.0 200 OK
CSeq: 3
Session:1389957320
Transport: RTP/AVP;unicast;client_port=13000-13001;server_port=8200-8201;
ssrc=3FBF041A
C-S:SETUP rtsp://192.0.1.100/mpeg4/ch1/main/av_stream/trackID=2 RTSP/1.0
CSeq: 3
Transport: RTP/AVP;unicast;client_port=13002-13003
User-Agent: Hikplayer
S-C:RTSP/1.0 200 OK
CSeq: 3
Session:1389957320
Transport: RTP/AVP;unicast;client_port=13002-13003;server_port=8200-8201;
ssrc=3FBF041A
4. Multicast RTP
(1)If there are not multicast address and port in user’s address, it will use the default
existed multicast address and port.
(2)If there are multicast address and port in user’s protocol, it will use them to send data
(3)About the multicast ports configuration, the multicast ports will be set to can be
configured in the future
Main channel port, 8000+600+4+(chan-1)*6
Sub channel port, 8000+600+2+(chan-1)*6
Audio port, 8000+600+(chan-1)*6
(4)SSRC,it is used for distinguishing the device which sent the multicast data according
to the last 4 bits MAC address.
(5) Some examples for different periods in the process of SETUP:
C-S:SETUP rtsp://192.0.1.100/mpeg4/ch1/main/av_stream/trackID=1 RTSP/1.0
CSeq: 3
Transport: RTP/AVP;mcast
User-Agent: Hikplayer
S-C:RTSP/1.0 200 OK
CSeq: 3
Session:1389957320
Transport:
RTP/AVP;mcast;destination=224.0.1.2;port=8602-8603;ssrc=3FBF041A
C-S:SETUP rtsp://192.0.1.100/mpeg4/ch1/main/av_stream/trackID=2 RTSP/1.0
CSeq: 3
Transport: RTP/AVP;mcast
User-Agent: Hikplayer
S-C:RTSP/1.0 200 OK
CSeq: 3
Session:1389957320
Transport:
RTP/AVP;mcast;destination=224.0.1.2;port=8602-8603;ssrc=3FBF041A
5. RTP OVER RTSP
(1)RTSP protocol, all RTP data stream is transmit in 554 port
(2)Binary data embedded into the bit stream
The first byte is symbol $, and it is expressed as 0x24 in hex
The second byte is the number of video/audio channel
The third and fourth bytes are about the length of RTP packet.
(3) Some examples for different periods in the process of SETUP:
C-S:SETUP rtsp://192.0.1.100/mpeg4/ch1/main/av_stream/trackID=1 RTSP/1.0
CSeq: 3
Transport: RTP/AVP/TCP;unicast
User-Agent: Hikplayer
S-C:RTSP/1.0 200 OK
CSeq: 3
Session: 1389957320
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
C-S:SETUP rtsp://192.0.1.100/mpeg4/ch1/main/av_stream/trackID=2 RTSP/1.0
CSeq: 4
Transport: RTP/AVP/TCP;unicast
User-Agent: Hikplayer
S-C:RTSP/1.0 200 OK
CSeq: 4
Session: 1389957320
Transport: RTP/AVP/TCP;unicast;interleaved=2-3
6. Support the previous SDK
The previous SDK can get the bit stream, but the user need to analyze by himself, for
there is not header information in the bit stream.
Reference protocols:
(1) RFC2327 SDP(Session Description Protocol) protocol
(2) RFC2326 RTSP protocol
(3) RFC3551 TPKT protocol
(4) RFC3984 RTP Payload Format for H.264 Video
(5) RFC3016 RTP Payload Format for MPEG-4 Audio/Visual Streams

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Streaming Media Protocols
Streaming Media ProtocolsStreaming Media Protocols
Streaming Media Protocols
 
Puertos tcp & udp
Puertos tcp & udpPuertos tcp & udp
Puertos tcp & udp
 
Chap 13 stream control transmission protocol
Chap 13 stream control transmission protocolChap 13 stream control transmission protocol
Chap 13 stream control transmission protocol
 
Real-Time Streaming Protocol -QOS
Real-Time Streaming Protocol -QOSReal-Time Streaming Protocol -QOS
Real-Time Streaming Protocol -QOS
 
Multipath TCP
Multipath TCPMultipath TCP
Multipath TCP
 
10 routing-bgp
10 routing-bgp10 routing-bgp
10 routing-bgp
 
Computer network (16)
Computer network (16)Computer network (16)
Computer network (16)
 
Features of tcp (part 2) .68
Features of tcp  (part 2) .68Features of tcp  (part 2) .68
Features of tcp (part 2) .68
 
Unit III IPV6 UDP
Unit III IPV6 UDPUnit III IPV6 UDP
Unit III IPV6 UDP
 
Important tcpudp protocols
Important tcpudp protocolsImportant tcpudp protocols
Important tcpudp protocols
 
Mpegts introduction
Mpegts introductionMpegts introduction
Mpegts introduction
 
Chap 13
Chap 13Chap 13
Chap 13
 
RARP, BOOTP, DHCP and PXE Protocols
RARP, BOOTP, DHCP and PXE ProtocolsRARP, BOOTP, DHCP and PXE Protocols
RARP, BOOTP, DHCP and PXE Protocols
 
Surviving The Stump The Chump Interview Questions
Surviving The Stump The Chump Interview QuestionsSurviving The Stump The Chump Interview Questions
Surviving The Stump The Chump Interview Questions
 
9 ipv6-routing
9 ipv6-routing9 ipv6-routing
9 ipv6-routing
 
Chap 07 arp & rarp
Chap 07 arp & rarpChap 07 arp & rarp
Chap 07 arp & rarp
 
Making our networking stack truly extensible
Making our networking stack truly extensible Making our networking stack truly extensible
Making our networking stack truly extensible
 
Chap 25 multimedia
Chap 25 multimediaChap 25 multimedia
Chap 25 multimedia
 
IPv6 Segment Routing : an end-to-end solution ?
IPv6 Segment Routing : an end-to-end solution ?IPv6 Segment Routing : an end-to-end solution ?
IPv6 Segment Routing : an end-to-end solution ?
 
Tcpip 1
Tcpip 1Tcpip 1
Tcpip 1
 

Destacado

Análisis de los protocolos de tiempo real RTP, RTCP y RTSP
Análisis de los protocolos de tiempo real RTP, RTCP y RTSPAnálisis de los protocolos de tiempo real RTP, RTCP y RTSP
Análisis de los protocolos de tiempo real RTP, RTCP y RTSPmanuelfloresv
 
Multimedia networking
Multimedia networkingMultimedia networking
Multimedia networkingKikima Jimmy
 
Economic environment unit6
Economic environment unit6Economic environment unit6
Economic environment unit6UNBFS
 
Information systems security_awareness_fy10
Information systems security_awareness_fy10Information systems security_awareness_fy10
Information systems security_awareness_fy10Wesen Tegegne
 
English 7 unit 01 my hobbies lesson 5 skills 1
English 7 unit 01 my hobbies lesson 5 skills 1English 7 unit 01 my hobbies lesson 5 skills 1
English 7 unit 01 my hobbies lesson 5 skills 1thanh bui
 
2012 deep research report on china special steel industry
2012 deep research report on china special steel industry2012 deep research report on china special steel industry
2012 deep research report on china special steel industrysmarter2011
 
Critical purviews where information and communication technology (ICT) can pr...
Critical purviews where information and communication technology (ICT) can pr...Critical purviews where information and communication technology (ICT) can pr...
Critical purviews where information and communication technology (ICT) can pr...Adamkolo Mohammed Ibrahim Jinjiri
 
Offer for supply of 15 mt wireless heatproof crane scale sjw metlr
Offer for supply of 15 mt wireless heatproof crane scale sjw metlrOffer for supply of 15 mt wireless heatproof crane scale sjw metlr
Offer for supply of 15 mt wireless heatproof crane scale sjw metlrsatyarth sharma
 
Overview on china's philanthropy for ACCP
Overview on china's philanthropy for ACCPOverview on china's philanthropy for ACCP
Overview on china's philanthropy for ACCPgive2asia
 
Q2 2013 ASSA ABLOY investors presentation 19 july
Q2 2013 ASSA ABLOY investors presentation 19 julyQ2 2013 ASSA ABLOY investors presentation 19 july
Q2 2013 ASSA ABLOY investors presentation 19 julyASSA ABLOY
 
Firm’s problem
Firm’s problem Firm’s problem
Firm’s problem Paul Alonzo
 
OICX Retail Customer Experience
OICX Retail Customer ExperienceOICX Retail Customer Experience
OICX Retail Customer ExperienceDamian Kernahan
 
CMG Recommendation Letter PSB JPG
CMG Recommendation Letter PSB JPGCMG Recommendation Letter PSB JPG
CMG Recommendation Letter PSB JPGPia Sanchez
 
BÍ QUYẾT QUẢN LÝ HIỆU QUẢ CÂU LẠC BỘ CHA MẸ VÀ VỊ THÀNH NIÊN, THANH NIÊN
BÍ QUYẾT QUẢN LÝ HIỆU QUẢ CÂU LẠC BỘ CHA MẸ VÀ VỊ THÀNH NIÊN, THANH NIÊNBÍ QUYẾT QUẢN LÝ HIỆU QUẢ CÂU LẠC BỘ CHA MẸ VÀ VỊ THÀNH NIÊN, THANH NIÊN
BÍ QUYẾT QUẢN LÝ HIỆU QUẢ CÂU LẠC BỘ CHA MẸ VÀ VỊ THÀNH NIÊN, THANH NIÊNCGFED
 

Destacado (20)

Análisis de los protocolos de tiempo real RTP, RTCP y RTSP
Análisis de los protocolos de tiempo real RTP, RTCP y RTSPAnálisis de los protocolos de tiempo real RTP, RTCP y RTSP
Análisis de los protocolos de tiempo real RTP, RTCP y RTSP
 
RTP
RTPRTP
RTP
 
Multimedia Network
Multimedia NetworkMultimedia Network
Multimedia Network
 
Multimedia networking
Multimedia networkingMultimedia networking
Multimedia networking
 
Economic environment unit6
Economic environment unit6Economic environment unit6
Economic environment unit6
 
Information systems security_awareness_fy10
Information systems security_awareness_fy10Information systems security_awareness_fy10
Information systems security_awareness_fy10
 
English 7 unit 01 my hobbies lesson 5 skills 1
English 7 unit 01 my hobbies lesson 5 skills 1English 7 unit 01 my hobbies lesson 5 skills 1
English 7 unit 01 my hobbies lesson 5 skills 1
 
2012 deep research report on china special steel industry
2012 deep research report on china special steel industry2012 deep research report on china special steel industry
2012 deep research report on china special steel industry
 
Tema 08
Tema 08Tema 08
Tema 08
 
Critical purviews where information and communication technology (ICT) can pr...
Critical purviews where information and communication technology (ICT) can pr...Critical purviews where information and communication technology (ICT) can pr...
Critical purviews where information and communication technology (ICT) can pr...
 
Offer for supply of 15 mt wireless heatproof crane scale sjw metlr
Offer for supply of 15 mt wireless heatproof crane scale sjw metlrOffer for supply of 15 mt wireless heatproof crane scale sjw metlr
Offer for supply of 15 mt wireless heatproof crane scale sjw metlr
 
Sincere Speech
Sincere SpeechSincere Speech
Sincere Speech
 
Overview on china's philanthropy for ACCP
Overview on china's philanthropy for ACCPOverview on china's philanthropy for ACCP
Overview on china's philanthropy for ACCP
 
Info penting
Info pentingInfo penting
Info penting
 
Q2 2013 ASSA ABLOY investors presentation 19 july
Q2 2013 ASSA ABLOY investors presentation 19 julyQ2 2013 ASSA ABLOY investors presentation 19 july
Q2 2013 ASSA ABLOY investors presentation 19 july
 
Firm’s problem
Firm’s problem Firm’s problem
Firm’s problem
 
OICX Retail Customer Experience
OICX Retail Customer ExperienceOICX Retail Customer Experience
OICX Retail Customer Experience
 
Aluminium dan aloi aluminium
Aluminium dan aloi aluminiumAluminium dan aloi aluminium
Aluminium dan aloi aluminium
 
CMG Recommendation Letter PSB JPG
CMG Recommendation Letter PSB JPGCMG Recommendation Letter PSB JPG
CMG Recommendation Letter PSB JPG
 
BÍ QUYẾT QUẢN LÝ HIỆU QUẢ CÂU LẠC BỘ CHA MẸ VÀ VỊ THÀNH NIÊN, THANH NIÊN
BÍ QUYẾT QUẢN LÝ HIỆU QUẢ CÂU LẠC BỘ CHA MẸ VÀ VỊ THÀNH NIÊN, THANH NIÊNBÍ QUYẾT QUẢN LÝ HIỆU QUẢ CÂU LẠC BỘ CHA MẸ VÀ VỊ THÀNH NIÊN, THANH NIÊN
BÍ QUYẾT QUẢN LÝ HIỆU QUẢ CÂU LẠC BỘ CHA MẸ VÀ VỊ THÀNH NIÊN, THANH NIÊN
 

Similar a RTSP Protocol - Explanation to develop API of RTSP Protocol

Sip technology overview
Sip technology overviewSip technology overview
Sip technology overviewOded Ben-Dori
 
Transport Layer Port or TCP/IP & UDP Port
Transport Layer Port or TCP/IP & UDP PortTransport Layer Port or TCP/IP & UDP Port
Transport Layer Port or TCP/IP & UDP PortNetwax Lab
 
SIP (Session Initiation Protocol)
SIP (Session Initiation Protocol)SIP (Session Initiation Protocol)
SIP (Session Initiation Protocol)KHNOG
 
Web rtc 핵심 기술에 대한 이해
Web rtc 핵심 기술에 대한 이해Web rtc 핵심 기술에 대한 이해
Web rtc 핵심 기술에 대한 이해Dahyun Kim
 
Packet-to-Packet Applications
Packet-to-Packet ApplicationsPacket-to-Packet Applications
Packet-to-Packet ApplicationsVideoguy
 
lect20-Layer5.ppt
lect20-Layer5.pptlect20-Layer5.ppt
lect20-Layer5.pptNone973611
 
H323 ports
H323 portsH323 ports
H323 portswickatz
 
Asa pixfwsm multicast tips and common problems
Asa pixfwsm multicast tips and common problemsAsa pixfwsm multicast tips and common problems
Asa pixfwsm multicast tips and common problemsIT Tech
 
CMAF Live Ingest Uplink Protocol
CMAF Live Ingest Uplink ProtocolCMAF Live Ingest Uplink Protocol
CMAF Live Ingest Uplink ProtocolRufael Mekuria
 
VoIP on LTE -packet Filter
VoIP on LTE -packet FilterVoIP on LTE -packet Filter
VoIP on LTE -packet Filterraj_naveen
 
Application Layer and Socket Programming
Application Layer and Socket ProgrammingApplication Layer and Socket Programming
Application Layer and Socket Programmingelliando dias
 
Programming TCP for responsiveness
Programming TCP for responsivenessProgramming TCP for responsiveness
Programming TCP for responsivenessKazuho Oku
 

Similar a RTSP Protocol - Explanation to develop API of RTSP Protocol (20)

Sip technology overview
Sip technology overviewSip technology overview
Sip technology overview
 
Transport Layer Port or TCP/IP & UDP Port
Transport Layer Port or TCP/IP & UDP PortTransport Layer Port or TCP/IP & UDP Port
Transport Layer Port or TCP/IP & UDP Port
 
SIP (Session Initiation Protocol)
SIP (Session Initiation Protocol)SIP (Session Initiation Protocol)
SIP (Session Initiation Protocol)
 
lect21-Layer5.ppt
lect21-Layer5.pptlect21-Layer5.ppt
lect21-Layer5.ppt
 
Web rtc 핵심 기술에 대한 이해
Web rtc 핵심 기술에 대한 이해Web rtc 핵심 기술에 대한 이해
Web rtc 핵심 기술에 대한 이해
 
Packet-to-Packet Applications
Packet-to-Packet ApplicationsPacket-to-Packet Applications
Packet-to-Packet Applications
 
Surf Communication Solutions - Packet To Packet Apps
Surf Communication Solutions - Packet To Packet AppsSurf Communication Solutions - Packet To Packet Apps
Surf Communication Solutions - Packet To Packet Apps
 
lect20-Layer5.ppt
lect20-Layer5.pptlect20-Layer5.ppt
lect20-Layer5.ppt
 
Port tcp
Port tcpPort tcp
Port tcp
 
Surf Communication Solutions - Voice Video Gw
Surf Communication Solutions - Voice Video GwSurf Communication Solutions - Voice Video Gw
Surf Communication Solutions - Voice Video Gw
 
H323 ports
H323 portsH323 ports
H323 ports
 
Asa pixfwsm multicast tips and common problems
Asa pixfwsm multicast tips and common problemsAsa pixfwsm multicast tips and common problems
Asa pixfwsm multicast tips and common problems
 
CMAF Live Ingest Uplink Protocol
CMAF Live Ingest Uplink ProtocolCMAF Live Ingest Uplink Protocol
CMAF Live Ingest Uplink Protocol
 
VoIP on LTE -packet Filter
VoIP on LTE -packet FilterVoIP on LTE -packet Filter
VoIP on LTE -packet Filter
 
Application Layer and Socket Programming
Application Layer and Socket ProgrammingApplication Layer and Socket Programming
Application Layer and Socket Programming
 
Programming TCP for responsiveness
Programming TCP for responsivenessProgramming TCP for responsiveness
Programming TCP for responsiveness
 
TCP IP
TCP IP TCP IP
TCP IP
 
CN 1.docx
CN 1.docxCN 1.docx
CN 1.docx
 
nwlab-ex1.pdf
nwlab-ex1.pdfnwlab-ex1.pdf
nwlab-ex1.pdf
 
Bt0076 tcp ip
Bt0076  tcp ipBt0076  tcp ip
Bt0076 tcp ip
 

Último

DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Último (20)

DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

RTSP Protocol - Explanation to develop API of RTSP Protocol

  • 1. RTSP Protocol Explanation to develop API of RTSP Protocol 1. RTSP protocol explanation (1)URL address format: rtsp://<ipaddress>/<videotype>/ch<number>/<streamtype> /av_stream. Of these, ipaddress is the IP address of device, videotype is mpeg4 or h.264, number is numeric, streamtype is main or sub stream. It is not sensitive to the capital letter or lowercase letter. For example: rtsp://192.0.1.100/mpeg4/ch1/main/av_stream /*the video type is MPEG4 and it comes from main stream of device’s channel 1 which IP address is 192.0.1.100*/ (2)the explanation of authentication Support URL carry with user name and password. Support authentication in Describe step. (3)Grammar Request grammar: COMMAND URI RTSP/1.0<CRLF> Headerfield1: val1<CRLF> Headerfield2: val2<CRLF> ... <CRLF> Feedback grammar: RTSP/1.0 ResultCode ResultString<CRLF> Headerfield3: val3<CRLF>
  • 2. Headerfield4: val4<CRLF> ... <CRLF> (4)device support the following command formats Support the following header-field and omit other header-field Header-field description Authorization the certification information come from client terminal(only support certification information that dragged-in in Describe period CSeq Request the serial NO Session Session remark NO (return by server in SETUP period Content-Length Length of content Head information generated when RTSP server feedback Header-field description CSeq Serial NO feedback(matching with the request serial NO) Session Session label symbol (5)Take all of the RTSP commands that interacted between player and device for
  • 3. example: C means rtsp client and S means rtsp server RTSP OPTIONS,C inquire S for the method that can be used and all methods that can be used are in S’s reply information. C-S:OPTIONS rtsp://192.0.1.100/mpeg4/ch1/main/av_stream RTSP/1.0 CSeq:1// there is label in every message, normaly, the first packet is request message from option User-Agent: Hikplayer S-C:RTSP/1.0 200 OK CSeq: 1 Public: DESCRIBE,PLAY,SETUP,TEARDOWN RTSP DESCRIBE, return back the described information of SDP(RFC2327) appointed by URL. And DESCRIBEcommand accept the following header-field: Accept The content list type supported by client software(only support application/sdp)
  • 4. DESCRIBE command generate the extra following information of header: Content-Type Content type(application/sdp) Content-Length The length of SDP that described C-S : DESCRIBE rtsp://admin:12345@192.0.1.100/mpeg4/ch1/main/av_stream RTSP/1.0 CSeq: 2 Accept: application/sdp User-Agent: Hikplayer S-C:RTSP/1.0 200 OK CSeq: 2 Content-type: application/sdp Content-length: 692 v=0//SDP version information o=- 1109162014219182 1109162014219192 IN IP4 x.y.z.w //owner/creator and conversation label symbol s=Media Presentation//conversation name e=NONE//Email address c=IN IP4 0.0.0.0// connection information t=0 0// conversation time a=control:* If the codec is mpeg4 m=video 0 RTP/AVP 96//media description a=rtpmap:96 MP4V-ES/90000 a=fmtp:96 profile-level-id=8;config=000001B0F5000001B50900000100000001200886 C400670CA0116851;//Stream configuration information described by config, config is changing with video parameter setting.
  • 5. a=range:ntp=now- a=control:trackID=1//Video stream using track1 m=audio 0 RTP/AVP 0//media description a=rtpmap:0 PCMU/8000 a=control:trackID=2//audio stream use track2 a=Media_header:MEDIAINFO=494D4B48010100000400010010710110401F000000FA0000000 00000000000000000000000000000;//HIK Header, 40 bytes. a=appversion:1.0//sdp version If the codec is H.264 m=video 0 RTP/AVP 96 a=rtpmap:96 H264/90000 a=control:trackID=1 a=fmtp:96 profile-level-id=4D0014;packetization-mode=0;sprop-parameter-sets=Z0LAH4iLUCgC3QgAAD hAAAr8gBA=,aM44gA== m=audio 0 RTP/AVP 0 a=rtpmap:0 PCMU/8000 a=control:trackID=2 a=Media_header:MEDIAINFO=494D4B48010100000400010010710110401F000000FA0000000 00000000000000000000000000000; a=appversion:1.0 a=range:ntp=now- a=mpeg4-iod:"data:application/mpeg4-iod;base64,AoDUAE8BAf/1AQOAbwABQFBkYXRhOm FwcGxpY2F0aW9uL21wZWc0LW9kLWF1O2Jhc2U2NCxBUjBCR3dVZkF4Y0F5U1FBWlFRT klCRUVrK0FBZWhJQUFIb1NBQVlCQkE9PQQNAQUABAAAAAAAAAAAAAYJAQAAAA AAAAAAAzoAAkA2ZGF0YTphcHBsaWNhdGlvbi9tcGVnNC1iaWZzLWF1O2Jhc2U2NCx3Q kFTWVFTSVVFVUZQd0E9BBICDQAAAgAAAAAAAAAABQMAAEAGCQEAAAAAAAA AAA==" m=video 0 RTP/AVP 96// media description a=control:trackID=1// indicate that track1 is used for video stream a=rtpmap:96 MP4V-ES/90000 a=fmtp:96 profile-level-id=245;config=000001B0F5000001B50900000100000001 200886C400670C58112051; //bit stream configured information is express by config,the information of config is vary along with the video parameters configuration. a=mpeg4-esid:201 RTSP SETUP, this command is used for remind the server to establish conversation, configuration method of data transmission. It is required to generate the following header-filed.
  • 6. Transport Prescribe the way of data stream transmission, support the following format: RTP/AVP;unicast;client_port=port1-port2 RTP/AVP;multicast;client_port=port1-port2 RTP/AVP/TCP;unicast;client_port=port1-port2 RTP/AVP/TCP;unicast C-S:SETUP rtsp://192.0.1.100/mpeg4/ch1/main/av_stream/trackID=1 RTSP/1.0 CSeq: 3 Transport: RTP/AVP;unicast;client_port=1094-1095 User-Agent: Hikplayer S-C:RTSP/1.0 200 OK CSeq: 3 Session:1389957320//the conversation label symbol that responded from server. Transport: RTP/AVP;unicast;client_port=1094-1095;server_port=12028-12029 RTSP PLAY, this command is for client to start the data transmit and it requires to generate the following header-field: Range Prescribe the play range, for it only support real time stream, so it only has beginning time but not ending time RTP-Info About the information of RTP stream, including next RTP serial No C-S:PLAY rtsp://192.0.1.100/mpeg4/ch1/main/av_stream RTSP/1.0 CSeq: 4
  • 7. Session: 1389957320 Range: npt=0.000- //set the range of playing time User-Agent: Hikplayer S-C:RTSP/1.0 200 OK CSeq: 4 Session: 1389957320 Range: npt=now- RTP-Info: url=trackID=1;seq=29626 //seq is information that in rtp packet RTSP TEARDOWN, this command finishing the data transmission of server C-S:TEARDOWN rtsp://192.0.1.100/mpeg4/ch1/main/av_stream RTSP/1.0 CSeq: 5 Session: 1389957320 User-Agent: Hikplayer S-C:RTSP/1.0 200 OK CSeq: 5 Session: 1389957320 The above methods is usually used in the process of interaction, there are also lots of important methods that we do not supported, such as: get/set_parameter,pause,redirect, etc. 2. RTP OVER TCP (1)the specialness when get bit stream:
  • 8. When in the period of setup, user send a setup command that trackID=1 and take over the ports User use the port to connect to the device User send the playing command Device send the video/audio to user (2)some examples for different periods in the process of SETUP: C-S:SETUP rtsp://192.0.1.100/mpeg4/ch1/main/av_stream/trackID=1 RTSP/1.0 CSeq: 3 Transport: RTP/AVP/TCP;unicast;client_port=13000-13001 User-Agent: Hikplayer S-C:RTSP/1.0 200 OK CSeq: 3 Session:1389957320 Transport: RTP/AVP/TCP;unicast;client_port=13000-13001;server_port=8200-8201 (3)We use the TPKT protocol to guarantee the transmission and get the whole RTP packet, and distinguish the video from audio via RTP load, the value of video is 96 and audio is 0. The first 4 bytes is TPKT protocol. The first byte is version of TPKT The second byte is pre-reserve field of TPKT protocol The third byte is TPKT header and 4th is length of RTP packet
  • 9. From the 5th byte to 16th bytes are the header of RTP The first two bits of 5th byte are the version No of RTP packet The third bit of 5th byte is the padding bit of RTP packet The 4th bit of 5th byte is the extend bit of RTP packet. The 5th, 6th, 7th, 8th bytes are CSRC of RTP packet The 9th, 10th, 11th, 12th bytes are timestamp of RTP packet The 13th 14th 15th 16th bytes are SSRC of RTP packet(fixed value:0x55667788) (3)Port configuration, TCP(data port) of server terminal is gotten through calculate, the formula is: 8000+200+(chan-1) 3. RTP OVER UDP (1)User send a SETUP command in the SETUP period, when trackID1=1 means it can only got video. (2)User send a SETUP command in the SETUP period, when trackID1=2 means it can only got audio. (3)User send a SETUP command in the SETUP period, when trackID1=1 and trackID1=2 means it can got video and audio. (4) The range of ports configured, UDP(data port) of server terminal is gotten through calculate, the formula is: 8000+200+(chan-1)*6 - 8000+200+(chan-1)*6+9 (5) Some examples for different periods in the process of SETUP:
  • 10. C-S:SETUP rtsp://192.0.1.100/mpeg4/ch1/main/av_stream/trackID=1 RTSP/1.0 CSeq: 3 Transport: RTP/AVP;unicast;client_port=13000-13001 User-Agent: Hikplayer S-C:RTSP/1.0 200 OK CSeq: 3 Session:1389957320 Transport: RTP/AVP;unicast;client_port=13000-13001;server_port=8200-8201; ssrc=3FBF041A C-S:SETUP rtsp://192.0.1.100/mpeg4/ch1/main/av_stream/trackID=2 RTSP/1.0 CSeq: 3 Transport: RTP/AVP;unicast;client_port=13002-13003 User-Agent: Hikplayer S-C:RTSP/1.0 200 OK CSeq: 3 Session:1389957320 Transport: RTP/AVP;unicast;client_port=13002-13003;server_port=8200-8201; ssrc=3FBF041A 4. Multicast RTP (1)If there are not multicast address and port in user’s address, it will use the default existed multicast address and port.
  • 11. (2)If there are multicast address and port in user’s protocol, it will use them to send data (3)About the multicast ports configuration, the multicast ports will be set to can be configured in the future Main channel port, 8000+600+4+(chan-1)*6 Sub channel port, 8000+600+2+(chan-1)*6 Audio port, 8000+600+(chan-1)*6 (4)SSRC,it is used for distinguishing the device which sent the multicast data according to the last 4 bits MAC address. (5) Some examples for different periods in the process of SETUP: C-S:SETUP rtsp://192.0.1.100/mpeg4/ch1/main/av_stream/trackID=1 RTSP/1.0 CSeq: 3 Transport: RTP/AVP;mcast User-Agent: Hikplayer S-C:RTSP/1.0 200 OK CSeq: 3 Session:1389957320 Transport: RTP/AVP;mcast;destination=224.0.1.2;port=8602-8603;ssrc=3FBF041A C-S:SETUP rtsp://192.0.1.100/mpeg4/ch1/main/av_stream/trackID=2 RTSP/1.0 CSeq: 3 Transport: RTP/AVP;mcast User-Agent: Hikplayer
  • 12. S-C:RTSP/1.0 200 OK CSeq: 3 Session:1389957320 Transport: RTP/AVP;mcast;destination=224.0.1.2;port=8602-8603;ssrc=3FBF041A 5. RTP OVER RTSP (1)RTSP protocol, all RTP data stream is transmit in 554 port (2)Binary data embedded into the bit stream The first byte is symbol $, and it is expressed as 0x24 in hex The second byte is the number of video/audio channel The third and fourth bytes are about the length of RTP packet. (3) Some examples for different periods in the process of SETUP: C-S:SETUP rtsp://192.0.1.100/mpeg4/ch1/main/av_stream/trackID=1 RTSP/1.0 CSeq: 3 Transport: RTP/AVP/TCP;unicast User-Agent: Hikplayer S-C:RTSP/1.0 200 OK CSeq: 3 Session: 1389957320 Transport: RTP/AVP/TCP;unicast;interleaved=0-1 C-S:SETUP rtsp://192.0.1.100/mpeg4/ch1/main/av_stream/trackID=2 RTSP/1.0 CSeq: 4
  • 13. Transport: RTP/AVP/TCP;unicast User-Agent: Hikplayer S-C:RTSP/1.0 200 OK CSeq: 4 Session: 1389957320 Transport: RTP/AVP/TCP;unicast;interleaved=2-3 6. Support the previous SDK The previous SDK can get the bit stream, but the user need to analyze by himself, for there is not header information in the bit stream. Reference protocols: (1) RFC2327 SDP(Session Description Protocol) protocol (2) RFC2326 RTSP protocol (3) RFC3551 TPKT protocol (4) RFC3984 RTP Payload Format for H.264 Video (5) RFC3016 RTP Payload Format for MPEG-4 Audio/Visual Streams