RTP Payload Format for ISO/IEC 21122 (JPEG XS)
Extracted elements (27)
All media type parameters are declarative — the information they signal is also present in the payload header or JPEG XS header segment. This redundancy allows SDP-level negotiation and validation while ensuring the payload itself is always self-describing, with the payload data prevailing on any conflict.
Only slice packetization mode supports out-of-order packet transmission; codestream packetization mode requires sequential delivery. This is why T=0 (out-of-order) mandates K=1 (slice mode): the slice-level granularity provides the independent unit boundaries needed to reassemble out-of-order packets.
In a constant bitrate (CBR) JPEG XS scenario using codestream packetization mode, the format guarantees both a constant number of bytes per video frame and a constant number of RTP packets per video frame. Variable bitrate or slice packetization mode requires additional mechanisms (encoder constraints, padding, or empty RTP packets) to achieve similar guarantees.
All video support boxes and color specification boxes within an RTP stream SHALL retain their respective layouts for each JPEG XS frame. Each VS box SHALL define the same sub-boxes, and the relative byte offsets of fields SHALL NOT change, though effective values may change.
Congestion control for RTP SHALL be used in accordance with RFC 3550 and any applicable RTP profile. In best-effort network environments, users SHALL monitor packet loss to ensure it is within acceptable parameters and SHALL comply with RFC 8083 circuit breaker criteria.
Each RTP packet SHALL contain (part of) one and only one packetization unit. Packet payloads (excluding header) SHALL have the same size with the possible exception of the last packet of a packetization unit. Packetization unit boundaries SHALL coincide with RTP payload boundaries.
For an interlaced JPEG XS frame, both picture segments SHALL contain identical VS and CS boxes — the byte sequence of the concatenated boxes MUST be exactly the same in both segments. The frat field indicating top-field-first or bottom-field-first SHALL also be identical.
In case of discrepancies between SDP payload parameter values and the actual payload data, the values from the payload data SHALL prevail. The receiver SHALL ignore any parameter not defined in Section 7.1.
In codestream packetization mode (K=0), the L bit and M bit have equivalent meaning and SHALL have identical values in each packet. The L bit is always set whenever the M bit is set.
In SDP offer/answer, the 'a=fmtp' attribute SHALL be present specifying the required 'packetmode' parameter. The answerer is required to support all parameters offered; otherwise the answerer SHALL reject the session. If accepted, the answerer SHALL reply with the exact same parameter values.
In slice packetization mode, the EOC marker SHALL immediately follow the last slice data in the final packetization unit of a JPEG XS codestream. For interlaced frames the header segment of the second field SHALL be in its own packetization unit.
In the absence of the RANGE parameter, NARROW SHALL be the assumed value for all non-UNSPECIFIED colorimetry. When paired with UNSPECIFIED colorimetry, FULL SHALL be the default assumed value.
The RTP Marker (M) bit SHALL be set to 1 for the last packet of a video frame (progressive) or field (interlaced), and SHALL be set to 0 for all other packets.
The RTP timestamp SHALL use a 90 kHz clock rate. All packets belonging to the same video frame SHALL have the same timestamp. If the sampling instant does not correspond to an integer clock value, the value SHALL be truncated to the next lowest integer.
The T bit (Transmission mode) and K bit (packetization mode) SHALL have identical values for all packets of the RTP stream. If T=0 (out-of-order allowed), slice packetization mode SHALL be used and K SHALL be set to 1, because only slice packetization mode supports out-of-order transmission.
Traffic shaping and delivery timing are RECOMMENDED to follow SMPTE ST 2110-21 Network Compatibility Model compliance definitions; when used, the session description SHALL signal compliance via the TP media type parameter.
When the transmode parameter is not specified in the media type, a value of 1 (sequential-only) SHALL be assumed and the T bit SHALL be set to 1. If specified, its value SHALL equal the T-bit value configured in the RTP stream.
A JPEG XS codestream is formed by (in order): a codestream header starting with an SOC marker (0xff10), one or more slices, and an End of Codestream (EOC) marker (0xff11). Slices are the smallest independently decodable units.
A JPEG XS picture segment is the concatenation of a Video Support (VS) box, a Color Specification (CS) box, and a JPEG XS codestream. For progressive video each frame is one picture segment; for interlaced video each frame is two concatenated picture segments.
The I bits (2 bits) encode scan type: 00 = progressive, 01 = reserved, 10 = first picture segment of interlaced frame (top-field-first or per frat), 11 = second picture segment of interlaced frame. The codestream height in an interlaced segment is half the full display height.
The media type registration is video/jxsv. Required parameters are 'rate' (SHALL be 90000) and 'packetmode' (SHALL equal the K-bit value: 0 for codestream, 1 for slice). Optional parameters include transmode, profile, level, sublevel, depth, width, height, exactframerate, interlace, segmented, sampling, colorimetry, TCS, and RANGE.
The SEP counter (11 bits) behaves differently per mode: in codestream mode (K=0) it extends the P counter by incrementing whenever P overflows; in slice packetization mode (K=1) it identifies the slice index modulo 2047, with value 0x07FF reserved to indicate the JPEG XS header segment.
Two packetization modes are defined: codestream packetization mode (K=0), where the unit is the entire JPEG XS picture segment, and slice packetization mode (K=1), where each slice is its own unit preceded by a JPEG XS header segment unit.
IANA has registered the media type 'video/jxsv' and added it to the IANA registry for 'RTP Payload Format Media Types'. The registration follows RFC 6838 and RFC 4855.
HD and UHD JPEG XS video streams have significant bandwidth requirements (typically more than 1 Gbps for UHD), which is sufficient to cause denial-of-service if transmitted onto most currently available Internet paths. Applications using best-effort service SHALL monitor packet loss and adapt transmission rate or leave the session if loss is unacceptably high.
Implementations MUST be robust against malicious or malformed payloads; a decoder that overruns its allocated memory due to a crafted payload could allow arbitrary code execution by an attacker. The same robustness applies to encoders, though encoder vulnerabilities are typically rarer.
The 32-bit RTP payload header consists of: T (Transmission mode, 1 bit), K (packetization mode, 1 bit), L (Last packet of unit, 1 bit), I (Interlaced info, 2 bits), F counter (Frame counter mod 32, 5 bits), SEP counter (Slice/Extended Packet counter, 11 bits), P counter (Packet counter mod 2048 within unit, 11 bits).