Hi, I'd like to add the mime magic for the Apple heic/heif formats, which are used by Apple devices in recent years to store media.
This format family can contain still images, short sequences (live photos) and videos. The rules are taken from FreeBSD. OK? Best Regards, Stefan Index: usr.bin/file/magdir/animation =================================================================== RCS file: /cvs/src/usr.bin/file/magdir/animation,v retrieving revision 1.6 diff -u -p -u -p -r1.6 animation --- usr.bin/file/magdir/animation 2 Jan 2016 13:25:33 -0000 1.6 +++ usr.bin/file/magdir/animation 25 Dec 2022 13:50:52 -0000 @@ -65,6 +65,35 @@ !:mime video/mp4 >8 string/W qt \b, Apple QuickTime movie !:mime video/quicktime +# HEIF image format +# see https://nokiatech.github.io/heif/technical.html +>8 string mif1 \b, HEIF Image +!:mime image/heif +>8 string msf1 \b, HEIF Image Sequence +!:mime image/heif-sequence +>8 string heic \b, HEIF Image HEVC Main or Main Still Picture Profile +!:mime image/heic +>8 string heix \b, HEIF Image HEVC Main 10 Profile +!:mime image/heic +>8 string hevc \b, HEIF Image Sequenz HEVC Main or Main Still Picture Profile +!:mime image/heic-sequence +>8 string hevx \b, HEIF Image Sequence HEVC Main 10 Profile +!:mime image/heic-sequence +# following HEIF brands are not mentioned in the heif technical info currently (Oct 2017) +# but used in the reference implementation: +# https://github.com/nokiatech/heif/blob/d5e9a21c8ba8df712bdf643021dd9f6518134776/Srcs/reader/hevcimagefilereader.cpp +>8 string heim \b, HEIF Image L-HEVC +!:mime image/heif +>8 string heis \b, HEIF Image L-HEVC +!:mime image/heif +>8 string avic \b, HEIF Image AVC +!:mime image/heif +>8 string hevm \b, HEIF Image Sequence L-HEVC +!:mime image/heif-sequence +>8 string hevs \b, HEIF Image Sequence L-HEVC +!:mime image/heif-sequence +>8 string avcs \b, HEIF Image Sequence AVC +!:mime image/heif-sequence >8 string CAEP \b, Canon Digital Camera >8 string caqv \b, Casio Digital Camera >8 string CDes \b, Convergent Design