Open joedrago opened 3 years ago
I would likewise be happy to see that requirement relaxed in MIAF. It's pretty confusing, but I also think it's important for implementations to adhere to the standard strictly to achieve good compatibility and adoption, especially at this early stage.
How likely is getting such a change through, and what would the timeline look like?
however, the second bullet there suggests that if we read it this way, any file that is legally one of the brands in Clause 10 but doesn't report that brand is also in error.
MIAF Amd2 fixes that part as follows:
The FileTypeBox shall contain, in the compatible_brands list, the 'mif1' brand (specified in ISO/IEC 23008-12).
The FileTypeBox should also contain brands that identify the MIAF profile(s), to which the file conforms (specified in Annex A or externally), and possibly other brands to which the file conforms.
The use of 'externally' is meant to cover AVIF. IIRC, the requirement on 'mif1' was added to enable tools that do codec-agnostic processing of MIAF files can work on any MIAF file (irrespective of the codec). Relaxing the rule to make it a 'should' can always be envisaged but it will take discussions and time ...
Alright, so is your recommendation that we add the brand requirement to libavif's parse?
ISO/IEC 23008-12:2017(E) also says, in 10.2.1.1 Requirements on files:
Files shall contain the brand '
mif1
' in the compatible brands array of theFileTypeBox
.
So there are two standards that use the word "shall" in the requirements on having mif1
in compatible brands.
@wantehchang @kornelski @cconcolato @baumanj
Stemming from this GitHub issue: https://github.com/mozilla/mp4parse-rust/issues/236
libavif
currently only pays attention to theavif
andavis
brands on read, but emits all of the proper/relevant brands on write. However, AVIF files are MIAFs, and the MIAF standard says:The "shall" there is pretty clear that this is a restriction, and that an AVIF without
mif1
is in error, however, the second bullet there suggests that if we read it this way, any file that is legally one of the brands in Clause 10 but doesn't report that brand is also in error. For example, if an AVIF image sequence happens to conform to the requirements of a burst capture, it similarly "shall" haveMiBu
in it.This seems a bit overreaching to me, honestly. From my perspective, brands help decoders that can only do a subset of decoding "everything BMFF can deliver" (read: all decoders) figure out if they can handle the file. Failing to inject
mif1
into an AVIF should make it so that a decoder that only can decodemif1
files can't decode it is unfortunate, but shouldn't block an otherwise valid AVIF, in my opinion.@cconcolato - Is there any way we can amend the MIAF standard to change 7.2.1.2 "shall" into a "should"? The wording here is pernicious, in my opinion. I'd way rather not be required to bail out on missing compatible brands. It feels backwards to me.