-
Notifications
You must be signed in to change notification settings - Fork 2
/
IdentityTimingRTP.txt
400 lines (254 loc) · 13.2 KB
/
IdentityTimingRTP.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
NMOS Mapping of Identity and Timing Information to RTP
(DRAFT 07, May 2016)
1. Scope
This specification describes a mapping of Source and Flow identifiers and
PTP-derived Grain timestamps to a Real-time Transport Protocol (RTP) [1] stream
using the audio and video conferences profile (AVP) [2] for the carriage of
synchronised video data, audio data, or other time-related data.
Source, Flow and Grain are as defined in the JT-NM Reference Architecture 1.0
[3], also described informatively in the NMOS Technical Overview.
Although uncompressed video and audio examples are presented, this specification
does NOT define a payload format, and is intended to be payload format agnostic.
As such, it can be applied to any payload format using the standard RTP header
structure.
2. Grain (informative)
This specification uses the concept of a Grain to describe a unit of
mono-essence video, audio or other time-related data.
A video Grain contains a single video frame.
An audio Grain contains audio sample data from one or more audio channels.
A data Grain contains generic time-related data.
All types of Grain contain intimate metadata that is associated with the Grain's
mono-essence payload, providing it with identity and timing.
3. Payload Formats (informative)
By using RTP without modification to existing RFCs, the core NMOS RTP
specification remains codec agnostic. The following payload profiles are
included as examples given their simple uncompressed nature. Other payload
profiles (and variants of the examples below) are also supported, with reference
to an appropriate external specification.
3.1. RFC 4175 RTP Format (informative)
RFC 4175 [4] defines a payloading format for the carriage of uncompressed video
over RTP. Both progressive and interlaced scanning are supported.
3.2. Linear PCM RTP Format (informative)
RFC 3551 [2] and RFC 3190 [5] define payloading formats for L16 and L24
uncompressed audio.
4. Intimate Metadata RTP Format
A number of intimate metadata items are referenced in this specification:
- PTP Sync (IEEE 1588-2008) Timestamp [6]
- PTP Origin (IEEE 1588-2008) Timestamp [6]
- SMPTE ST 12-1 (SMPTE 12M) Timecodes [7]
- Flow Identifier
- Source Identifier
- Grain Duration
The Sync Timestamp provides an absolute capture or playback timestamp for the
Grain essence data. Two coincident audio and video Grains would share the same
Sync Timestamp, which remains associated with them as they pass through
processing devices.
The Origin Timestamp provides an absolute capture timestamp for the Grain
essence data. When capturing from a live source this should match the Sync
Timestamp. When replaying stored essence this will be populated from the Origin
Timestamp of the stored Grain.
SMPTE 12M Timecodes (e.g. LTC) are time labels for the Grain. The audio and
video data in coincident Grains typically have the same Timecodes. Timecode may
be omitted from Grains in cases where it is not available.
A Flow is a sequence of video or audio data with a fixed Source (uniquely
identified - see below) and encoding parameters. What is considered to be fixed
encoding parameters is beyond the scope of this specification. The Flow
Identifier is used to uniquely identify each Flow.
The Source Identifier uniquely identifies the Source for a Flow. What is
considered to be a Source (e.g. camera, SDI capture device) is beyond the scope
of this specification. A Source may have multiple Flows, each representing
different renditions of the Source data. E.g. a compressed flow will have the
same Source Identifier as an uncompressed Flow of the same Source data.
The Grain duration identifies the time period for which video essence within the
Grain should be displayed, or the time period within which the audio essence
should be played back. Data Grains may use the duration to signal a display
period or validity period as appropriate. Instantaneous Data Grains identifying
events should signal a duration of zero.
5. RTP Stream
The RTP stream consists of a sequence of RTP packets. Each packet consists
of a header, optional header extensions and payload data.
The first and last packet of a Grain in an RTP stream contains header
extensions. The header extensions in the first packet include the intimate
metadata and the Grain flags. The last packet contains the Grain flags.
5.3. RTP Packet Header Extensions
The following header extensions are defined in this specification:
1. PTP Sync Timestamp
2. PTP Origin Timestamp
3. SMPTE ST 12-1 (SMPTE 12M) Timecodes (optional)
4. Flow Identifier
5. Source Identifier
6. Grain Duration (optional)
7. Grain Flags
Header extensions 1-7 are present in the first packet and 7 is present in the
last packet. Header extension 3 may be omitted entirely from the first packet
if no timecode is available.
The maximum additional size of the 7 header extensions listed above is 80 bytes
and for the 1 header extension in the last packet it is 8 bytes (which includes
2 padding bytes).
The one-byte header form of extension specified in [8] is used. This allows a
maximum individual extension size of 16 bytes excluding the header. The format
is as follows:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| identifier | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| header extensions |
| .... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
identifier: 16 bits
The value shall be 0xBEDE. This identifies the one-byte header extension
form specified in [8].
length: 16 bits
Equals the size of the header extensions in 32-bit units. The size does not
include the 4 byte extension header.
The header extensions consists of extension data bytes and padding bytes. The
total header extensions size shall be a multiple of 4 bytes.
Zero or more padding bytes may be used between header extensions or at the
end of the header extensions. Padding is used to get the header extensions size
to be a multiple of 4 bytes. A padding byte is a zero byte.
Each extension starts with a one byte header using the following form:
0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
| id | len |
+-+-+-+-+-+-+-+-+
identifier (id): 4 bits
Local identifier for the extension. The value shall be 1-14.
length (len): 4 bits
Number of extension bytes minus 1. A value 0 therefore indicates that one
byte of data follows.
The mapping between the local identifier and the header extension type should be
signalled out of band and should not be assumed to match the numbering
identified above.
5.3.1. PTP Sync Timestamp Header Extension
The PTP Sync timestamp consists of a 48-bit seconds field followed by a 32-bit
nano-second field. The length value in the extension header is 9.
5.3.2. PTP Origin Timestamp Header Extension
The PTP Origin timestamp consists of a 48-bit seconds field followed by a 32-bit
nano-second field. The length value in the extension header is 9.
5.3.3. SMPTE ST 12-1 (SMPTE 12M) Timecode Header Extension
The Timecode header extension is specified in [7]. The full format form is
used - see section 6.2 of [7]. The value is 8 bytes and therefore the length
value in the extension header is 7. Use of the Timecode Header Extension is
optional.
5.3.4. Flow Identifier Header Extension
The Flow identifier is an UUID [10]. The value is 16 bytes and therefore the
length value in the extension header is 15.
5.3.5. Source Identifier Header Extension
The Source identifier is an UUID [10]. The value is 16 bytes and therefore the
length value in the extension header is 15.
5.3.6. Grain Duration Header Extension
The Grain duration is a rational consisting of a 4 byte numerator and 4 byte
denominator. The value is 8 bytes and therefore the length value in the
extension header is 7. Specification of Grain Duration is optional.
5.3.7. Grain Flags Header Extension
The Grain Flags are a single byte with the following form:
0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
|S|E| reserved |
+-+-+-+-+-+-+-+-+
start flag (S): 1 bit
This bit shall be set to 1 in the first packet of the Grain. Otherwise it
shall be set to 0.
end flag (E): 1 bit
This bit shall be set to 1 in the last packet of the Grain. Otherwise it
shall be set to 0.
reserved: 6 bits
These bits are reserved for future use and should be set to 0.
The length value in the extension header is 0.
6 SDP
Where a Session Description Protocol (SDP) file [11] is used to describe a
multimedia session, the header extensions specified above should be signalled
as follows. How the SDP file is accessed is beyond the scope of this
specification.
6.1. Describing the Header Extensions
The RTP header extensions are identified locally by a number 1-14. The SDP
file maps that session local identifier to a global reference that identifies
the extension type.
6.1.1. PTP Sync Timestamp
The PTP Sync Timestamp header extension is described using the following line:
a=extmap:<id> urn:x-nmos:rtp-hdrext:sync-timestamp
The <id> is the session local identifier. See [8] for details.
6.1.2. PTP Origin Timestamp
The PTP Origin Timestamp header extension is described using the following line:
a=extmap:<id> urn:x-nmos:rtp-hdrext:origin-timestamp
The <id> is the session local identifier.
6.1.3. SMPTE ST 12-1 (SMPTE 12M) Timecode Header Extension
The Timecode header extension is described using the following line:
a=extmap:<id> urn:ietf:params:rtp-hdrext:smpte-tc <dur>@<rate>/<tc
base>[/drop]
The <id> is the session local identifier. For RFC 4175 video the <rate> is 90000
and the <dur> equals 90000 / 25 = 3600 for 25 Hz timecode <rate>. For RFC 3190
audio the <rate> is 48000 and the <dur> equals 48000 / 25 = 1920 for 25 Hz
timecode <rate>.
6.1.4. Flow Identifier Header Extension
The Flow Identifier header extension is described using the following line:
a=extmap:<id> urn:x-nmos:rtp-hdrext:flow-id
The <id> is the session local identifier.
6.1.5. Source Identifier Header Extension
The Source Identifier header extension is described using the following line:
a=extmap:<id> urn:x-nmos:rtp-hdrext:source-id
The <id> is the session local identifier.
6.1.6. Grain Duration Header Extension
The Grain Duration header extension is described using the following line:
a=extmap:<id> urn:x-nmos:rtp-hdrext:grain-duration
The <id> is the session local identifier.
6.1.7. Grain Flags Header Extension
The Grain Flags header extension is described using the following line:
a=extmap:<id> urn:x-nmos:rtp-hdrext:grain-flags
The <id> is the session local identifier.
6.2. Examples
An example SDP file is shown below for RFC 4175 1080i50 video:
v=0
o=- 1443716955 1443716955 IN IP4 172.29.82.50
s=NMOS Stream
t=0 0
m=video 5000 RTP/AVP 96
c=IN IP4 232.121.83.127/32
a=source-filter:incl IN IP4 232.121.83.127 172.29.82.50
a=rtpmap:96 raw/90000
a=fmtp:96 sampling=YCbCr-4:2:2; width=1920; height=1080; depth=10;
colorimetry=BT709-2; interlace=1
a=mediaclk:direct=1119082333 rate=90000
a=extmap:1 urn:x-nmos:rtp-hdrext:origin-timestamp
a=extmap:2 urn:ietf:params:rtp-hdrext:smpte-tc 3600@90000/25
a=extmap:3 urn:x-nmos:rtp-hdrext:flow-id
a=extmap:4 urn:x-nmos:rtp-hdrext:source-id
a=extmap:5 urn:x-nmos:rtp-hdrext:grain-flags
a=extmap:7 urn:x-nmos:rtp-hdrext:sync-timestamp
a=extmap:9 urn:x-nmos:rtp-hdrext:grain-duration
a=ts-refclk:ptp=IEEE1588-2008:ec-46-70-ff-fe-00-42-c4
An example SDP file is shown below for RFC 3190 2 channel audio:
v=0
o=- 1443080730 1443080730 IN IP4 172.29.80.68
s=NMOS Stream
t=0 0
m=audio 5000 RTP/AVP 98
c=IN IP4 232.226.253.166/32
a=source-filter:incl IN IP4 232.226.253.166 172.29.80.68
a=rtpmap:98 L24/48000/2
a=control:trackID=1
a=mediaclk:direct=1970351840 rate=48000
a=extmap:1 urn:x-nmos:rtp-hdrext:origin-timestamp
a=extmap:2 urn:ietf:params:rtp-hdrext:smpte-tc 1920@48000/25
a=extmap:3 urn:x-nmos:rtp-hdrext:flow-id
a=extmap:4 urn:x-nmos:rtp-hdrext:source-id
a=extmap:5 urn:x-nmos:rtp-hdrext:grain-flags
a=extmap:7 urn:x-nmos:rtp-hdrext:sync-timestamp
a=extmap:9 urn:x-nmos:rtp-hdrext:grain-duration
a=ts-refclk:ptp=IEEE1588-2008:ec-46-70-ff-fe-00-42-c4
7. References
[1] RFC 3550, Realtime Transport Protocol (RTP)
[2] RFC 3551, RTP profile, Audio and Video Conferences with Minimal Control
[3] Joint Task Force for Networked Media Reference Architecture 1.0
(jt-nm.org)
[4] RFC 4175, RTP Payload Format for Uncompressed Video
[5] RFC 3190, RTP Payload Format for 12-bit DAT Audio and 20- and 24-bit
Linear Sampled Audio
[6] IEEE 1588-2008 - IEEE Standard for a Precision Clock Synchronization
Protocol for Networked Measurement and Control Systems
[7] SMPTE ST 12-1, Time and Control Code, 2008
[8] RFC 5285, A General Mechanism for RTP Header Extensions
[9] RFC 5484, Associating Time-Codes with RTP Streams
[10] RFC 4122, A Universally Unique IDentifier (UUID) URN Namespace
[11] RFC 4566, SDP: Session Description Protocol