Video usability information, or VUI, sits at the end of the sequence parameter set. It does not change how pictures are decoded, but it holds the aspect ratio, colour, timing and buffering details a player needs, including the only frame rate an Annex B file can carry.
VUI parameters
| Name | Coding | Condition | Description |
|---|---|---|---|
aspect_ratio_info_present_flag | u(1) | ||
aspect_ratio_idc | u(8) | flag is 1 | see aspect ratio |
sar_width, sar_height | u(16) × 2 | aspect_ratio_idc is 255 | |
overscan_info_present_flag | u(1) | ||
overscan_appropriate_flag | u(1) | flag is 1 | 1 means the picture is suitable for overscan display |
video_signal_type_present_flag | u(1) | ||
video_format | u(3) | flag is 1 | see video format |
video_full_range_flag | u(1) | flag is 1 | 1 means full-range sample values |
colour_description_present_flag | u(1) | flag is 1 | |
colour_primaries, transfer_characteristics, matrix_coefficients | u(8) × 3 | flag is 1 | see colour codes |
chroma_loc_info_present_flag | u(1) | ||
chroma_sample_loc_type_top_field, …bottom_field | ue(v) × 2 | flag is 1 | 0 to 5, the chroma sample position |
timing_info_present_flag | u(1) | ||
num_units_in_tick, time_scale | u(32) × 2 | flag is 1 | see timing |
fixed_frame_rate_flag | u(1) | flag is 1 | |
nal_hrd_parameters_present_flag | u(1) | ||
| HRD parameters | flag is 1 | for the whole NAL stream | |
vcl_hrd_parameters_present_flag | u(1) | ||
| HRD parameters | flag is 1 | for video data only | |
low_delay_hrd_flag | u(1) | either HRD flag is 1 | |
pic_struct_present_flag | u(1) | 1 means picture timing SEI carries pic_struct | |
bitstream_restriction_flag | u(1) | ||
motion_vectors_over_pic_boundaries_flag | u(1) | flag is 1 | |
max_bytes_per_pic_denom | ue(v) | flag is 1 | 0 to 16 |
max_bits_per_mb_denom | ue(v) | flag is 1 | 0 to 16 |
log2_max_mv_length_horizontal | ue(v) | flag is 1 | 0 to 16 |
log2_max_mv_length_vertical | ue(v) | flag is 1 | 0 to 16 |
max_num_reorder_frames | ue(v) | flag is 1 | 0 to 16 |
max_dec_frame_buffering | ue(v) | flag is 1 | 0 to 16 |
Aspect ratio
aspect_ratio_idc | Sample aspect ratio |
|---|---|
| 0 | unspecified |
| 1 | 1:1 |
| 2 | 12:11 |
| 3 | 10:11 |
| 4 | 16:11 |
| 5 | 40:33 |
| 6 | 24:11 |
| 7 | 20:11 |
| 8 | 32:11 |
| 9 | 80:33 |
| 10 | 18:11 |
| 11 | 15:11 |
| 12 | 64:33 |
| 13 | 160:99 |
| 14 | 4:3 |
| 15 | 3:2 |
| 16 | 2:1 |
| 17–254 | reserved |
| 255 | Extended_SAR: sar_width:sar_height |
Video format
video_format | Source |
|---|---|
| 0 | component |
| 1 | PAL |
| 2 | NTSC |
| 3 | SECAM |
| 4 | MAC |
| 5 | unspecified |
| 6, 7 | reserved |
Colour codes
These are the code points that H.264, H.265 and ITU-T H.273 share, as listed in FFmpeg’s pixel format header.
| Code | colour_primaries |
|---|---|
| 0 | reserved |
| 1 | BT.709 |
| 2 | unspecified |
| 3 | reserved |
| 4 | BT.470 System M |
| 5 | BT.470 System B, G; BT.601 625-line |
| 6 | SMPTE 170M; BT.601 525-line |
| 7 | SMPTE 240M |
| 8 | film, Illuminant C |
| 9 | BT.2020 |
| 10 | SMPTE ST 428-1 (CIE 1931 XYZ) |
| 11 | SMPTE RP 431-2 (DCI P3) |
| 12 | SMPTE EG 432-1 (P3 D65) |
| 22 | EBU Tech. 3213-E |
| Code | transfer_characteristics |
|---|---|
| 0 | reserved |
| 1 | BT.709 |
| 2 | unspecified |
| 3 | reserved |
| 4 | gamma 2.2 (BT.470 System M) |
| 5 | gamma 2.8 (BT.470 System B, G) |
| 6 | SMPTE 170M; BT.601 |
| 7 | SMPTE 240M |
| 8 | linear |
| 9 | logarithmic, 100:1 range |
| 10 | logarithmic, 100 × √10 : 1 range |
| 11 | IEC 61966-2-4 |
| 12 | BT.1361 extended colour gamut |
| 13 | IEC 61966-2-1 (sRGB) |
| 14 | BT.2020, 10-bit |
| 15 | BT.2020, 12-bit |
| 16 | SMPTE ST 2084 (PQ) |
| 17 | SMPTE ST 428-1 |
| 18 | ARIB STD-B67 (HLG) |
| Code | matrix_coefficients |
|---|---|
| 0 | identity (RGB, or GBR order) |
| 1 | BT.709 |
| 2 | unspecified |
| 3 | reserved |
| 4 | FCC |
| 5 | BT.470 System B, G; BT.601 625-line |
| 6 | SMPTE 170M; BT.601 525-line |
| 7 | SMPTE 240M |
| 8 | YCgCo |
| 9 | BT.2020 non-constant luminance |
| 10 | BT.2020 constant luminance |
| 11 | SMPTE ST 2085 |
| 12 | chromaticity-derived, non-constant luminance |
| 13 | chromaticity-derived, constant luminance |
| 14 | BT.2100 ICtCp |
Timing
One clock tick lasts num_units_in_tick ÷ time_scale seconds,
and one field lasts a tick, so with fixed_frame_rate_flag set the frame rate
is usually time_scale ÷ (2 × num_units_in_tick).
HRD parameters
Hypothetical reference decoder parameters describe the coded picture buffer, up to 32 sets.
| Name | Coding | Description |
|---|---|---|
cpb_cnt_minus1 | ue(v) | 0 to 31 |
bit_rate_scale | u(4) | scale of the bit rate values |
cpb_size_scale | u(4) | scale of the size values |
bit_rate_value_minus1[i] | ue(v) | repeated cpb_cnt_minus1 + 1 times, with the next two |
cpb_size_value_minus1[i] | ue(v) | |
cbr_flag[i] | u(1) | 1 for constant bit rate |
initial_cpb_removal_delay_length_minus1 | u(5) | |
cpb_removal_delay_length_minus1 | u(5) | |
dpb_output_delay_length_minus1 | u(5) | |
time_offset_length | u(5) | width of the time offset in picture timing SEI |