sniff

Identify the format from the first bytes of data, or null if no known magic matches. Needs at most 12 bytes, except for an ISO base media file whose AVIF or HEVC brand is listed among its compatible brands rather than as its major brand, which needs its whole ftyp box, and a HEIF file that names only mif1 or msf1, which needs its meta box; shorter input is never an error, just an unidentified one.