Summary of the invention
For addressing the above problem, the invention discloses a kind of based on the live method and system of the network flow-medium of RTSP agreement, in order to realize the whole network live streaming media.
The invention discloses a kind ofly, carry out comprising alternately according to the RTSP agreement between client and streaming media server based on the live method of the network flow-medium of RTSP agreement:
Step 1, encoder sends message to described streaming media server, notifies the described encoder of described streaming media server to reach the standard grade, and described streaming media server confirms that described encoder reaches the standard grade;
Step 2, described streaming media server are initiated media session to described encoder and are consulted, and set up session between described streaming media server and described encoder;
Step 3, when client-requested is play, described streaming media server begins to play to playing corresponding codes device transmission message request, described encoder sends Media Stream to described streaming media server, and the Media Stream that the described encoder that described streaming media server will receive sends is transmitted to described client;
Step 4, when client stopped to play, described streaming media server sent message to playing the corresponding codes device, and described encoder receives the transmission that stops Media Stream after the described message.
Described step 1 further is:
Step 21, described encoder sends ANNOUNCE message to described streaming media server, notifies the described encoder of described streaming media server to reach the standard grade, and comprises session description information in the described ANNOUNCE message;
Step 22, described streaming media server authenticates described encoder, and authentication is replied acknowledge message by the back, confirms that described encoder reaches the standard grade.
Described step 3 further is:
Step 31, when client-requested is play, described streaming media server be checked through play corresponding encoder ready after, send PLAY message to described encoder, play to start;
After step 32, described encoder receive described PLAY message, transmit the transmission Media Stream to described streaming media server;
The Media Stream that the described encoder that step 33, described streaming media server will receive sends is transmitted to described client.
Described step 4 further is:
Step 41, when client stopped to play, described streaming media server sent PAUSE message to described encoder after being checked through and not having other clients receiving the Media Stream of playing the transmission of corresponding codes device, stops to play with notice;
Step 42 after described encoder is received PAUSE message, is replied acknowledge message to described streaming media server, and is stopped to send Media Stream.
Also comprise after the described step 2:
Step 51, described encoder sends heartbeat message to described streaming media server by predetermined period, if send failure, then disconnects the current connection with described streaming media server, reconnects described streaming media server;
Step 52 if described streaming media server does not detect the heartbeat message of encoder in default duration, disconnects the connection with described encoder, and the described encoder of mark is an off-line.
The twice of the time span that described default duration is described predetermined period or more than the twice.
Described step 2 further is:
Step 71, described streaming media server sends the DESCRIBE request message to described encoder;
Step 72, described encoder is replied the DESCRIBE response message to described streaming media server, comprising the SDP conversation description;
Step 73, described streaming media server sends SETUP message respectively at the one or more Media Streams in the described session, comprises the parameter of corresponding media flow transmission in the described SETUP message;
Step 74, described encoder is replied the SETUP message response to described streaming media server, comprises the Streaming Media transmission parameters of described streaming media server and described encoder in the described SETUP message response.
Also comprise after the described step 1:
Step 81, described streaming media server sends SET_PARAMETER message to encoder, with configuration parameter or the operational factor that described encoder is set.
Also comprise after the described step 1:
Step 91, described streaming media server sends GET_PARAMETER message to described encoder, with configuration parameter or the operational factor of obtaining described encoder.
Described configuration parameter comprises in video code model, video frequency coding rate, video coding frame per second, audio coding code check, the audio coding form one or more.
Described operational factor comprises one or more in equipment work pattern, equipment clock, write switch, the alarm switch.
Also comprise after the described step 1:
Step 121, described streaming media server sends SET_PARAMETER message to encoder, carries out the Long-distance Control action to notify described encoder.
The action of described Long-distance Control comprise equipment restart, start video recording, stop to record a video, report to the police deploy troops on garrison duty, report to the police withdraw a garrison, The Cloud Terrace rotates, in the focal length stretching one or more.
Described ANNOUNCE message comprises local media stream address information and local page reference address information, to determine to visit by point-to-point mode the URL address of encoder Media Stream or webpage from the Internet or local area network (LAN).
The invention also discloses a kind of based on the live system of the network flow-medium of RTSP agreement, comprise encoder, client, with carrying out mutual streaming media server according to the RTSP agreement between described client, described encoder is connected with described streaming media server by network respectively with described client
Described streaming media server is used for receiving the described encoder of message authentication that described encoder sends and reaches the standard grade when described encoder is reached the standard grade; Initiate media session to described encoder and consult, with setting up session between described encoder; When client-requested is play, begin to play to playing corresponding codes device transmission message request, and the Media Stream that described encoder is sent is transmitted to described client; When client stops to play, send message to stop the transmission of Media Stream to playing the corresponding codes device;
Described encoder is used for sending message to described streaming media server, reaches the standard grade to notify the described encoder of described streaming media server; With setting up session between described streaming media server; When described streaming media server request begins to play, send to described streaming media server with Media Stream is up; Receive described streaming media server to its transmission stop the message of media stream the time, stop to send Media Stream.
Described encoder is sending message to described streaming media server, be further used for when notifying the described encoder of described streaming media server to reach the standard grade sending ANNOUNCE message to described streaming media server, notify the described encoder of described streaming media server to reach the standard grade, comprise session description information in the described ANNOUNCE message;
Described streaming media server is further used for described encoder is authenticated when described encoder is reached the standard grade confirming, authentication is replied acknowledge message by the back, confirms that described encoder reaches the standard grade.
Described streaming media server when client-requested is play, be further used for being checked through play corresponding encoder ready after, send PLAY message to described encoder, play to start; The Media Stream that the described encoder that receives is sent is transmitted to described client;
After described encoder is further used for receiving described PLAY message, transmit the transmission Media Stream to described streaming media server.
Described streaming media server when client stops to play, be further used for being checked through do not have other clients receiving to play Media Stream that the corresponding codes device sends after, send PAUSE message to described encoder, stop to play with notice;
Described encoder is further used for after receiving PAUSE message, replys acknowledge message to described streaming media server, and stops to send Media Stream.
Described encoder also is used for after having set up session with described streaming media server, send heartbeat message to described streaming media server by predetermined period, if send failure, then disconnect current connection with described streaming media server, reconnect described streaming media server;
Described streaming media server also is used for after having set up session with described encoder, if do not detect the heartbeat message of encoder in default duration, then disconnects the connection with described encoder, and the described encoder of mark is an off-line.
The twice of the time span that described default duration is described predetermined period or more than the twice.
Described streaming media server is consulted initiating media session to described encoder, is further used for sending the DESCRIBE request message to described encoder when setting up session between described encoder; After receiving described encoder response, send SETUP message respectively, comprise the parameter of corresponding media flow transmission in the described SETUP message at the one or more Media Streams in the described session;
Described encoder is further used for receiving described streaming media server behind the DESCRIBE of its transmission request message when setting up session between with described streaming media server, reply the DESCRIBE response message to described streaming media server, comprising the SDP conversation description; Receive described streaming media server after the SETUP of its transmission message, reply the SETUP message response, comprise the Streaming Media transmission parameters of described streaming media server and described encoder in the described SETUP message response to described streaming media server.
Described streaming media server also is used for sending SET_PARAMETER message to encoder, with configuration parameter or the operational factor that described encoder is set.
Described streaming media server also is used for sending GET_PARAMETER message to encoder, with configuration parameter or the operational factor of obtaining described encoder.
Described configuration parameter comprises in video code model, video frequency coding rate, video coding frame per second, audio coding code check, the audio coding form one or more.
Described operational factor comprises one or more in equipment work pattern, equipment clock, write switch, the alarm switch.
Described streaming media server also is used for sending SET_PARAMETER message to encoder, carries out the Long-distance Control action to notify described encoder.
The action of described Long-distance Control comprise equipment restart, start video recording, stop to record a video, report to the police deploy troops on garrison duty, report to the police withdraw a garrison, The Cloud Terrace rotates, in the focal length stretching one or more.
Described ANNOUNCE message comprises local media stream address information and local page reference address information, to determine to visit by point-to-point mode the URL address of encoder Media Stream or webpage from the Internet or local area network (LAN).
Effect intentionally of the present invention is the RTSP protocol function of standard is expanded, clear and definite a kind of by encoder, streaming media server, the means of communication of the flow medium live system that client is formed, make the easier realization of this live broadcast application of streaming media, and can well adapt to actual network conditions.
Embodiment
Below in conjunction with accompanying drawing, the present invention is described in further detail.
System configuration of the present invention comprises as shown in Figure 1: encoder 101, streaming media server 102 and client 103 interconnect by network.
Encoder 101 is an equipment, can be with the audio-video signal compressed encoding, and transfer out by the mode of network with Media Stream.
Streaming media server 102 generally is positioned at public network, be responsible for to receive the request of client 103 and the audio/video flow of the encoder of request is transmitted to client 103.
Client 103 is terminals of supporting that audio and video stream media is play, can be PC, mobile phone, set-top box or other-end equipment.
102 of client 103 and streaming media servers carry out according to the RTSP agreement alternately.
Encoder 101 and streaming media server 102 also have following function in the present invention.
Streaming media server 102 is used for ANNOUNCE message (notice message) the affirmation encoder 101 that received code device 101 sends when encoder 101 is reached the standard grade and reaches the standard grade; Initiate media session to encoder 101 and consult, with setting up session between described encoder; When client 103 requests are play, begin to play to playing 101 transmission PLAY message (broadcast message) requests of corresponding codes device, and encoder 101 up Media Streams are sent to client 103; When client 103 stops to play, send PAUSE message (suspending message) to stop the transmission of Media Stream to playing corresponding codes device 101.
Encoder 101 is used for sending message to streaming media server 102, and it is reached the standard grade with notification streams media server 102; Set up session with 102 of streaming media servers; When streaming media server 102 transmission PLAY message request begin to play, with the up streaming media server 102 that sends to of Media Stream; Receive streaming media server 102 to its transmission stop the message of media stream the time, stop to send Media Stream.
Encoder 101 is further used for sending the ANNOUNCE message to streaming media server 102 when it is reached the standard grade with notification streams media server 102 sending the ANNOUNCE message to streaming media server 102, it reaches the standard grade notification streams media server 102, comprises session description information in the ANNOUNCE message.
Streaming media server 102 is further used for encoder 101 is authenticated when affirmation encoder 101 is reached the standard grade, and authentication is replied 200OK message (acknowledge message) by the back, and affirmation encoder 101 is reached the standard grade.
When streaming media server 102 is play in client 103 request, be further used for being checked through play corresponding encoder 101 ready after, send PLAY message (broadcast message) to this encoder 101, play to start; The Media Stream that this encoder 101 that receives is sent is transmitted to client 103.
After encoder 101 is further used for receiving PLAY message, transmit the transmission Media Stream to streaming media server 102.
When streaming media server 102 stops to play in client 103, after being further used for being checked through the Media Stream that does not have other clients 103 receiving the transmission of broadcast corresponding codes device, send PAUSE message (suspending message) and give encoder 101, stop to play with notice.
Encoder 101 is further used for after receiving PAUSE message, replys 200 OK message to streaming media server 102, and stops to send Media Stream.
After encoder 101 also is used in and has set up session with streaming media server 102, send heartbeat message by predetermined period,, then disconnect current connection, reconnect streaming media server 102 with streaming media server 102 if send failure to streaming media server 102.Heartbeat message is an ANNOUNCE message.
After streaming media server 102 also is used in and has set up session with encoder 101, if do not detect the heartbeat message of encoder 101 in default duration, then disconnect the connection with encoder 101, this encoder 101 of mark is an off-line.
The twice of the time span that described default duration is described predetermined period or more than the twice.
Streaming media server 102 is being initiated the media session negotiation to encoder 101, is further used for when setting up session with 101 of encoders sending DESCRIBE request messages (description request message) to encoder 101; After receiving encoder 101 responses, send SETUP message (setting up message) respectively, comprise the parameter of corresponding media flow transmission in the SETUP message at the one or more Media Streams in the session.
Encoder 101 is further used for receiving streaming media server 102 after the DESCRIBE of its transmission message when setting up session with 102 of streaming media servers, reply the DESCRIBE response message to streaming media server 102, comprising SDP (Session Description Protocol, Session Description Protocol) conversation description; Receive streaming media server 102 after the SETUP of its transmission message, reply the SETUP message response, comprise the Streaming Media transmission parameters of streaming media server 102 and this encoder 101 in the SETUP message response to streaming media server 102.
The Streaming Media transmission parameters may be the UDP transmission parameter, also may be the TCP transmission parameter, specifically adopts which kind of mode by streaming media server 102 decisions.
The UDP transmission parameter of Streaming Media comprises that the UDP transmit port is right, and the UDP receiving port is right, transmission mode etc.
The TCP transmission parameter of Streaming Media comprises transmission mode, subchannel number etc.
Streaming media server 102 also is used for sending SET_PARAMETER message (parameter message is set) to encoder 101, and with configuration parameter or the operational factor that encoder 101 is set, or notice encoder 101 is carried out the Long-distance Control action.
Streaming media server 102 also is used for sending GET_PARAMETER message (acquisition parameter message) to encoder 101, with configuration parameter or the operational factor of obtaining encoder 101.
Configuration parameter comprises in video code model, video frequency coding rate, video coding frame per second, audio coding code check, the audio coding form one or more.
Operational factor comprises one or more in equipment work pattern, equipment clock, write switch, the alarm switch.
Long-distance Control action comprise equipment restart, start video recording, stop to record a video, report to the police deploy troops on garrison duty, report to the police withdraw a garrison, The Cloud Terrace rotates, in the focal length stretching one or more.
Fig. 2 is the basic interactive step flow chart between encoder and the streaming media server.
Step S201, encoder be the Connection Service device for the first time, and the initial condition sequence number be empty, and the transmission ANNOUNCE message and the MAC Address of carrying self are to streaming media server.
In the specific embodiment, the specifying information that ANNOUNCE message comprises is as follows.
rtsp://192.168.1.200/mobile/0/MAC=062F8A01004C/R402OF7kgO018Muw
RTSP/1.0\r\n
CSeq:0\r\n
Content-Type:application/sdp\r\n
Content-Length:402\r\n
User-Agent:Vbox-100\r\n
Session:23254\r\n\r\n
v=0\r\n
o=VCam?40931801?524093198141?IN?IP4?0.0.0.0\r\n
s=RTSP?Session\r\n
i=VBox?Live?Video\r\n
a=control:*\r\n
t=0?0\r\n
c=IN?IP4?192.168.1.200\r\n
a=range:npt=now-\r\n
m=video?0?RTP/AVP?96\r\n
b=AS:20\r\n
a=rtpmap:96?MP4V-ES/1000\r\n
a=fmtp:96profile-level-id=8;config=000001b008000001b509000001000000?0120008440fa282c2090a31f;decode_buf=12586\r\n
a=range:npt=now-\r\n
a=framerate:5\r\n
a=framesize:96?176-144\r\n
a=control:trackID=1\r\n
Step S202, streaming media server search this MAC Address corresponding equipment sequence number in database, if find, then this sequence number is returned to encoder; If sequence number does not exist, a newly-generated unique sequence number returns to encoder and writes database.
In the specific embodiment, the information that the 200 OK message that streaming media server sends comprise is as follows.
RTSP/1.0?200?OK\r\n
Server:VServer/1.0.1(Build/20080118;Platform/Win32;Release/StarValley;)\r\n
Cseq:0\r\n
Session:23254\r\n
Content-Type:application/serial\r\n
Content-length:16\r\n\r\n
4F5A5730054C660D
Step S203, encoder receive 200OK message, behind the acquisition sequence number, sequence number are write configuration data, resend the ANNOUNCE message that comprises sequence number then and give streaming media server.
If encoder has had sequence number, then step S201 and S202 can omit, and directly enter following ANNOUNCE information.
In the specific embodiment, the specifying information that ANNOUNCE message comprises is as follows.
rtsp://192.168.1.200/mobile/0/4F5A5730054C660D/R402OF7kgO018MuwRTSP/1.0\r\n
CSeq:1\r\n
Content-Type:application/sdp\r\n
Content-Length:402\r\n
Session:23254\r\n\r\n
v=0\r\n
o=VBox?40931801?524093198141?IN?IP4?0.0.0.0\r\n
s=RTSP?Session\r\n
i=VBox?Live?Cast\r\n
c=IN?IP4?192.168.1.200\r\n
t=0?0\r\n
a=range:npt=now-\r\n
a=control:*\r\n
m=video?0?RTP/AVP?96\r\n
b=AS:20\r\n
a=rtpmap:96?MP4V-ES/1000\r\n
a=fmtp:96?profile-level-id=8;
config=000001b008000001b509000001000000?0120008440fa282c2090a31f;
decode_buf=12586\r\n
a=range:npt=now-\r\n
a=framerate:5\r\n
a=framesize:96176-144\r\n
a=control:trackID=1\r\n
By in ANNOUNCE, increasing the address information of local media stream and local page visit,, can determine from Internet or local area network (LAN), to visit the URL address of encoder Media Stream or webpage by point-to-point mode in conjunction with streaming media server.
Obtain manner as point-to-point Media Stream address.
Can also comprise following 2 wardrobe information among the ANNOUNCE:
P2PLanURL:rtsp://192.168.1.200/mobile/0/4F5A5730054C660D/R402OF7kgO018Muw
P2PWANURL:rtsp://61.35.35.11:554/mobile/0/4F5A5730054C660D/R402OF7kgO018Muw
When client and encoder during at same local area network (LAN), client can be by the address of P2PLanURL, directly the Media Stream of access means.
When client and encoder were in 2 networks on the Internet, client can be by the address of P2PWANURL, directly the Media Stream of access means.61.35.35.11:554 is IP address and the port of the Internet of encoder place network in the last example.
If encoder is not known the internet ip address of own place network, can substitute with WANIP.
P2PWANURL:rtsp://[WANIP]:554/mobile/0/4F5A5730054C660D/R402OF7kgO018Muw
Because streaming media server is known the internet ip address of encoder place network, can obtain correct P2PWANURL. by the mode of replacing [WANIP]
Obtain manner as point-to-point accessed web page address.
Can also comprise following 2 wardrobe information among the ANNOUNCE:
LanWebURL:http://192.168.1.55:8150
WanWebURL:http://125.33.178.7:8150
When client and encoder during at same local area network (LAN), client can directly be opened the accession page of equipment this locality by LanWebURL
When client and encoder were in 2 networks on the Internet, client can directly be opened the accession page of equipment by the address of WanWebURL.125.33.178.7:8150 is IP address and the port of the Internet of encoder place network in the last example.
If encoder is not known the internet ip address of own place network, can substitute with WANIP.
WanWebURL:http://[WANIP]:8150
Because streaming media server is known the internet ip address of encoder place network, can obtain correct WanWebURL. step S204 by the mode of replacing [WANIP], the ANNOUNCE message that streaming media server response coding device sends is replied 200 OK message.
In the specific embodiment, the information that 200 OK message comprise is as follows.
RTSP/1.0?200?OK\r\n
Server:VServer/1.0.1(Build/20080118;Platform/Win32;Release/StarValley;)\r\n
Cseq:1\r\n
Session:23254\r\n\r\n
Step S205, streaming media server sends the DESCRIBE request message to encoder.
In the specific embodiment, the information that the DESCRIBE request message comprises is as follows.
rtsp://192.168.1.200/mobile/0/4F5A5730054C660D/R402OF7kgO018MuwRTSP/1.0\r\n
CSeq:1\r\n
Accept:application/sdp\r\n
User-agent:VServer/1.0.1\r\n\r\n
Step S206, the DESCRIBE request message of encoder response flow media server is replied and is carried the 200 OK message that SDP describes.
In the specific embodiment, the information that 200 OK message comprise is as follows.
RTSP/1.0?200?OK\r\n
Cseq:1\r\n
Content-Type:application/sdp\r\n
User-Agent:Vbox-100\r\n
Content-Length:402\r\n\r\n
v=0\r\n
o=MediaBox?40931801?524093198141?IN?IP4?0.0.0.0\r\n
s=RTSP?Session\r\n
i=VBox?Live?Cast\r\n
c=IN?IP4?192.168.1.200\r\n
t=0?0\r\n
a=range:npt=now-\r\n
a=control:*\r\n
m=video?0?RTP/AVP?96\r\n
b=AS:20\r\n
a=rtpmap:96?MP4V-ES/1000\r\n
a=fmtp:96?profile-level-id=8;config=000001b008000001b509000001000000?0120008440fa282c2090a31f;decode_buf=12586\r\n
a=range:npt=now-\r\n
a=framerate:5\r\n
a=framesize:96176-144\r\n
a=control:trackID=1\r\n
Step S207, streaming media server sends SETUP message to encoder, sets up video data session.
In the specific embodiment, the information that SETUP message comprises is as follows.
rtsp://192.168.1.200/mobile/0/4F5A5730054C660D/R402OF7kgO018Muw/trackID=1?RTSP/1.0\r\n
CSeq:2\r\n
Transport:RTP/AVP;unicast;client_port=7030-7031\r\n
User-agent:VServer/0.0.1\r\n\r\n
Step S208, the SETUP message of encoder response server, answer comprises 200 OK message of the transmission parameter of video session.
In the specific embodiment, the information that 200 OK message comprise is as follows.
RTSP/1.0?200?OK\r\n
Cseq:2\r\n
Session:23254\r\n
User-Agent:Vbox-100\r\n
Transport:RTP/AVP;unicast;server_port=7000-7001;client_port=7030-7031\r\n\r\n
Fig. 3 is the basic interactive step flow chart of an encoder of client-access.
Step S301, client sends the DESCRIBE request message to streaming media server.
Step S302, whether the encoder that streaming media server inspection client is asked is online, and whether client has authority to watch; If encoder is online and the client authentication is passed through, then customer in response end DESCRIBE request message is replied and is carried the 200 OK message that SDP describes; Otherwise 200 OK message of error code are carried in response.
Step S303, client sends SETUP message, sets up the video media session.
Step S304, streaming media server response SETUP message, the 200OK message of the parameter of video transmission is carried in answer.
Step S305, client sends PLAY message, request beginning video session.
Step S306, the request of streaming media server customer in response end is replied 200 OK message and is given client; Check the state of corresponding encoder simultaneously, if " ready " state sends PLAY message and starts the RTP data flow transmission to encoder.
In the specific embodiment, the information that PLAY message comprises is as follows.
rtsp://192.168.1.200/mobile/1/4F5A5730054C660D/vD3579aKONff10B6RTSP/1.0\r\n
CSeq:3\r\n
Session:23254
Range:npt=0-\r\n\r\n
After step S307, encoder receive PLAY message, reply 200 OK message.
In the specific embodiment, the information that 200 OK message comprise is as follows.
RTSP/1.0?200?OK\r\n
Cseq:3\r\n
User-Agent:Vbox-100\r\n
Session:23254\r\n\r\n
Step S308, encoder start the RTP data flow and transmit, and send to streaming media server.Streaming media server is transmitted to client with the RTP packet of receiving.
Step S309, client stops to watch, and sends TEARDOWN message (stopping message) to server.
Step S310, streaming media server is replied 200OK message to client, and checks whether encoder also has other client to watch.If no, then send PAUSE message to encoder, the notice encoder stops the RTP data flow and transmits.
In the specific embodiment, the information that PAUSE message comprises is as follows.
rtsp://192.168.1.200/mobile/0/4F5A5730054C660D/R402OF7kgO018MuwRTSP/1.0\r\n
CSeq:4\r\n
Session:23254\r\n
User-agent:VServer/0.0.1\r\n\r\n
Step S311, encoder receive PAUSE message, reply 200 OK message, stop the RTP data flow and transmit.
In the specific embodiment, the information that 200 OK message comprise is as follows.
RTSP/1.0?200?OK\r\n
Cseq:4\r\n
User-Agent:Vbox-100\r\n
Session:23254\r\n\r\n
Fig. 4 is encoder sends an interactive step flow chart from heartbeat message to streaming media server.
Online encoder regularly (30 seconds at interval) sends ANNOUNCE message to server, and on the one hand as heartbeat message, it is still online for announcement server; Can carry the random train of a variation on the other hand, be convenient to access control.
Step S401, encoder sends ANNOUNCE message to server.
In the specific embodiment, the information that ANNOUNCE message comprises is as follows.
rtsp://192.168.1.200/mobile/0/4F5A5730054C660D/vD3579aKONff10B6RTSP/1.0\r\n
CSeq:10\r\n
Content-Type:application/sdp\r\n
Content-Length:402\r\n
User-Agent:Vbox-100\r\n
Session:23254\r\n\r\n
v=0\r\n
o=VBox?40931801?524093198141?IN?IP4?0.0.0.0\r\n
s=RTSP?Session\r\n
i=VBox?Live?Video\r\n
c=IN?IP4?192.168.1.200\r\n
t=0?0\r\n
a=range:npt=now-\r\n
a=control:*\r\n
m=video?0?RTP/AVP?96\r\n
b=AS:20\r\n
a=rtpmap:96?MP4V-ES/1000\r\n
a=fmtp:96profile-level-id=8;config=000001b008000001b5090000010000000120008440fa282c2090a31f;decode_buf=12586\r\n
a=range:npt=now-\r\n
a=framerate:5\r\n
a=framesize:96?176-144\r\n
a=control:trackID=1\r\n
Step S402, streaming media server sends a reply 200OK message to encoder
In the specific embodiment, the information that 200 OK message comprise is as follows.
RTSP/1.0?200?OK\r\n
Server:VServer/1.0.1(Build/20061113;Platform/Win32;Release/StarValley;)\r\n
Cseq:10\r\n
Session:23254\r\n\r\n
Step S403-406 is with top process.
Fig. 5 carries out the basic interactive step flow chart of Long-distance Control to encoder for streaming media server.
Encoder supports that streaming media server carries out Long-distance Control by the RTSP agreement to it, and the content of control mainly is a video coding parameter.
Step S501, streaming media server send GET_PARAMETER message to encoder, obtain the configuration parameter or the operational factor of encoder.
In the specific embodiment, the information that GET_PARAMETER message comprises is as follows.
rtsp://192.168.1.200/mobile/0/4F5A5730054C660D/R402OF7kgO018MuwRTSP/1.0\r\n
CSeq:5\r\n
Content-Type:application/xmlparam\r\n
Content-Length:72
Session:23254\r\n
User-agent:VServer/1.0.1\r\n\r\n
media.session1.video.framerate\r\n
media.session5.video.framerate\r\n
media.session1.video.bitrate\r\n
media.session5.video.bitrate\r\n
Step S502, encoder reads configuration parameter, by 200 OK message configuration parameter or operational factor is returned to streaming media server.
In the specific embodiment, the information that 200 OK message comprise is as follows.
RTSP/1.0?200?OK\r\n
Cseq:5\r\n
Content-Type:application/xmlparam\r\n
Content-Length:103\r\n
User-Agent:Vbox-100\r\n
Session:23254\r\n\r\n
media.session1.video.framerate:25\r\n
media.session5.video.framerate:12\r\n
media.session1.video.bitrate:256\r\n
media.session5.video.bitrate:64\r\n
Step S503, streaming media server send SET_PARAMETER message to encoder, carry configuration parameter or operational factor in this message, or the Long-distance Control that the notice encoder is carried out is moved.
In the specific embodiment, the information that SET_PARAMETER message comprises is as follows.
rtsp://192.168.1.200/mobile/0/4F5A5730054C660D/R402OF7kgO018MuwRTSP/1.0\r\n
CSeq:6\r\n
Content-Type:application/xmlparam\r\n
Content-Length:72
Session:23254\r\n
User-agent:VServer/1.0.1\r\n\r\n
media.session1.video.framerate:20\r\n
media.session5.video.framerate:6\r\n
media.session1.video.bitrate:192\r\n
media.session5.video.bitrate:40\r\n
Step S504, encoder receives SET_PARAMETER message, and uses wherein new configuration parameter or operational factor, or carries out the Long-distance Control action, returns 200 OK and gives streaming media server.
In the specific embodiment, the information that 200 OK message comprise is as follows.
RTSP/1.0?200?OK\r\n
Cseq:6\r\n
User-Agent:Vbox-100\r\n
Session:23254\r\n\r\n
Configuration parameter comprises in video code model, video frequency coding rate, video coding frame per second, audio coding code check, the audio coding form one or more.
Operational factor comprises one or more in equipment work pattern, equipment clock, write switch, the alarm switch.
Long-distance Control action comprise equipment restart, start video recording, stop to record a video, report to the police deploy troops on garrison duty, report to the police withdraw a garrison, The Cloud Terrace rotates, in the focal length stretching one or more.
Those skilled in the art can also carry out various modifications to above content under the condition that does not break away from the definite the spirit and scope of the present invention of claims.Therefore scope of the present invention is not limited in above explanation, but determine by the scope of claims.