With both Chrome and Firefox supporting AVIF naively, this would more than halve the size of the previews directory, and make browsing over constrained networks much more pleasant.
Update: AVIF encoding is staggeringly slow, and would make imports 5-20x slower.
Mobile Safari would be left out in the cold, though, unless both JPEG and AVIF were rendered.
That sounds like a good preference: “Should Photostructure render previews and JPEGs, AVIFs, or both” (and then an explanation of why one might choose one or the other, and a warning more drive space will be used but streaming could be more pleasant).
For those of us that don’t use Apple products (my wife and I just use Windows PCs and Samsung phones and tablets), I wouldn’t mind an “I don’t care about Mobile Safari” option that uses newer file formats only supported by Chrome and Firefox.
I went down this path with webp, but found that webp was much slower to encode (5-10x slower: AVIF is even worse than that!), and only reduced preview sizes by ~30%.
PhotoStructure uses sharp for image manipulation and JPEG encoding. sharp, in turn, is based on libvips, which just added JPEG XL, but support is “immature”:
Someone from the images infra team at Facebook has a lot of good feedback about JPEG XL as well:
After spending the last 5 months investigating and evaluating JPEG XL from both a performance and quality point of view, it’s our opinion that JPEG XL has the most potential of the new generation of image formats that are trying to succeed JPEG.
Recent news about the jxl library being developed in public now:
(There are still a couple blockers before jxl is in sharp: but I could do reencoding with an external tool, similar to how I handle HEIF. There are serious performance downsides to that approach, though)
There’s a lot more green there than the last time I checked!
Unfortunately, I still haven’t found the magick incantation necessary for ffmpeg to transcode an AV1 stream such that Chrome, Firefox, and Safari can all render it properly.
AV1 encoding is at least 5x slower to compress than MP4, but it’s a one-time cost, and reducing disk space and bandwidth is interesting.