rfc-4281

The Codecs Parameter for "Bucket" Media Types

R. Gellens, D. Singer, P. Frojdh
date2005-12 streamIETF wgnon working group statusPROPOSED STANDARD pages29 canonicalhttps://www.rfc-editor.org/rfc/rfc4281 doi10.17487/RFC4281 errataview
Several MIME type/subtype combinations exist that can contain different media formats. A receiving agent thus needs to examine the details of such media content to determine if the specific elements can be rendered given an available set of codecs. Especially when the end system has limited resources, or the connection to the end system has limited bandwidth, it would be helpful to know from the Content-Type alone if the content can be rendered. This document adds a new parameter, "codecs", to various type/subtype combinations to allow for unambiguous specification of the codecs indicated by the media formats contained within. By labeling content with the specific codecs indicated to render the contained media, receiving systems can determine if the codecs are supported by the end system, and if not, can take appropriate action (such as rejecting the content, sending notification of the situation, transcoding the content to a supported type, fetching and installing the required codecs, further inspection to determine if it will be sufficient to support a subset of the indicated codecs, etc.) [STANDARDS-TRACK]

obsoleted by

Extracted elements (19)

design-rationale §1

The 'codecs' parameter was introduced because several MIME type/subtype combinations ('bucket' types such as audio/3gpp, video/3gpp2) can contain any of several different codecs, making it impossible to determine rendering requirements from the Content-Type alone without parsing the media body. This is especially costly for MMS servers and constrained devices.

email, realtime

interoperability-note §4

For ISO file formats where the namespace defined here is insufficient, a new document MAY update this one by specifying additional namespace detail. For non-ISO formats, a new document MAY update this one by specifying the name space for those media types.

realtime

interoperability-note §3

Not all codecs listed in the Codecs parameter are necessarily required to render the content (e.g., alternative audio tracks, optional timed text). Receivers that lack support for a listed codec MAY need to examine the media elements to determine if the unsupported codec is actually required.

realtime

normative-requirement §3 MAY

If a receiver encounters a body part whose Codecs parameter does not contain all codecs indicated by the media elements, the receiver MAY process the body part by discarding the Codecs parameter information.

realtime

normative-requirement §3.1 MUST NOT

Implementations MUST NOT add CFWS (comment/folding whitespace) between tokens in the Codecs parameter value except after a comma separator.

realtime

normative-requirement §3 MUST NOT

Systems MUST NOT rely on the Codecs parameter being complete in 'depth'; although it must report all four-character codes used in all tracks (breadth), a server implemented before hierarchical rules for a given code were written will not know what sub-elements to include.

realtime

normative-requirement §4 MAY

The Codecs parameter MAY be specified for use with additional MIME media types beyond the four listed. For existing media types the parameter is generally advisable to be optional; for new media types it MAY be optional or required as appropriate.

realtime, registry

normative-requirement §3 MUST NOT

The Codecs parameter MUST NOT include any codecs that are not indicated by any media elements in the body part.

realtime

normative-requirement §3 MUST

When the Codecs parameter is used, it MUST contain all codecs indicated by the content present in the body part.

realtime

protocol-element §3.2

For 'mp4a' with OTI value 40 (MPEG-4 audio), a third element identifies the audio ObjectTypeIndication as a decimal number per ISO 14496-3; for example, AAC-LC is encoded as 'mp4a.40.2'.

realtime

protocol-element §3.2

For 'mp4v' with OTI value 20 (MPEG-4 part-2 video), a third element identifies the video ProfileLevelIndication as a decimal number per ISO 14496-2; for example, MPEG-4 Visual Simple Profile Level 0 is 'mp4v.20.9'.

realtime

protocol-element §3.2

For the ISO Base Media File Format family, the first element of a Codecs parameter value is a four-character sample description entry code as registered by the MP4 Registration Authority. Values are case sensitive.

realtime, registry

protocol-element §3

In the encoded (fancy) form, the parameter name becomes 'codecs*' with an asterisk suffix, the value typically begins with two single-quote characters indicating no charset or language, and octets requiring encoding are percent-encoded. The percent sign, asterisk, and single quote themselves must be percent-encoded.

realtime

protocol-element §3

The 'codecs' parameter is defined as optional for audio/3gpp, audio/3gpp2, video/3gpp, and video/3gpp2 MIME types. Its value is a single codec identifier or a comma-separated list of dot-hierarchical codec identifiers indicating all codecs required to render the body part.

realtime

protocol-element §3.2

When the first element is 'mp4a' (MPEG-4 audio) or 'mp4v' (MPEG-4 part-2 video), the second element is the two-hex-digit MP4 Registration Authority ObjectTypeIndication (OTI) without a leading '0x' prefix.

realtime

registry §7

IANA added 'codecs' as an optional parameter to audio/3gpp, audio/3gpp2, video/3gpp, and video/3gpp2 media type registrations, with a reference to RFC 4281.

registry, realtime

security-consideration §8

The Codecs parameter does not alter the inherent security considerations of the media types it annotates; each media type retains its own security properties. An incorrect Codecs parameter can cause content to be delivered to incapable devices or withheld from capable ones, enabling limited denial-of-service; however, an attacker with the ability to alter the parameter could cause greater harm by modifying the media content or Content-Type header directly.

security, realtime

wire-format §3.3

ISO syntax: 'cpid' is exactly 4 octet-simple or octet-fancy characters (the four-character code); 'oti' is exactly 2 hex digits (A-F uppercase); 'aud-oti' and 'vid-pli' are one or more decimal digits. The BNF grammar in Section 3.3 refines the generic grammar for ISO file formats.

realtime

wire-format §3.1

The Codecs parameter takes two forms: 'cod-simple' (codecs=unencodedv) for values without octets requiring encoding, and 'cod-fancy' (codecs*=encodedv) using RFC 2231 MIME parameter encoding. A dot ('.') is reserved as a hierarchy delimiter within element values.

realtime