The current CMAF media profile validation appears to incorrectly handle profile limits, maximum resolution boundaries, and media-type separation.
In my test, the tool reports failures related to the cfhd/chdf brand validation for the video initialization segment.
The stream I tested has the following video properties:
- codec: AVC
- profile: Main
- level: 4.0
- resolution: 1920x1080
- colour_primaries: 1 (BT.709)
- transfer_characteristics: 1 (BT.709)
- matrix_coefficients: 1 (BT.709)
- signalled brands: cfhd, chdf
The current tool still reports:
- Signalled brand cfhd but does not conform to targetProfile
- Signalled brand cfhd exceeds maximum height
- Signalled brand cfhd exceeds maximum height
- Signalled brand chdf but does not conform to targetProfile
- Signalled brand chdf exceeds maximum height
- Signalled brand chdf exceeds maximum height
The second “maximum height” message appears to come from the width check in the current code.
From checking the current code, it looks like the profile check is still using an exact match:
result: in_array($signalledProfile, $targetProfile)
For AVC CMAF media profiles, ISO/IEC 23000-19 says the track “shall not exceed the profile or level listed in the table”. Therefore, AVC Main should not exceed AVC High, and should be accepted for cfhd/chdf.
Also, the width/height checks appear to use strict < comparisons:
result: $segment->getHeight() < $maxHeight
result: $segment->getWidth() < $maxWidth
Since the table defines maximum values, 1920x1080 should be accepted for cfhd/chdf. It seems these checks should use <=.
Although my current test stream is AVC, the same validation helper appears to be used for both AVC and HEVC brand checks. Therefore, the same boundary-value issue may also affect HEVC CMAF media profile brands defined in Annex B / Table B.1.
For example, Table B.1 defines maximum dimensions such as:
- chhd / chh1: 1920x1080
- cud8 / cud1 / chd1 / clg1: 3840x2160
If the implementation uses strict < comparisons for width and height, valid HEVC streams exactly at those maximum dimensions could also be incorrectly rejected. These checks should likely include the boundary value, i.e. use <=, for HEVC as well.
In addition, I think the same media-type separation should also be applied consistently to subtitle/caption related CMAF media profile checks.
According to ISO/IEC 23000-19:
- Table A.1 defines AVC video CMAF media profile brands such as cfsd, cfhd, chdf.
- Table A.2 defines AAC audio CMAF media profile brands such as caac and caaa.
- Table A.3 defines subtitle/caption CMAF media profile brands:
- WebVTT: cwvt
- TTML IMSC1 text: im1t
- TTML IMSC1 image: im1i
- TTML IMSC1.1 text: im2t
- TTML IMSC1.1 image: im2i
- Table A.4 defines ccea as supplemental data for CTA captions embedded in video tracks. It is targeted at video CMAF tracks and may be included in addition to a video CMAF media profile brand.
In my test stream, the subtitle AdaptationSets use TTML/stpp and the subtitle init segments signal im1t. Therefore, subtitle media profile checks should be evaluated only against subtitle/text AdaptationSets, and video/audio profile checks should not evaluate subtitle AdaptationSets.
Also, ccea should be treated as supplemental data for video tracks with embedded CTA captions, not as a substitute for subtitle media profile brands such as im1t/im1i/im2t/im2i.
Based on the above, the following adjustments appear to be required:
- AVC profile comparison as “not exceed High”, not exact High only
- max width/height comparison including the boundary value
- applying the same boundary-value handling to HEVC CMAF media profiles in Annex B / Table B.1
- consistent media-type filtering for video, audio, and subtitle/text AdaptationSets
- subtitle profile checks based on Table A.3 brands such as cwvt, im1t, im1i, im2t, im2i
- treating ccea as video supplemental data, not as a subtitle media profile brand
The current CMAF media profile validation appears to incorrectly handle profile limits, maximum resolution boundaries, and media-type separation.
In my test, the tool reports failures related to the cfhd/chdf brand validation for the video initialization segment.
The stream I tested has the following video properties:
The current tool still reports:
The second “maximum height” message appears to come from the width check in the current code.
From checking the current code, it looks like the profile check is still using an exact match:
result: in_array($signalledProfile, $targetProfile)For AVC CMAF media profiles, ISO/IEC 23000-19 says the track “shall not exceed the profile or level listed in the table”. Therefore, AVC Main should not exceed AVC High, and should be accepted for cfhd/chdf.
Also, the width/height checks appear to use strict
<comparisons:Since the table defines maximum values, 1920x1080 should be accepted for cfhd/chdf. It seems these checks should use
<=.Although my current test stream is AVC, the same validation helper appears to be used for both AVC and HEVC brand checks. Therefore, the same boundary-value issue may also affect HEVC CMAF media profile brands defined in Annex B / Table B.1.
For example, Table B.1 defines maximum dimensions such as:
If the implementation uses strict
<comparisons for width and height, valid HEVC streams exactly at those maximum dimensions could also be incorrectly rejected. These checks should likely include the boundary value, i.e. use<=, for HEVC as well.In addition, I think the same media-type separation should also be applied consistently to subtitle/caption related CMAF media profile checks.
According to ISO/IEC 23000-19:
In my test stream, the subtitle AdaptationSets use TTML/stpp and the subtitle init segments signal im1t. Therefore, subtitle media profile checks should be evaluated only against subtitle/text AdaptationSets, and video/audio profile checks should not evaluate subtitle AdaptationSets.
Also, ccea should be treated as supplemental data for video tracks with embedded CTA captions, not as a substitute for subtitle media profile brands such as im1t/im1i/im2t/im2i.
Based on the above, the following adjustments appear to be required: