nextcloud / photos

📸 Your memories under your control
GNU Affero General Public License v3.0
562 stars 61 forks source link

AVIF Support #1532

Open whitephoenix117 opened 1 year ago

whitephoenix117 commented 1 year ago

Is your feature request related to a problem? Please describe. AVIF photos cannot be previewed or viewed (Web + Android)

Describe the solution you'd like Viewable AVIF files (Android + Web) Support for previews, ~10x file size improvement vs jpg in my testing

Describe alternatives you've considered HEIC JXL. (AVIF has better supportability; now supported with all major browsers and no licensing) Hardware encoding supported in all modern GPU's (nVidia 4000, Radeon 7000, Intel ARC Axxx)

Additional context Supported in ImageMagick

pulsejet commented 1 year ago

I just want to point out there are no AV1 encoders that are reasonably fast, and AVIF support was added only in Imagick 7 AFAIK.

whitephoenix117 commented 1 year ago

I just want to point out there are no AV1 encoders that are reasonably fast, and AVIF support was added only in Imagick 7 AFAIK.

Having support for decode would be a great start to allow viewing of native AVIF files, especially considering existing browser support. I have photos where the full size AVIF is smaller than some of the JPG previews.

Not ideal but hardware accelerated encoding is now available on the latest GPU's. Ryzen 7000 CPU's iGPU also includes AV1 decode

pulsejet commented 1 year ago

Ah, I misread the issue a bit. I kinda ran into a similar problem with HEIC where the preview is almost 2x the original (!). No browser support unfortunately. Another thing I would be concerned about is displaying high res images; some of mine are 100MP+ and the browser chokes (even on desktop) if I try showing a 100MP JPEG.

whitephoenix117 commented 1 year ago

True but everything doesn't need to work perfect for 100% of use cases on version 1.

This could be config that's off by default. Looking at the amount of support that's poured into AV1 in both software and hardware

This seems like more a an when than an if personally I would be very happy with some basic support whilst the encode algorithms and hardware encode/decode support improves.

pulsejet commented 1 year ago

Yup, I'm not saying it's a bad idea; just pointing out some things to be aware about.