Sunteți pe pagina 1din 6

9/20/2016

RealtimeTransportProtocolWikipedia,thefreeencyclopedia

RealtimeTransportProtocol
FromWikipedia,thefreeencyclopedia

TheRealtimeTransportProtocol(RTP)isanetworkprotocolfordeliveringaudioandvideooverIPnetworks.
RTPisusedextensivelyincommunicationandentertainmentsystemsthatinvolvestreamingmedia,suchas
telephony,videoteleconferenceapplications,televisionservicesandwebbasedpushtotalkfeatures.
RTPtypicallyrunsoverUserDatagramProtocol(UDP).RTPisusedinconjunctionwiththeRTPControlProtocol
(RTCP).WhileRTPcarriesthemediastreams(e.g.,audioandvideo),RTCPisusedtomonitortransmission
statisticsandqualityofservice(QoS)andaidssynchronizationofmultiplestreams.RTPisoneofthetechnical
foundationsofVoiceoverIPandinthiscontextisoftenusedinconjunctionwithasignalingprotocolsuchasthe
SessionInitiationProtocol(SIP)whichestablishesconnectionsacrossthenetwork.
RTPwasdevelopedbytheAudioVideoTransportWorkingGroupoftheInternetEngineeringTaskForce(IETF)
andfirstpublishedin1996asRFC1889,supersededbyRFC3550in2003.

Contents
1 Overview
1.1 Protocolcomponents
1.2 Sessions
2 Profilesandpayloadformats
3 Packetheader
4 RTPbasedsystems
5 Standardsdocuments
6 Seealso
7 Notes
8 References
9 Externallinks

Overview
RTPisdesignedforendtoend,realtime,transferofstreamingmedia.Theprotocolprovidesfacilitiesforjitter
compensationanddetectionofoutofsequencearrivalindata,whicharecommonduringtransmissionsonanIP
network.RTPallowsdatatransfertomultipledestinationsthroughIPmulticast.[1]RTPisregardedastheprimary
standardforaudio/videotransportinIPnetworksandisusedwithanassociatedprofileandpayloadformat.[2]
Realtimemultimediastreamingapplicationsrequiretimelydeliveryofinformationandoftencantoleratesome
packetlosstoachievethisgoal.Forexample,lossofapacketinaudioapplicationmayresultinlossofafraction
ofasecondofaudiodata,whichcanbemadeunnoticeablewithsuitableerrorconcealmentalgorithms.[3]The
TransmissionControlProtocol(TCP),althoughstandardizedforRTPuse,[4]isnotnormallyusedinRTP
applicationsbecauseTCPfavorsreliabilityovertimeliness.InsteadthemajorityoftheRTPimplementationsare
builtontheUserDatagramProtocol(UDP).[3]Othertransportprotocolsspecificallydesignedformultimedia
sessionsareSCTP[5]andDCCP,[6]although,asof2010,theyarenotinwidespreaduse.

https://en.wikipedia.org/wiki/Realtime_Transport_Protocol

1/6

9/20/2016

RealtimeTransportProtocolWikipedia,thefreeencyclopedia

RTPwasdevelopedbytheAudio/VideoTransportworkinggroupoftheIETFstandardsorganization.RTPisused
inconjunctionwithotherprotocolssuchasH.323andRTSP.[2]TheRTPstandarddefinesapairofprotocols:RTP
andRTCP.RTPisusedfortransferofmultimediadata,andtheRTCPisusedtoperiodicallysendcontrol
informationandQoSparameters.[7]

Protocolcomponents
TheRTPspecificationdescribestwosubprotocols,RTPandRTCP.
Thedatatransferprotocol,RTP,facilitatesthetransferofrealtimedata.Informationprovidedbythisprotocol
includetimestamps(forsynchronization),sequencenumbers(forpacketlossandreorderingdetection)andthe
payloadformatwhichindicatestheencodedformatofthedata.[8]
ThecontrolprotocolRTCPisusedtospecifyqualityofservice(QoS)feedbackandsynchronizationbetweenthe
mediastreams.ThebandwidthofRTCPtrafficcomparedtoRTPissmall,typicallyaround5%.[8][9]
RTPsessionsaretypicallyinitiatedbetweencommunicatingpeersusingasignalingprotocol,suchasH.323,the
SessionInitiationProtocol(SIP),orJingle(XMPP).TheseprotocolsmayusetheSessionDescriptionProtocolto
negotiatetheparametersforthesessions.

