A.2 Optional parameters
26.2443GPP3GPP file format (3GP)Release 17Transparent end-to-end Packet-switched Streaming Service (PSS)TS
A.2.1 General
Two optional parameters are defined here for the "audio/3gpp" and "video/3gpp" media types. Additional parameters may be specified by updating the media type registrations. Any unknown parameter shall be ignored.
A.2.2 Codecs parameter
The codecs parameter is defined in RFC 6381. The ISO file format name space and ISO syntax in clauses 3.3 and 3.4 of RFC 6381 [32] shall be used together with extensions to the ISO syntax specified here.
The syntax in clause 3.4 of RFC 6381 defines the usage of the codecs parameter for files based on the ISO base media file format and specifies that the first element of a parameter value is a sample description entry four-character code. It also includes specific definitions for MPEG audio (‘mp4a’) where each value in addition to the four-character code includes two elements signalling Object Type Indications and Profile Level Indications (video only). It also includes specific definitions for Advanced Video Coding (‘avc1’) where each value in addition to the four-character code includes a second element (referred to as ‘avcoti’ in the formal syntax), which is the hexadecimal representation of the following three bytes in the (subset) sequence parameter set Network Abstraction Layer (NAL) unit specified in [29]: (1) profile_idc,(2) the byte containing the constraint_set flags (currently constraint_set0_flag through constraint_set5_flag, and the reserved_zero_2bits), and (3) level_idc. Note also that reserved_zero_2bits is required to be equal to 0 in [29], but other values for it may be specified in the future by ITU-T or ISO/IEC. These definitions apply to the MPEG codecs used by the 3GP file format, such as H.264 (AVC) [29], MPEG-4 AAC [13] and Enhanced aacPlus [23, 24, 25]. Values for other codecs used by the 3GP file format are specified below.
When the first element of a value is ‘s263’, indicating H.263 video [9], the second element is the decimal representation of the profile, e.g., 0 or 3, and the third element is the decimal representation of the level, e.g. 10 or 45.
When the first element of a value is one of the following elements, no other elements are defined for that value:
– ‘samr’, indicating AMR narrow-band speech [11];
– ‘sawb’, indicating AMR wide-band speech [12];
– ‘sawp’, indicating Extended AMR wide-band audio [21];
– ‘sevs’, indicating EVS speech [55];
– ‘tx3g’, indicating timed text [4];
– ‘3gvo’, indicating CVO as defined in clauses 6.11 and 14.
The following syntax defines all values above in ABNF (RFC 4234 [31]) by extending the definition in clause 3.4 of RFC 6381:
id-iso = iso-gen / iso-mpega / iso-mpegv / iso-amr / iso-amr-wb / iso-amr-wbp / iso-evs / iso-tt / iso-h263; = iso-gen, iso-mepga, iso-mpegv, iso-avc as defined in RFC 6381
iso-amr = %x73.61.6d.72 ; ‘samr’
iso-amr-wb = %x73.61.77.62 ; ‘sawb’
iso-amr-wbp = %x73.61.6d.70 ; ‘sawp’
iso-evs = %x73.65.76.73 ; ‘sevs’
iso-tt = %x74.78.33.67 ; ‘tx3g’
iso-cvo = %x33.67.76.6f ; ‘3gvo’
iso-h263 = s263 "." h263-profile "." h263-level
s263 = %x73.32.36.33 ; ‘s263’
h263-profile = 1*DIGIT
h263-level = 1*DIGIT
The elements of the codecs parameter for H.265 (HEVC) are specified as below.
NOTE: The following specification replaces that in clause E.3 of [20].
When the first element of a value is a code indicating a codec from the High Efficiency Video Coding specification (ISO/IEC 23008-2), as documented in clause 8 of [20] (such as ‘hev1’ or ‘hvc1’), the elements following are a series of values from the HEVC decoder configuration record, separated by period characters ("."). In all numeric encodings, leading zeroes may be omitted,
– the general_profile_space, encoded as no character (general_profile_space == 0), or ‘A’, ‘B’, ‘C’ for general_profile_space 1, 2, 3, followed by the general_profile_idc encoded as a decimal number;
– the 32 bits of the general_profile_compatibility_flags, but in reverse bit order, i.e. with general_profile_compatibility_flag[ 31 ] as the most significant bit, followed by , general_profile_compatibility_flag[ 30 ], and down to general_profile_compatibility_flag[ 0 ] as the least significant bit, where general_profile_compatibility_flag[ i ] for i in the range of 0 to 31, inclusive, are specified in ISO/IEC 23008-2, encoded in hexadecimal (leading zeroes may be omitted);
– the general_tier_flag, encoded as ‘L’ (general_tier_flag==0) or ‘H’ (general_tier_flag==1), followed by the general_level_idc, encoded as a decimal number;
– each of the 6 bytes of the constraint flags, starting from the byte containing the general_progressive_source_flag, each encoded as a hexadecimal number, and the encoding of each byte separated by a period; trailing bytes that are zero may be omitted.
Examples:
codecs=hev1.1.6.L93.B0
a progressive, non-packed stream, Main Profile, Main Tier, Level 3.1. (Only one byte of the constraint flags is given here; The value after the second period is 6 instead of 2 because according to ISO/IEC 23008-2 a Main Profile bitstream should also be marked as compatible to the Main 10 Profile).
codecs=hev1.A4.41.H120.B0.23
a (mythical) progressive, non-packed stream in profile space 1, with general_profile_idc 4, some compatibility flags set, and in High tier at Level 4 and two bytes of constraint flags supplied.
For Quality metrics metadata track, the usage of the codecs parameter is specified in [53].
A.2.3 Types parameter
The types parameter is a single value or a comma-separated list that identifies the MIME media types of the content contained (in items) of a 3GP file. Each value consists of a type-subtype pair and corresponds to a value of the content_type field provided for an item in the item information box.
If the types parameter is present, then it shall include all MIME types needed for rendering the content contained (in items) of a file.
The types parameter is defined in ABNF (RFC 5234 [44]) below:
types = "types" "=" type-list
type-entry = type-name "/" subtype-name *( *WSP";" *WSP parameter )
parameter = attribute *WSP "=" *WSP value
attribute = token
value = token / quoted-string
token = 1*(%x21 / %x23-27 / %x2A-2B / %x2D-2E / %x30-39
/ %x41-5A / %x5E-7E)
; 1*<any CHAR except SP, CTLs or tspecials>
type-list = DQUOTE type-entry *( "," type-entry ) DQUOTE
"type-name" and "subtype-name" are defined in RFC4288[42].
"tspecials" is defined in RFC2045[45]
"quoted-string" is defined in RFC5322[43].
"CHAR", "CTL", "SP", "WSP" and "DQUOTE" are defined in RFC 5234 [31].
NOTE: any <"> character in "type-entry" needs to be escaped with "\". This is not shown in the above grammar.