kornelski / cavif-rs

AVIF image creator in pure Rust
https://lib.rs/cavif
BSD 3-Clause "New" or "Revised" License
559 stars 25 forks source link

Avif files do not pass validation #32

Closed rkfox closed 3 years ago

rkfox commented 3 years ago

Converted images do not pass validation. Results from this validator. Images were converted using this command: cavif --speed 1 --quality 60 sample.jpg

Result:
Compliance Warden, version v28-master-rev0-g29d5bb7.
+--------------------------------------+
| avif validation |
+--------------------------------------+

Specification description: AVIF v1.0.0, 19 February 2019
https://aomediacodec.github.io/av1-avif/

[avif][Rule #7] Error: The values of the AV1CodecConfigurationBox shall match
the Sequence Header OBU in the AV1 Image Item Data:
AV1CodecConfigurationBox:
seq_profile=0
seq_level_idx_0=0
seq_tier_0=0
high_bitdepth=0
twelve_bit=0
mono_chrome=0
chroma_subsampling_x=0
chroma_subsampling_y=0
chroma_sample_position=0
Sequence Header OBU in the AV1 Image Item Data:
seq_profile=1
seq_level_idx_0=31
seq_tier_0=0
high_bitdepth=0
twelve_bit=0
mono_chrome=0
chroma_subsampling_x=0
chroma_subsampling_y=0
chroma_sample_position=0

[avif][Rule #9] Error: Transformative property "av1C" shall be marked as essential (item_ID=1)

========================================
[avif] 2 error(s), 0 warning(s).
========================================

===== Involved rules descriptions:

[avif][Rule #7] Section 2.2.1
The values of the fields in the AV1CodecConfigurationBox shall match those of the
Sequence Header OBU in the AV1 Image Item Data.

[avif][Rule #9] Section 2.2.1
AV1 Item Configuration Property [...] shall be marked as essential.

+--------------------------------------+
| miaf validation |
+--------------------------------------+

Specification description: MIAF (Multi-Image Application Format)
MPEG-A part 22 - ISO/IEC 23000-22 - w18260 FDIS - Jan 2019

[miaf][Rule #2] Error: compatible_brands list shall contain 'miaf' (not found) and 'mif1' (found)

========================================
[miaf] 1 error(s), 0 warning(s).
========================================

===== Involved rules descriptions:

[miaf][Rule #2] Section 7.2.1.2
The FileTypeBox shall contain, in the compatible_brands list,
the following (in any order): 'mif1' (specified in ISO/IEC 23008-12)
[...]
Files conforming to the general restrictions in clause 7 shall include
the brand 'miaf' in the compatible_brands in the FileTypeBox.

+--------------------------------------+
| heif validation |
+--------------------------------------+

Specification description: HEIF - ISO/IEC 23008-12 - 2nd Edition N18310

========================================
[heif] No errors.
========================================

+--------------------------------------+
| isobmff validation |
+--------------------------------------+

Specification description: ISO Base Media File Format
MPEG-4 part 12 - ISO/IEC 14496-12 - m17277 (6th+FDAM1+FDAM2+COR1-R4)

========================================
[isobmff] No errors.
========================================
kornelski commented 3 years ago

MIAF spec is not free, so I haven't read it, so I'm not declaring compatibility with it.

Also AVIF/HEIF is bloated with pointless requirements that make no sense, so I'm not really worried that the validator doesn't like it: https://github.com/kornelski/cavif-rs/issues/33#issuecomment-881333432

negge commented 3 years ago

Hi Kornel, please contact me privately so I can purchase you a copy of the MIAF spec. I would like to ensure you have all the tools and information necessary to make positive statements about cavif-rs compatibility with it.

If the validator is reporting errors then the AVIF files being produced are invalid and this is a big problem.