• Home
Name Date Size #Lines LOC

..--

READMED12-May-202417.4 KiB399307

TODOD12-May-2024379 169

dboolhuff.LICENSED12-May-20241.5 KiB3024

dboolhuff.cD12-May-20242.1 KiB7453

dboolhuff.hD12-May-20244.3 KiB15698

fnv1hash.cD12-May-20241.6 KiB6429

fnv1hash.hD12-May-20241.2 KiB3711

gstasteriskh263.cD12-May-20246.5 KiB227150

gstasteriskh263.hD12-May-20241.8 KiB6432

gstbuffermemory.cD12-May-20242.8 KiB12178

gstbuffermemory.hD12-May-20241.9 KiB6724

gstrtp.cD12-May-20246.2 KiB140113

gstrtpL16depay.cD12-May-20248.6 KiB297202

gstrtpL16depay.hD12-May-20242 KiB6632

gstrtpL16pay.cD12-May-20248.2 KiB260179

gstrtpL16pay.hD12-May-20241.8 KiB6231

gstrtpL24depay.cD12-May-20247.7 KiB262176

gstrtpL24depay.hD12-May-20242 KiB6632

gstrtpL24pay.cD12-May-20247.3 KiB241160

gstrtpL24pay.hD12-May-20241.8 KiB6231

gstrtpL8depay.cD12-May-20247.8 KiB266174

gstrtpL8depay.hD12-May-20241.9 KiB6432

gstrtpL8pay.cD12-May-20247.3 KiB242159

gstrtpL8pay.hD12-May-20241.9 KiB6331

gstrtpac3depay.cD12-May-20245.2 KiB177101

gstrtpac3depay.hD12-May-20241.8 KiB5728

gstrtpac3pay.cD12-May-202412.7 KiB476321

gstrtpac3pay.hD12-May-20241.8 KiB6333

gstrtpamrdepay.cD12-May-202413.7 KiB475286

gstrtpamrdepay.hD12-May-20242.2 KiB7644

gstrtpamrpay.cD12-May-202413.4 KiB462294

gstrtpamrpay.hD12-May-20242 KiB6938

gstrtpbvdepay.cD12-May-20245.5 KiB188128

gstrtpbvdepay.hD12-May-20241.7 KiB5929

gstrtpbvpay.cD12-May-20246.9 KiB237163

gstrtpbvpay.hD12-May-20241.7 KiB5929

gstrtpceltdepay.cD12-May-20248.1 KiB272196

gstrtpceltdepay.hD12-May-20241.6 KiB5329

gstrtpceltpay.cD12-May-202413.6 KiB501365

gstrtpceltpay.hD12-May-20241.7 KiB6133

gstrtpchannels.cD12-May-20248.4 KiB311200

gstrtpchannels.hD12-May-20241.8 KiB4720

gstrtpdvdepay.cD12-May-202412.7 KiB422286

gstrtpdvdepay.hD12-May-20241.9 KiB6533

gstrtpdvpay.cD12-May-202411.8 KiB398286

gstrtpdvpay.hD12-May-20241.8 KiB6836

gstrtpelement.cD12-May-20241.5 KiB4721

gstrtpelements.hD12-May-20245.3 KiB135107

gstrtpg722depay.cD12-May-20247.2 KiB259180

gstrtpg722depay.hD12-May-20242 KiB6330

gstrtpg722pay.cD12-May-20246.9 KiB233164

gstrtpg722pay.hD12-May-20241.8 KiB6030

gstrtpg723depay.cD12-May-20245.7 KiB220144

gstrtpg723depay.hD12-May-20241.8 KiB5828

gstrtpg723pay.cD12-May-20248.6 KiB304209

gstrtpg723pay.hD12-May-20241.8 KiB6332

gstrtpg726depay.cD12-May-202412 KiB390278

gstrtpg726depay.hD12-May-20241.7 KiB5732

gstrtpg726pay.cD12-May-202413 KiB419292

gstrtpg726pay.hD12-May-20241.6 KiB5430

gstrtpg729depay.cD12-May-20245.9 KiB222147

gstrtpg729depay.hD12-May-20241.7 KiB6028

gstrtpg729pay.cD12-May-202411.9 KiB395276

gstrtpg729pay.hD12-May-20241.9 KiB6534

gstrtpgsmdepay.cD12-May-20244.6 KiB14999

gstrtpgsmdepay.hD12-May-20241.8 KiB5728

gstrtpgsmpay.cD12-May-20245.4 KiB178117

gstrtpgsmpay.hD12-May-20241.7 KiB5928

gstrtpgstdepay.cD12-May-202415.7 KiB608450

gstrtpgstdepay.hD12-May-20241.9 KiB6534

gstrtpgstpay.cD12-May-202420.4 KiB700486

gstrtpgstpay.hD12-May-20242 KiB7240

gstrtph261depay.cD12-May-20248.7 KiB290194

gstrtph261depay.hD12-May-20241.9 KiB5932

gstrtph261pay.cD12-May-202429.7 KiB1,069860

gstrtph261pay.hD12-May-20243.5 KiB9963

gstrtph263depay.cD12-May-202413.6 KiB444295

gstrtph263depay.hD12-May-20242.1 KiB6534

gstrtph263pay.cD12-May-202454.3 KiB1,8711,405

gstrtph263pay.hD12-May-202413.9 KiB414299

gstrtph263pdepay.cD12-May-202414.2 KiB494344

gstrtph263pdepay.hD12-May-20241.9 KiB6131

gstrtph263ppay.cD12-May-202426.2 KiB815568

gstrtph263ppay.hD12-May-20242 KiB6938

gstrtph264depay.cD12-May-202445.7 KiB1,5131,090

gstrtph264depay.hD12-May-20242.6 KiB9352

gstrtph264pay.cD12-May-202454.8 KiB1,8261,301

gstrtph264pay.hD12-May-20242.8 KiB11067

gstrtph265depay.cD12-May-202453.2 KiB1,6401,165

gstrtph265depay.hD12-May-20243.1 KiB11674

gstrtph265pay.cD12-May-202456.2 KiB1,8271,295

gstrtph265pay.hD12-May-20242.5 KiB9257

gstrtph265types.hD12-May-20242.4 KiB7744

gstrtphdrext-colorspace.cD12-May-202414 KiB484367

gstrtphdrext-colorspace.hD12-May-20241.5 KiB4212

gstrtpilbcdepay.cD12-May-20246.8 KiB236168

gstrtpilbcdepay.hD12-May-20241.9 KiB6433

gstrtpilbcpay.cD12-May-20246.7 KiB225159

gstrtpilbcpay.hD12-May-20241.8 KiB5929

gstrtpisacdepay.cD12-May-20244.3 KiB14892

gstrtpisacdepay.hD12-May-20241,017 3210

gstrtpisacpay.cD12-May-20245.2 KiB184119

gstrtpisacpay.hD12-May-2024993 329

gstrtpj2kcommon.hD12-May-20243 KiB10339

gstrtpj2kdepay.cD12-May-202419.3 KiB665464

gstrtpj2kdepay.hD12-May-20242 KiB7240

gstrtpj2kpay.cD12-May-202417.4 KiB568377

gstrtpj2kpay.hD12-May-20241.7 KiB5730

gstrtpjpegdepay.cD12-May-202423.9 KiB796563

gstrtpjpegdepay.hD12-May-20242 KiB7037

gstrtpjpegpay.cD12-May-202428.9 KiB1,054745

gstrtpjpegpay.hD12-May-20241.8 KiB6233

gstrtpklvdepay.cD12-May-202411.3 KiB394259

gstrtpklvdepay.hD12-May-20242.1 KiB6433

gstrtpklvpay.cD12-May-20246 KiB201118

gstrtpklvpay.hD12-May-20241.8 KiB5929

gstrtpldacpay.cD12-May-20247.5 KiB229129

gstrtpldacpay.hD12-May-20241.8 KiB5729

gstrtpmp1sdepay.cD12-May-20244.2 KiB14093

gstrtpmp1sdepay.hD12-May-20241.8 KiB5729

gstrtpmp2tdepay.cD12-May-20246.9 KiB240164

gstrtpmp2tdepay.hD12-May-20241.8 KiB5930

gstrtpmp2tpay.cD12-May-20247.1 KiB236158

gstrtpmp2tpay.hD12-May-20241.8 KiB6332

gstrtpmp4adepay.cD12-May-202413.6 KiB463323

gstrtpmp4adepay.hD12-May-20241.8 KiB6333

gstrtpmp4apay.cD12-May-202412.8 KiB462314

gstrtpmp4apay.hD12-May-20241.9 KiB6434

gstrtpmp4gdepay.cD12-May-202427.2 KiB812545

gstrtpmp4gdepay.hD12-May-20242.4 KiB8852

gstrtpmp4gpay.cD12-May-202418.5 KiB638416

gstrtpmp4gpay.hD12-May-20242 KiB7140

gstrtpmp4vdepay.cD12-May-20246.5 KiB224152

gstrtpmp4vdepay.hD12-May-20241.8 KiB6030

gstrtpmp4vpay.cD12-May-202418.1 KiB641449

gstrtpmp4vpay.hD12-May-20242.1 KiB7339

gstrtpmpadepay.cD12-May-20245.4 KiB178116

gstrtpmpadepay.hD12-May-20241.8 KiB5728

gstrtpmpapay.cD12-May-20249.8 KiB342231

gstrtpmpapay.hD12-May-20241.8 KiB6232

gstrtpmparobustdepay.cD12-May-202425.1 KiB809598

gstrtpmparobustdepay.hD12-May-20242.4 KiB7740

gstrtpmpvdepay.cD12-May-20246 KiB195121

gstrtpmpvdepay.hD12-May-20241.8 KiB5728

gstrtpmpvpay.cD12-May-20249.5 KiB333228

gstrtpmpvpay.hD12-May-20241.8 KiB6332

gstrtpopusdepay.cD12-May-20248.4 KiB259192

gstrtpopusdepay.hD12-May-20241.8 KiB5827

gstrtpopuspay.cD12-May-202412.8 KiB428295

gstrtpopuspay.hD12-May-20241.9 KiB6430

gstrtppcmadepay.cD12-May-20244.9 KiB161108

gstrtppcmadepay.hD12-May-20241.6 KiB5228

gstrtppcmapay.cD12-May-20243.8 KiB11370

gstrtppcmapay.hD12-May-20241.5 KiB5328

gstrtppcmudepay.cD12-May-20244.9 KiB162109

gstrtppcmudepay.hD12-May-20241.6 KiB5228

gstrtppcmupay.cD12-May-20243.8 KiB11370

gstrtppcmupay.hD12-May-20241.5 KiB5328

gstrtpqcelpdepay.cD12-May-202411.2 KiB429291

gstrtpqcelpdepay.hD12-May-20241.9 KiB6131

gstrtpqdmdepay.cD12-May-202412.3 KiB412300

gstrtpqdmdepay.hD12-May-20242.4 KiB8447

gstrtpreddec.cD12-May-202421 KiB667499

gstrtpreddec.hD12-May-20241.9 KiB6932

gstrtpredenc.cD12-May-202418.9 KiB589449

gstrtpredenc.hD12-May-20242 KiB6936

gstrtpsbcdepay.cD12-May-202411.6 KiB392283

gstrtpsbcdepay.hD12-May-20242 KiB6936

gstrtpsbcpay.cD12-May-202411.2 KiB373271

gstrtpsbcpay.hD12-May-20241.9 KiB6432

gstrtpsirendepay.cD12-May-20243.8 KiB12277

gstrtpsirendepay.hD12-May-20241.8 KiB5827

gstrtpsirenpay.cD12-May-20244.7 KiB14494

gstrtpsirenpay.hD12-May-20241.8 KiB5628

gstrtpspeexdepay.cD12-May-20246.4 KiB223161

gstrtpspeexdepay.hD12-May-20241.6 KiB5228

gstrtpspeexpay.cD12-May-20249.4 KiB347254

gstrtpspeexpay.hD12-May-20241.5 KiB5529

gstrtpstorage.cD12-May-20247.2 KiB222137

gstrtpstorage.hD12-May-20241.8 KiB6029

gstrtpstreamdepay.cD12-May-20247.8 KiB229153

gstrtpstreamdepay.hD12-May-20241.8 KiB5728

gstrtpstreampay.cD12-May-20248.9 KiB283200

gstrtpstreampay.hD12-May-20241.9 KiB5322

gstrtpsv3vdepay.cD12-May-20249.3 KiB317212

gstrtpsv3vdepay.hD12-May-20241.9 KiB6634