Sessions
AnRTPsessionisestablishedforeachmultimediastream.AsessionconsistsofanIPaddresswithapairofports
forRTPandRTCP.Forexample,audioandvideostreamsuseseparateRTPsessions,enablingareceiverto
deselectaparticularstream.[10]TheportswhichformasessionarenegotiatedusingotherprotocolssuchasRTSP
(usingSDPinthesetupmethod)[11]andSIP.
ThespecificationrecommendsthatRTPportnumbersarechosentobeevenandthateachassociatedRTCPportbe
thenexthigheroddnumber.[12]:68However,asingleportischosenforRTPandRTCPinapplicationsthat
multiplextheprotocols.[13]RTPandRTCPtypicallyuseunprivilegedUDPports(1024to65535),[14]butmayalso
useothertransportprotocols,mostnotably,SCTPandDCCP,astheprotocoldesignistransportindependent.

Profilesandpayloadformats
OneofthedesignconsiderationsofRTPistocarryarangeofmultimediaformatsandallownewformatswithout
revisingtheRTPstandard.ThedesignofRTPisbasedonthearchitecturalprincipleknownasapplicationlevel
framing(ALF).Theinformationrequiredbyaspecificapplication'sneedsisnotincludedinthegenericRTP
header,butisinsteadprovidedthroughRTPprofilesandpayloadformats.[7]Foreachclassofapplication(e.g.,
audio,video),RTPdefinesaprofileandoneormoreassociatedpayloadformats.[7]Acompletespecificationof
RTPforaparticularapplicationusagerequiresprofileandpayloadformatspecifications.[12]:71
Theprofiledefinesthecodecsusedtoencodethepayloaddataandtheirmappingtopayloadformatcodesinthe
fieldPayloadType(PT)oftheRTPheader.Eachprofileisaccompaniedbyseveralpayloadformatspecifications,
eachofwhichdescribesthetransportofaparticularencodeddata.[2]TheaudiopayloadformatsincludeG.711,
G.723,G.726,G.729,GSM,QCELP,MP3,andDTMF,andthevideopayloadformatsincludeH.261,H.263,[15]
H.264,andMPEG4.[15][16]
ExamplesofRTPProfilesinclude:
https://en.wikipedia.org/wiki/Realtime_Transport_Protocol

2/6

9/20/2016

RealtimeTransportProtocolWikipedia,thefreeencyclopedia

TheRTPprofileforAudioandvideoconferenceswithminimalcontrol(RFC3551)definesasetofstatic
payloadtypeassignments,andamechanismformappingbetweenapayloadformat,andapayloadtype
identifier(inheader)usingSessionDescriptionProtocol(SDP).
TheSecureRealtimeTransportProtocol(SRTP)(RFC3711)definesaprofileofRTPthatprovides
cryptographicservicesforthetransferofpayloaddata.[17]
TheexperimentalControlDataProfileforRTP(RTP/CDP[18])formachinetomachinecommunications.

Packetheader
Bitoffset[a]
0

01

RTPpacketheader
2 3 47 8 915

Version P X CC M PT

1631
Sequencenumber

32

Timestamp

64

SSRCidentifier

96

CSRCidentifiers
...

96+32CC ProfilespecificextensionheaderID Extensionheaderlength


128+32CC

Extensionheader
...

TheRTPheaderhasaminimumsizeof12bytes.Aftertheheader,optionalheaderextensionsmaybepresent.This
isfollowedbytheRTPpayload,theformatofwhichisdeterminedbytheparticularclassofapplication.[19]The
fieldsintheheaderareasfollows:
Version:(2bits)Indicatestheversionoftheprotocol.Currentversionis2.[20]
P(Padding):(1bit)UsedtoindicateifthereareextrapaddingbytesattheendoftheRTPpacket.A
paddingmightbeusedtofillupablockofcertainsize,forexampleasrequiredbyanencryptionalgorithm.
Thelastbyteofthepaddingcontainsthenumberofpaddingbytesthatwereadded(including
itself).[12]:12[20]
X(Extension):(1bit)IndicatespresenceofanExtensionheaderbetweenstandardheaderandpayloaddata.
Thisisapplicationorprofilespecific.[20]
CC(CSRCcount):(4bits)ContainsthenumberofCSRCidentifiers(definedbelow)thatfollowthefixed
header.[12]:12
M(Marker):(1bit)Usedattheapplicationlevelanddefinedbyaprofile.Ifitisset,itmeansthatthe
currentdatahassomespecialrelevancefortheapplication.[12]:13
PT(Payloadtype):(7bits)Indicatestheformatofthepayloadanddeterminesitsinterpretationbythe
application.ThisisspecifiedbyanRTPprofile.Forexample,seeRTPProfileforaudioandvideo
conferenceswithminimalcontrol(RFC3551).[21]
Sequencenumber:(16bits)ThesequencenumberisincrementedbyoneforeachRTPdatapacketsentand
istobeusedbythereceivertodetectpacketlossandtorestorepacketsequence.TheRTPdoesnotspecify
anyactiononpacketlossitislefttotheapplicationtotakeappropriateaction.Forexample,video
applicationsmayplaythelastknownframeinplaceofthemissingframe.[22]AccordingtoRFC3550,the
initialvalueofthesequencenumbershouldberandomtomakeknownplaintextattacksonencryptionmore
difficult.[12]:13RTPprovidesnoguaranteeofdelivery,butthepresenceofsequencenumbersmakesit
possibletodetectmissingpackets.[1]
Timestamp:(32bits)Usedtoenablethereceivertoplaybackthereceivedsamplesatappropriateintervals.
Whenseveralmediastreamsarepresent,thetimestampsareindependentineachstream,andmaynotbe
relieduponformediasynchronization.Thegranularityofthetimingisapplicationspecific.Forexample,an
https://en.wikipedia.org/wiki/Realtime_Transport_Protocol

