stashapp / stash

An organizer for your porn, written in Go. Documentation: https://docs.stashapp.cc
https://stashapp.cc/
GNU Affero General Public License v3.0
9.3k stars 797 forks source link

[Feature] Support AVIF #1729

Open wenerme opened 3 years ago

wenerme commented 3 years ago

Is your feature request related to a problem? Please describe.

Using avif can reduce the storage usage

Describe the solution you'd like

need to enable cgo, need libaom

Describe alternatives you've considered

Additional context

Some compares

Before image

After image

avifenc -j 12 --min 0 --max 63 -a end-usage=q -a cq-level=18 -a tune=ssim
ghost commented 3 years ago

Stash already uses cgo, but including new libraries is a pain in the ass. If #1655 is merged we should be able to use ffmpeg/libvips to support avif though.

wenerme commented 3 years ago

Thanks, introducing vips would be better, will watch that pr

yoshnopa commented 1 year ago

The implementation of #1655 is finally done, and not only is there an external library for avif, ffmpeg supports it too since Version 5.1 I would also love to see support, right now I cant even hack a solution together because the scan fails, I assume at the DecodeConfig function. This actually was working before, I have added webm files that way before the commit without the scan failing...

kingvall commented 1 year ago

Any advancement on this subject ? My disk space want this feature a lot :/

DogmaDragon commented 4 months ago

Not sure how these compare to https://github.com/Kagami/go-avif, but there are several decoders in Go now.