gstrtptheoradepay.cD12-May-202421.8 KiB704455

gstrtptheoradepay.hD12-May-20242.1 KiB7138

gstrtptheorapay.cD12-May-202429.5 KiB982681

gstrtptheorapay.hD12-May-20242.5 KiB8549

gstrtpulpfecdec.cD12-May-202423.5 KiB722532

gstrtpulpfecdec.hD12-May-20242.4 KiB8548

gstrtpulpfecenc.cD12-May-202426.1 KiB833604

gstrtpulpfecenc.hD12-May-20242.5 KiB10160

gstrtputils.cD12-May-20244.4 KiB154108

gstrtputils.hD12-May-20241.8 KiB5523

gstrtpvorbisdepay.cD12-May-202421.4 KiB708462

gstrtpvorbisdepay.hD12-May-20242.1 KiB6937

gstrtpvorbispay.cD12-May-202430.2 KiB1,003704

gstrtpvorbispay.hD12-May-20242.4 KiB8448

gstrtpvp8depay.cD12-May-202417.5 KiB564432

gstrtpvp8depay.hD12-May-20242.6 KiB8245

gstrtpvp8pay.cD12-May-202420.6 KiB728514

gstrtpvp8pay.hD12-May-20242.4 KiB7644

gstrtpvp9depay.cD12-May-202416.9 KiB529400

gstrtpvp9depay.hD12-May-20242.5 KiB8043

gstrtpvp9pay.cD12-May-202416.6 KiB564382

gstrtpvp9pay.hD12-May-20242.2 KiB7140

gstrtpvrawdepay.cD12-May-202418.1 KiB664504

gstrtpvrawdepay.hD12-May-20242 KiB7038

gstrtpvrawpay.cD12-May-202420.3 KiB662486

gstrtpvrawpay.hD12-May-20241.9 KiB6633

meson.buildD12-May-20242.9 KiB129126

rtpredcommon.cD12-May-20242.5 KiB9157

rtpredcommon.hD12-May-20242.6 KiB8137

rtpstorage.cD12-May-20246.8 KiB260190

rtpstorage.hD12-May-20242.6 KiB7039

rtpstoragestream.cD12-May-20248 KiB278193

rtpstoragestream.hD12-May-20242.7 KiB6334

rtpulpfeccommon.cD12-May-202413 KiB448339

rtpulpfeccommon.hD12-May-20246.4 KiB16390

README

