RTP over RTSP (TCP) (i)

Source: Internet
Author: User
Tags server port

Server: live555 client: VLC video format: H264

(1) OPTIONS

OPTIONS rtsp://222.201.145.236/slamtv60.264 rtsp/1.0
Cseq:2
user-agent:libvlc/1.1.11 (LIVE555 streaming Media v2011.05.25)
Parsing: This step is where the client asks the server what methods are available. The package describes the address and port where the client requests the file and describes the version of the player and the operating system platform.

rtsp/1.0 OK
Cseq:2
date:wed, Mar 03:48:07 GMT
Public:options, DESCRIBE, SETUP, teardown, play, PAUSE, Get_parameter, Set_parameter
Parsing: The server sends a response message after the options request has been received. The first return status code 200 represents a successful request. It then returns the server's current time (GMT) and the supported methods.
(2) DESCRIBE

DESCRIBE rtsp://222.201.145.236/slamtv60.264 rtsp/1.0
Cseq:3
user-agent:libvlc/1.1.11 (LIVE555 streaming Media v2011.05.25)
ACCEPT:APPLICATION/SDP
Resolution: This method is the client-side request that describes the media as detailed information. The package describes the specific directory and name of the media file that needs to be described, defines the type of description that the client understands, and requires the server to describe the media information in the SDP package
rtsp/1.0 OK
Cseq:3
date:wed, Mar 07 2012 03:48:0 7 GMT
content-base:rtsp://222.201.145.236/slamtv60.264/
CONTENT-TYPE:APPLICATION/SDP
Content-Length: 527

The first part resolves: this is the message sent back by the server in response to the describe request. The above description describes the specific path and name of the media file, as well as the description type (SDP) used, and defines the length of the SDP package content. The second part of the following is the contents of the SDP package.
V=0
o=-1331092087436965 1 in IP4 222.201.145.236
s=h.264 video, streamed by the LIVE555 Media Server
i=slamtv60.264//Media Name
T=0 0
a=tool:live555 Streaming Media v2012.02.04
A=type:broadcast Broadcast Mode
a=control:*
a=range:npt=0-
a=x-qt-text-nam:h.264 video, streamed by the LIVE555 Media Server
a=x-qt-text-inf:slamtv60.264
M=video 0 RTP/AVP 96//Media type + port + Transfer Protocol + format list
C=in IP4 0.0.0.0
b=as:500
a=rtpmap:96 h264/90000
A=fmtp:96 packetization-mode=1;profile-level-id=4d4033;sprop-parameter-sets=z01am5judas0iaaaawbaaaam0emgva==, ao48ga==
A=control:track1

The second part of the analysis: This section is the SDP package content, including all the initialization of media information. The SDP package is sent as part of the RTSP package during transmission.

(3)

SETUP Rtsp://222.201.145.236/slamtv60.264/track1 rtsp/1.0
Cseq:4
user-agent:libvlc/1.1.11 (LIVE555 streaming Media v2011.05.25)/client Details
transport:rtp/avp;unicast;client_port=49970-49971//Transmission Protocol + propagation mode (unicast or multicast) + port number to receive data.
Parsing: The client sends a setup request to the server, requiring the server to set session properties and streaming media transmission to establish the session. The package content contains the client software details, as well as the required transport Protocol (RTP), the propagation method, and the port number that the client uses to receive the data


rtsp/1.0 OK
Cseq:4
date:wed, Mar 03:48:07 GMT
Transport:rtp/avp;unicast;destination=125.216.243.188;source=222.201.145.236;client_port=49970-49971;server_ PORT=6970-6971/Transmission Protocol + Communication Mode + purpose ip+ Source ip+ client Port + server port
session:62ec84ae//Session Identification

Resolution: The server establishes the session after receiving the setup request and returns session details and session identities to the client. The session identity is unique. This session is set up to complete. (4) Play

Play rtsp://222.201.145.236/slamtv60.264/rtsp/1.0
Cseq:5
user-agent:libvlc/1.1.11 (LIVE555 streaming Media v2011.05.25)
Session:62ec84ae
range:npt=0.000-//playback time range, from No. 0 seconds to file playback

Parsing: After the session is established, the client sends a play request to broadcast the requested streaming media. The transport mechanism is set in accordance with the Setup command. Play requests can be sent multiple times, and the server places requests into queues for processing. The client can also define a time range for playback, such as playing from the first n seconds of the stream media to the first m seconds.
rtsp/1.0 OK
Cseq:5
date:wed, Mar 03:48:07 GMT
range:npt=0.000-
Session:62ec84ae
rtp-info:url=rtsp://222.201.145.236/slamtv60.264/track1;seq=24735;rtptime=4146552907
Resolution: The server returns a confirmation message and begins to transmit streaming media data. Data transfers are typically sent using UDP


(5) Get_parameter

Get_parameter rtsp://222.201.145.236/slamtv60.264/rtsp/1.0
Cseq:6
user-agent:libvlc/1.1.11 (LIVE555 streaming Media v2011.05.25)
Session:62ec84ae

rtsp/1.0 OK
Cseq:6
date:wed, Mar 03:48:07 GMT
Session:62ec84ae
Parsing: Get_parameter request to check Rul specified demo and media parameter values. When there is no entity body, Get_parameter may be able to test the user's connectivity to the server
RTCP Package:


The connection data connection failed to be judged by RTCP multiple dialogs. To end this conversation and select the TCP protocol for the next transmission

(6) Teardown

Teardown rtsp://222.201.145.236/slamtv60.264/rtsp/1.0
Cseq:7
user-agent:libvlc/1.1.11 (LIVE555 streaming Media v2011.05.25)
Session:62ec84ae

Parsing: After streaming media has all been transmitted, the client sends a TEARDOWN request to the server requesting that the session be terminated. rtsp/1.0 OK
Cseq:7
date:wed, Mar 03:48:18 GMT

Parsing: The service-side responds to the teardown request, sends back the response message and terminates the session, at the end of which the server continues to wait for the next RTSP request.

The above request is a UDP packet, but the request failed, and then the TCP method is selected for transmission:

(1)

OPTIONS rtsp://222.201.145.236/slamtv60.264 rtsp/1.0
Cseq:2
user-agent:libvlc/1.1.11 (LIVE555 streaming Media v2011.05.25)

rtsp/1.0 OK
Cseq:2
date:wed, Mar 03:48:18 GMT
Public:options, DESCRIBE, SETUP, teardown, play, PAUSE, Get_parameter, Set_parameter

(2)

DESCRIBE rtsp://222.201.145.236/slamtv60.264 rtsp/1.0
Cseq:3
user-agent:libvlc/1.1.11 (LIVE555 streaming Media v2011.05.25)
Accept:application/sdp

rtsp/1.0 OK
Cseq:3
date:wed, Mar 03:48:18 GMT
content-base:rtsp://222.201.145.236/slamtv60.264/
Content-type:application/sdp
content-length:527


V=0
o=-1331092087436965 1 in IP4 222.201.145.236
s=h.264 video, streamed by the LIVE555 Media Server
i=slamtv60.264
T=0 0
a=tool:live555 Streaming Media v2012.02.04
A=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:h.264 video, streamed by the LIVE555 Media Server
a=x-qt-text-inf:slamtv60.264
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=4d4033;sprop-parameter-sets=z01am5judas0iaaaawbaaaam0emgva==, ao48ga==
A=control:track1

(3)

SETUP Rtsp://222.201.145.236/slamtv60.264/track1 rtsp/1.0
Cseq:4
user-agent:libvlc/1.1.11 (LIVE555 streaming Media v2011.05.25)
transport:rtp/avp/tcp;unicast;interleaved=0-1//request TCP Protocol to transmit RTP packets

rtsp/1.0 OK
Cseq:4
date:wed, Mar 03:48:18 GMT
Transport:rtp/avp/tcp;unicast;destination=125.216.243.188;source=222.201.145.236;interleaved=0-1
Session:289bfeae

(4)

Play rtsp://222.201.145.236/slamtv60.264/rtsp/1.0
Cseq:5
user-agent:libvlc/1.1.11 (LIVE555 streaming Media v2011.05.25)
Session:289bfeae
range:npt=0.000-

rtsp/1.0 OK
Cseq:5
date:wed, Mar 03:48:18 GMT
range:npt=0.000-
Session:289bfeae
rtp-info:url=rtsp://222.201.145.236/slamtv60.264/track1;seq=61622;rtptime=1335382752

The following are the data streams for RTP over RTSP (TCP):


VLC through two RTSP sessions to establish RTC over TCP session, but do not know what to ask, using VLC directly with the TCP connection when there is an error:


What does TCP Zero Window mean?

The Zero Window is something to investigate.

TCP Zero Window is then the window size in a machine remains at Zero for a specified amount of time.

This means so a client is not able to receive further information at the moment, and the TCP transmission is halted unti L It can process the information in its receive buffer.

TCP Window size is the amount of information this a machine can receive during a TCP session and still being able to process The data. If it like a TCP receive buffer. When a machine initiates a TCP connection to a server, it would let the server know how much of the data it can receive by the Win Dow Size.

In many Windows machines, the This value is around 64512 bytes. As the TCP session is initiated and the server begins sending data, the client would decrement it ' s Window Size as this buf Fer fills. At the "Same time", the client is processing the "data in" buffer, and is emptying it, making room for more data. Through TCP ACK frames, the client informs the server of how much room are in this buffer. If the TCP Window Size goes down to 0, the client won't be able to receive any more data until it processes and opens T He-buffer up again. In this case, Protocol Expert'll alert a "Zero window" in Expert View.

Troubleshooting a zero window for one reason or another, the machine alerting the zero window won't receive any more Data from the host. It could be this machine is running too many processes in that moment, and their processor is maxed. Or It could be the there is ' an error in the ' TCP receiver, like a Windows registry misconfiguration. Try to determine what the client is doing when the TCP Zero Window happened.



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.