3/6

9/20/2016

RealtimeTransportProtocolWikipedia,thefreeencyclopedia

audioapplicationthatsamplesdataonceevery125s(8kHz,acommonsamplerateindigitaltelephony)
wouldusethatvalueasitsclockresolution.Theclockgranularityisoneofthedetailsthatisspecifiedinthe
RTPprofileforanapplication.[22]
SSRC:(32bits)Synchronizationsourceidentifieruniquelyidentifiesthesourceofastream.The
synchronizationsourceswithinthesameRTPsessionwillbeunique.[12]:15
CSRC:(32bitseach)ContributingsourceIDsenumeratecontributingsourcestoastreamwhichhasbeen
generatedfrommultiplesources.[12]:15
Headerextension:(optional)Thefirst32bitwordcontainsaprofilespecificidentifier(16bits)anda
lengthspecifier(16bits)thatindicatesthelengthoftheextension(EHL=extensionheaderlength)in32bit
units,excludingthe32bitsoftheextensionheader.[12]:17

RTPbasedsystems
AfunctionalnetworkbasedsystemincludesotherprotocolsandstandardsinconjunctionwithRTP.Protocolssuch
asSIP,Jingle,RTSP,H.225andH.245areusedforsessioninitiation,controlandtermination.Otherstandards,
suchasH.264,MPEGandH.263,areusedtoencodethepayloaddataasspecifiedviaRTPProfile.[23]
AnRTPsendercapturesthemultimediadata,thenencodes,framesandtransmitsitasRTPpacketswith
appropriatetimestampsandincreasingsequencenumbers.DependingontheRTPprofileinuse,thesendermayset
thePayloadTypefield.TheRTPreceivercapturestheRTPpackets,detectsmissingpackets,andmayreorder
packets.Itdecodestheframesaccordingtothepayloadformatandpresentsthestreamtoitsuser.[23]

Standardsdocuments
RFC1889,RTP:ATransportProtocolforRealTimeApplications,ObsoletedbyRFC3550.
RFC3550,Standard64,RTP:ATransportProtocolforRealTimeApplications
RFC3551,Standard65,RTPProfileforAudioandVideoConferenceswithMinimalControl
RFC3190,RTPPayloadFormatfor12bitDATAudioand20and24bitLinearSampledAudio
RFC6184,RTPPayloadFormatforH.264Video
RFC4103,RTPPayloadFormatforTextConversation
RFC3640,RTPPayloadFormatforTransportofMPEG4ElementaryStreams
RFC6416,RTPPayloadFormatforMPEG4Audio/VisualStreams
RFC2250,RTPPayloadFormatforMPEG1/MPEG2Video
RFC4175,RTPPayloadFormatforUncompressedVideo
RFC6295,RTPPayloadFormatforMIDI
RFC4696,AnImplementationGuideforRTPMIDI
RFC7587,RTPPayloadFormatfortheOpusSpeechandAudioCodec
RFC7656,ATaxonomyofSemanticsandMechanismsforRealTimeTransportProtocol(RTP)Sources

Seealso
SecureRealtimeTransportProtocol
RealTimeStreamingProtocol
RealDataTransport
ZRTP

Notes
a.Bitsareorderedmostsignificanttoleastsignificantbitoffset0isthemostsignificantbitofthefirstoctet.Octetsare
transmittedinnetworkorder.Bittransmissionorderismediumdependent.
https://en.wikipedia.org/wiki/Realtime_Transport_Protocol