1This directory contains some RTP payloaders/depayloaders for different payload
2types. Use one payloader/depayloder pair per payload. If several payloads can be
3payloaded/depayloaded by the same element, make different copies of it, one for
4each payload.
5
6The application/x-rtp mime type
7-------------------------------
8
9For valid RTP packets encapsulated in GstBuffers, we use the caps with
10mime type application/x-rtp.
11
12The following fields can or must (*) be specified in the structure:
13
14 * media: (String) [ "audio", "video", "application", "data", "control" ]
15     Defined in RFC 2327 in the SDP media announcement field.
16     Converted to lower case.
17
18 * payload: (int) [0, 127]
19     For audio and video, these will normally be a media payload type as
20     defined in the RTP Audio/Video Profile. For dynamically allocated
21     payload types, this value will be >= 96 and the encoding-name must be
22     set.
23
24 * clock-rate: (int) [0 - MAXINT]
25    The RTP clock rate.
26
27   encoding-name: (String) ANY
28     typically second part of the mime type. ex. MP4V-ES. only required if
29     payload type >= 96. Converted to upper case.
30
31   encoding-params: (String) ANY
32     extra encoding parameters (as in the SDP a=rtpmap: field). only required
33     if different from the default of the encoding-name.
34     Converted to lower-case.
35
36   ssrc: (uint) [0 - MAXINT]
37    The ssrc value currently in use. (default = the SSRC of the first RTP
38    packet)
39
40   timestamp-offset: (uint) [0 - MAXINT]
41    The RTP time representing time npt-start. (default = rtptime of first RTP
42    packet).
43
44   seqnum-offset: (uint) [0 - MAXINT]
45    The RTP sequence number representing the first rtp packet. When this
46    parameter is given, all sequence numbers below this seqnum should be
47    ignored. (default = seqnum of first RTP packet).
48
49   npt-start: (uint64) [0 - MAXINT]
50    The Normal Play Time for clock-base. This is the position in the stream and
51    is between 0 and the duration of the stream. This value is expressed in
52    nanoseconds GstClockTime. (default = 0)
53
54   npt-stop: (uint64) [0 - MAXINT]
55    The last position in the stream. This value is expressed in nanoseconds
56    GstClockTime. (default = -1, stop unknown)
57
58   play-speed: (gdouble) [-MIN - MAX]
59    The intended playback speed of the stream. The client is delivered data at
60    the adjusted speed. The client should adjust its playback speed with this
61    value and thus corresponds to the GStreamer rate field in the NEWSEGMENT
62    event. (default = 1.0)
63
64   play-scale: (gdouble) [-MIN - MAX]
65    The rate already applied to the stream. The client is delivered a stream
66    that is scaled by this amount. This value is used to adjust position
67    reporting and corresponds to the GStream applied-rate field in the
68    NEWSEGMENT event. (default = 1.0)
69
70   maxptime: (uint) [0, MAX]
71    The maxptime as defined in RFC 4566, this defines the maximum size of a
72    packet. It overrides the max-ptime property of payloaders.
73
74   Optional parameters as key/value pairs, media type specific. The value type
75   should be of type G_TYPE_STRING. The key is converted to lower-case. The
76   value is left in its original case.
77   A parameter with no value is converted to <param>=1.
78
79 Example:
80
81  "application/x-rtp",
82      "media", G_TYPE_STRING, "audio",		-.
83      "payload", G_TYPE_INT, 96,                 | - required
84      "clock-rate", G_TYPE_INT, 8000,           -'
85      "encoding-name", G_TYPE_STRING, "AMR",    -. - required since payload >= 96
86      "encoding-params", G_TYPE_STRING, "1",	-' - optional param for AMR
87      "octet-align", G_TYPE_STRING, "1",	-.
88      "crc", G_TYPE_STRING, "0",                 |
89      "robust-sorting", G_TYPE_STRING, "0",      |  AMR specific params.
90      "interleaving", G_TYPE_STRING, "0",       -'
91
92 Mapping of caps to and from SDP fields:
93
94   m=<media> <udp port> RTP/AVP <payload>       -] media and payload from caps
95   a=rtpmap:<payload> <encoding-name>/<clock-rate>[/<encoding-params>]
96              -> when <payload> >= 96
97   a=fmtp:<payload> <param>=<value>;...
98
99 For above caps:
100
101   m=audio <udp port> RTP/AVP 96
102   a=rtpmap:96 AMR/8000/1
103   a=fmtp:96 octet-align=1;crc=0;robust-sorting=0;interleaving=0
104
105 Attributes are converted as follows:
106
107  IANA registered attribute names are prepended with 'a-' before putting them in
108  the caps. Unregistered keys (starting with 'x-') are copied directly into the
109  caps.
110
111 in RTSP, the SSRC is also sent.
112
113 The optional parameters in the SDP fields are case insensitive. In the caps we
114 always use the lowercase names so that the SDP -> caps mapping remains
115 possible.
116
117 Mapping of caps to NEWSEGMENT:
118
119  rate:         <play-speed>
120  applied-rate: <play-scale>
121  format:       GST_FORMAT_TIME
122  start:        <clock-base> * GST_SECOND / <clock-rate>
123  stop:         if <ntp-stop> != -1
124                  <npt-stop> - <npt-start> + start
125		else
126		  -1
127  time:         <npt-start>
128
129
130Timestamping
131------------
132
133RTP in GStreamer uses a combination of the RTP timestamps and GStreamer buffer
134timestamps to ensure proper synchronisation at the sender and the receiver end.
135
136In RTP applications, the synchronisation is most complex at the receiver side.
137
138At the sender side, the RTP timestamps are generated in the payloaders based on
139GStreamer timestamps. At the receiver, GStreamer timestamps are reconstructed
140from the RTP timestamps and the GStreamer timestamps in the jitterbuffer. This
141process is explained in more detail below.
142
143= synchronisation at the sender
144
145Individual streams at the sender are synchronised using GStreamer timestamps.
146The payloader at the sender will convert the GStreamer timestamp into an RTP
147timestamp using the following formula:
148
149   RTP = ((RT - RT-base) * clock-rate / GST_SECOND) + RTP-offset
150
151  RTP:        the RTP timestamp for the stream. This value is truncated to
152              32 bits.
153  RT:         the GStreamer running time corresponding to the timestamp of the
154              packet to payload
155  RT-base:    the GStreamer running time of the first packet encoded
156  clock-rate: the clock-rate of the stream
157  RTP-offset: a random RTP offset
158
159The RTP timestamp corresponding to RT-base is the clock-base (see caps above).
160
161In addition to setting an RTP timestamp in the RTP packet, the payloader is also
162responsible for putting the GStreamer timestamp on the resulting output buffer.
163This timestamp is used for further synchronisation at the sender pipeline, such
164as for sending out the packet on the network.
165
166Notice that the absolute timing information is lost; if the sender is sending
167multiple streams, the RTP timestamps in the packets do not contain enough
168information to synchronize them in the receiver. The receiver can however use
169the RTP timestamps to reconstruct the timing of the stream as it was created by
170the sender according to the sender's clock.
171
172Because the payloaded packet contains both an RTP timestamp and a GStreamer
173timestamp, it is possible for an RTP session manager to derive the relation
174between the RTP and GST timestamps. This information is used by a session
175manager to create SR reports. The NTP time in the report will contain the
176running time converted to NTP time and the corresponding RTP timestamp.
177
178Note that at the sender side, the RTP and GStreamer timestamp both increment at
179the same rate, the sender rate. This rate depends on the global pipeline clock
180of the sender.
181
182Some pipelines to illustrate the process:
183
184    gst-launch-1.0 v4l2src ! videoconvert ! avenc_h263p ! rtph263ppay ! udpsink
185
186  v4l2src puts a GStreamer timestamp on the video frames base on the current
187  running_time. The encoder encodes and passed the timestamp on. The payloader
188  generates an RTP timestamp using the above formula and puts it in the RTP
189  packet. It also copies the incoming GStreamer timestamp on the output RTP
190  packet. udpsink synchronizes on the gstreamer timestamp before pushing out the
191  packet.
192
193
194= synchronisation at the receiver
195
196The receiver is responsible for timestamping the received RTP packet with the
197running_time of the clock at the time the packet was received. This GStreamer
198timestamp reflects the receiver rate and depends on the global pipeline clock of
199the receiver. The gstreamer timestamp of the received RTP packet contains a
200certain amount of jitter introduced by the network.
201
202The most simple option for the receiver is to depayload the RTP packet and play
203it back as soon as possible, this is with the timestamp when it was received
204from the network. For the above sender pipeline this would be done with the
205following pipeline:
206
207    gst-launch-1.0 udpsrc caps="application/x-rtp, media=(string)video,
208      clock-rate=(int)90000, encoding-name=(string)H263-1998" ! rtph263pdepay !
209      avdec_h263 ! autovideosink
210
211It is important that the depayloader copies the incoming GStreamer timestamp
212directly to the depayloaded output buffer. It should never attempt to perform
213any logic with the RTP timestamp, this task is for the jitterbuffer as we will
214see next.
215
216The above pipeline does not attempt to deal with reordered packets or network
217jitter, which could result in jerky playback in the case of high jitter or
218corrupted video in the case of packet loss or reordering. This functionality is
219performed by the gstrtpjitterbuffer in GStreamer.
220
221The task of the gstrtpjitterbuffer element is to:
222
223 - deal with reordered packets based on the seqnum
224 - calculate the drift between the sender and receiver clocks using the
225   GStreamer timestamps (receiver clock rate) and RTP timestamps (sender clock
226   rate).
227
228To deal with reordered packet, the jitterbuffer holds on to the received RTP
229packets in a queue for a configurable amount of time, called the latency.
230
231The jitterbuffer also eliminates network jitter and then tracks the drift
232between the local clock (as expressed in the GStreamer timestamps) and the
233remote clock (as expressed in the RTP timestamps). It will remove the jitter
234and will apply the drift correction to the GStreamer timestamp before pushing
235the buffer downstream. The result is that the depayloader receives a smoothed
236GStreamer timestamp on the RTP packet, which is copied to the depayloaded data.
237
238The following pipeline illustrates a receiver with a jitterbuffer.
239
240    gst-launch-1.0 udpsrc caps="application/x-rtp, media=(string)video,
241      clock-rate=(int)90000, encoding-name=(string)H263-1998" !
242      rtpjitterbuffer latency=100 ! rtph263pdepay !  avdec_h263 ! autovideosink
243
244The latency property on the jitterbuffer controls the amount of delay (in
245milliseconds) to apply to the outgoing packets. A higher latency will produce
246smoother playback in networks with high jitter but cause a higher latency.
247Choosing a good value for the latency is a tradeoff between the quality and
248latency. The better the network, the lower the latency can be set.
249
250
251usage with UDP
252--------------
253
254To correctly and completely use the RTP payloaders on the sender and the
255receiver you need to write an application. It is not possible to write a full
256blown RTP server with a single gst-launch-1.0 line.
257
258That said, it is possible to do something functional with a few gst-launch
259lines. The biggest problem when constructing a correct gst-launch-1.0 line lies on
260the receiver end.
261
262The receiver needs to know about the type of the RTP data along with a set of
263RTP configuration parameters. This information is usually transmitted to the
264client using some sort of session description language (SDP) over some reliable
265channel (HTTP/RTSP/...).
266
267All of the required parameters to connect and use the RTP session on the
268server can be found in the caps on the server end. The client receives this
269information in some way (caps are converted to and from SDP, as explained above,
270for example).
271
272Some gst-launch-1.0 lines:
273
274  gst-launch-1.0 -v videotestsrc ! videoconvert ! avenc_h263p ! rtph263ppay ! udpsink
275
276   Setting pipeline to PAUSED ...
277   /pipeline0/videotestsrc0.src: caps = video/x-raw, format=(string)I420,
278   width=(int)320, height=(int)240, framerate=(fraction)30/1
279   Pipeline is PREROLLING ...
280   ....
281   /pipeline0/udpsink0.sink: caps = application/x-rtp, media=(string)video,
282   payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H263-1998,
283   ssrc=(guint)527842345, clock-base=(guint)1150776941, seqnum-base=(guint)30982
284   ....
285   Pipeline is PREROLLED ...
286   Setting pipeline to PLAYING ...
287   New clock: GstSystemClock
288
289 Write down the caps on the udpsink and set them as the caps of the UDP
290 receiver:
291
292  gst-launch-1.0 -v udpsrc caps="application/x-rtp, media=(string)video,
293  payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H263-1998,
294  ssrc=(guint)527842345, clock-base=(guint)1150776941, seqnum-base=(guint)30982"
295  ! rtph263pdepay ! avdec_h263 ! autovideosink
296
297 The receiver now displays an h263 image. Since there is no jitterbuffer in the
298 pipeline, frames will be displayed at the time when they are received. This can
299 result in jerky playback in the case of high network jitter or corrupted video
300 when packets are dropped or reordered.
301
302 Stream a quicktime file with mpeg4 video and AAC audio on port 5000 and port
303 5002.
304
305  gst-launch-1.0 -v filesrc location=~/data/sincity.mp4 ! qtdemux name=d ! queue ! rtpmp4vpay ! udpsink port=5000
306                         d. ! queue ! rtpmp4gpay ! udpsink port=5002
307    ....
308    /pipeline0/udpsink0.sink: caps = application/x-rtp, media=(string)video,
309    payload=(int)96, clock-rate=(int)90000, encoding-name=(string)MP4V-ES,
310    ssrc=(guint)1162703703, clock-base=(guint)816135835, seqnum-base=(guint)9294,
311    profile-level-id=(string)3, config=(string)000001b003000001b50900000100000001200086c5d4c307d314043c1463000001b25876694430303334
312    /pipeline0/udpsink1.sink: caps = application/x-rtp, media=(string)audio,
313    payload=(int)96, clock-rate=(int)44100, encoding-name=(string)MPEG4-GENERIC,
314    ssrc=(guint)3246149898, clock-base=(guint)4134514058, seqnum-base=(guint)57633,
315    encoding-params=(string)2, streamtype=(string)5, profile-level-id=(string)1,
316    mode=(string)aac-hbr, config=(string)1210, sizelength=(string)13,
317    indexlength=(string)3, indexdeltalength=(string)3
318    ....
319
320 Again copy the caps on both sinks to the receiver launch line
321
322    gst-launch-1.0
323     udpsrc port=5000 caps="application/x-rtp, media=(string)video, payload=(int)96,
324      clock-rate=(int)90000, encoding-name=(string)MP4V-ES, ssrc=(guint)1162703703,
325      clock-base=(guint)816135835, seqnum-base=(guint)9294, profile-level-id=(string)3,
326      config=(string)000001b003000001b50900000100000001200086c5d4c307d314043c1463000001b25876694430303334"
327      ! rtpmp4vdepay ! ffdec_mpeg4 ! autovideosink sync=false
328     udpsrc port=5002 caps="application/x-rtp, media=(string)audio, payload=(int)96,
329      clock-rate=(int)44100, encoding-name=(string)MPEG4-GENERIC, ssrc=(guint)3246149898,
330      clock-base=(guint)4134514058, seqnum-base=(guint)57633, encoding-params=(string)2,
331      streamtype=(string)5, profile-level-id=(string)1, mode=(string)aac-hbr,
332      config=(string)1210, sizelength=(string)13, indexlength=(string)3,
333      indexdeltalength=(string)3"
334      ! rtpmp4gdepay ! faad ! alsasink sync=false
335
336 The caps on the udpsinks can be retrieved when the server pipeline prerolled to
337 PAUSED.
338
339 The above pipeline sets sync=false on the audio and video sink which means that
340 no synchronisation will be performed in the sinks, they play the data when it
341 arrives. If you want to enable synchronisation in the sinks it is highly
342 recommended to use a gstrtpjitterbuffer after the udpsrc elements.
343
344 Even when sync is enabled, the two different streams will not play synchronised
345 against each other because the receiver does not have enough information to
346 perform this task. For this you need to add the rtpbin element in both the
347 sender and receiver pipeline and use additional sources and sinks to transmit
348 RTCP packets used for inter-stream synchronisation.
349
350 The caps on the receiver side can be set on the UDP source elements when the
351 pipeline went to PAUSED. In that state no data is received from the UDP sources
352 as they are live sources and only produce data in PLAYING.
353
354
355Relevant RFCs
356-------------
357
3583550 RTP: A Transport Protocol for Real-Time Applications. ( 1889 Obsolete )
359
3602198 RTP Payload for Redundant Audio Data.
3613119 A More Loss-Tolerant RTP Payload Format for MP3 Audio.
362
3632793 RTP Payload for Text Conversation.
364
3652032 RTP Payload Format for H.261 Video Streams.
3662190 RTP Payload Format for H.263 Video Streams.
3672250 RTP Payload Format for MPEG1/MPEG2 Video.
3682343 RTP Payload Format for Bundled MPEG.
3692429 RTP Payload Format for the 1998 Version of ITU-T Rec. H.263 Video
3702431 RTP Payload Format for BT.656 Video Encoding.
3712435 RTP Payload Format for JPEG-compressed Video.
3723016 RTP Payload Format for MPEG-4 Audio/Visual Streams.
3733047 RTP Payload Format for ITU-T Recommendation G.722.1.
3743189 RTP Payload Format for DV (IEC 61834) Video.
3753190 RTP Payload Format for 12-bit DAT Audio and 20- and 24-bit Linear Sampled Audio.
3763389 Real-time Transport Protocol (RTP) Payload for Comfort Noise (CN)
3772733 An RTP Payload Format for Generic Forward Error Correction.
3782833 RTP Payload for DTMF Digits, Telephony Tones and Telephony
379     Signals.
3802862 RTP Payload Format for Real-Time Pointers.
3813351 RTP Profile for Audio and Video Conferences with Minimal Control. ( 1890 Obsolete )
3823555 MIME Type Registration of RTP Payload Formats.
383
3842508 Compressing IP/UDP/RTP Headers for Low-Speed Serial Links.
3851305 Network Time Protocol (Version 3) Specification, Implementation and Analysis.
3863339 Date and Time on the Internet: Timestamps.
3872246 The TLS Protocol Version 1.0
3883546 Transport Layer Security (TLS) Extensions. ( Updates 2246 )
389
390do we care?
391-----------
392
3932029 RTP Payload Format of Sun's CellB Video Encoding.
394
395useful
396------
397
398http://www.iana.org/assignments/rtp-parameters
399