"Reprint" To learn about Live media playback (RTP/RTCP and RTSP)

Source: Internet
Author: User

http://blog.csdn.net/span76/article/details/12913307

Offline media only uses the HTTP protocol to read server-side files, and for live broadcast how to achieve, here will use the RTP/RTCP protocol

Rtp/rtcp

RTP is based on UDP protocol, UDP does not have to establish a connection, more efficient, but allow packet loss, which requires more work when re-assembling the media

RTP is only the parcel content information, and RTCP is the exchange of control information, QoS is implemented through RTCP

An important concept in RTP is the session, which can be a session for an audio stream but can have multiple contributor or multiple listeners, such as a VoIP

Do real-time video streaming, first use the acquisition device, directly to the video into H. Nalu, and then through the RTP packaging, transfer to the client

One article is about how to pack Nalu with RTP.

Http://www.rosoo.net/a/201108/14896.html

RTSP

But a link is missing, and the application corresponds to play, seek, pause, stop, how to combine the application instructions with the RTP transmission.

RTSP was created to solve this problem.

RTSP is the Application layer protocol and HTTP protocol very similar to the client and the server by passing text, informing how to make rtp/rtcp information interactive

, we can see that RTSP can also use TCP to implement streaming media without RTP.

RTSP Client Connection server passes information through SDP (Session Description Protocol)

[HTML]View Plaincopy
  1. C-> S:
  2. DESCRIBE Rtsp://server.example.com/fizzle/foo rtsp/1.0 312
  3. ACCEPT:APPLICATION/SDP, APPLICATION/RTSL, Application/mheg
  4. S-> C:
  5. rtsp/1.0 312 OK
  6. Date:23 Jan 1997 15:35:06 GMT
  7. Content-type:application/sdp
  8. content-length:376
  9. v=0
  10. o=Mhandley 2890844526 2890842807 in IP4 126.16.64.4
  11. s=SDP Seminar
  12. i=A Seminar on the session Description protocol
  13. u=http://www.cs.ucl.ac.uk/staff/M.Handley/sdp.03.ps
  14. e=[email protected] (Mark Handley)
  15. c= inIP4 224.2.17.12/127
  16. t=2873397496 28973404696
  17. a=recvonly
  18. m=Audio 3456 RTP/AVP 0
  19. m=video 2232 RTP/AVP
  20. m=Whiteboard 32416 UDP WB
  21. a=orient:portrait



Session description
v= (Protocol version)
O= (Owner/creator and session identifier)
S= (Session name)
I=* (Session information)
u=* (URI of description)
e=* (email address)
p=* (phone number)
c=* (Connection Information-not required if included in all media)
b=* (zero or more bandwidth information lines)
One or more time descriptions ("t=" and "r=" lines, see below)
z=* (Time zone adjustments)
k=* (encryption key)
a=* (zero or more session attribute lines)
Zero or more Media descriptions
With this information, the client can connect to the correct RTP session

About the difference between rtmp and RTSP

Rtmp:rtm (Messaging) P is the Adobe Company's own specification for proprietary protocols developed for audio, video, and data transmission between flash players and servers.

"Reprint" To learn about Live media playback (RTP/RTCP and RTSP)

Related Article

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.