4/6

9/20/2016

RealtimeTransportProtocolWikipedia,thefreeencyclopedia

References
1.DanielHardy(2002).Network.DeBoeckUniversit.p.298.
2.Perkins2003,p.55
3.Perkins2003,p.46
4.RFC4571
5.Farrel,Adrian(2004).TheInternetanditsprotocols.MorganKaufmann.p.363.ISBN9781558609136.
6.Ozaktas,HaldunM.LeventOnural(2007).THREEDIMENSIONALTELEVISION.Springer.p.356.ISBN9783540
725312.
7.LarryL.Peterson(2007).ComputerNetworks.MorganKaufmann.p.430.ISBN155860832X.
8.Perkins2003,p.56
9.Peterson2007,p.435
10.Zurawski,Richard(2004)."RTP,RTCPandRTSPprotocols".Theindustrialinformationtechnologyhandbook.CRC
Press.pp.287.ISBN9780849319853.
11.RFC4566:SDP:SessionDescriptionProtocol,M.Handley,V.Jacobson,C.Perkins,IETF(July2006)
12.RFC3550
13.MultiplexingRTPDataandControlPacketsonaSinglePort(https://tools.ietf.org/html/rfc5761).IETF.April2010.
RFC5761.https://tools.ietf.org/html/rfc5761.RetrievedNovember21,2015.
14.Collins,Daniel(2002)."TransportingVoicebyusingIP".CarriergradevoiceoverIP.McGrawHillProfessional.
pp.47.ISBN0071363262.
15.Chou,PhilipA.MihaelavanderSchaar(2007).MultimediaoverIPandwirelessnetworks.AcademicPress.pp.514.
ISBN0120884801.
16.Perkins2003,p.60
17.Perkins2003,p.367
18.Breese,Finley(2010).SerialCommunicationoverRTP/CDP.BoDBooksonDemand.pp.[1](https://books.google.co
m/books?id=t18ehd_vM6wC&lpg=PP1&pg=PA9).ISBN9783839184608.
19.Peterson2007,p.430
20.Peterson2007,p.431
21.Perkins2003,p.59
22.Peterson,p.432(https://books.google.com/books?id=zGVVuO6w3IC&pg=PA432)
23.Perkins2003,pp.1113

Perkins,Colin(2003),RTP,AddisonWesley,ISBN9780672322495
Peterson,LarryL.Davie,BruceS.(2007),ComputerNetworks(4ed.),MorganKaufmann,ISBN978012
3740137
"RTP".NetworkProtocolsHandbook.JavvinTechnologies.2005.ISBN9780974094526.
"RTP".BroadbandNetworks.MinistryofHumanresources,India.2008.

Externallinks
oRTP,RTPlibraryfromLinphonewritteninC(http://www.linphone.org/eng/documentation/dev/ortp.html)
HenningSchulzrinne'sRTPpage(http://www.cs.columbia.edu/~hgs/rtp)(includingFAQ(http://www.cs.colu
mbia.edu/~hgs/rtp/faq.html))
GNUccRTP(https://www.gnu.org/software/ccrtp/)
JRTPLIB,aC++RTPlibrary(http://research.edm.uhasselt.be/~jori/page/index.php?n=CS.Jrtplib)
ManagedMediaAggregation(http://net7mma.codeplex.com):.NETC#RFCcompliantimplementationof
RTP/RTCPwrittenincompletelymanagedcode.
RTPMobile.NET,anopensource.NETRTPlibrary(https://web.archive.org/web/20120509204242/http://rt
pmobile.sitesled.com/)
LScubeproject,providingafullstreamingsuiteincludingexperimentalSCTPcapability(http://lscube.org)
Retrievedfrom"https://en.wikipedia.org/w/index.php?title=Realtime_Transport_Protocol&oldid=731936948"
https://en.wikipedia.org/wiki/Realtime_Transport_Protocol

5/6

9/20/2016

RealtimeTransportProtocolWikipedia,thefreeencyclopedia

Categories: Streaming Applicationlayerprotocols VoIPterminology&concepts VoIPprotocols


Thispagewaslastmodifiedon28July2016,at13:56.
TextisavailableundertheCreativeCommonsAttributionShareAlikeLicenseadditionaltermsmayapply.
Byusingthissite,youagreetotheTermsofUseandPrivacyPolicy.Wikipediaisaregisteredtrademark
oftheWikimediaFoundation,Inc.,anonprofitorganization.

https://en.wikipedia.org/wiki/Realtime_Transport_Protocol

6/6

S-ar putea să vă placă și