Closed RaphaelVRossi closed 11 months ago
If you're satisfied with the lower imagemagick SSIM values, pass a lower quality keyword argument to the save method. The file sizes and SSIMs look comparable if you pass in quality values between 40 and 50. Using the SVT-AV1 codec (by calling im.save("filename.avif", codec="svt", quality=45)
) ought to get you even better compression.
Thanks @fdintino 🚀
hey @fdintino ,
How to set log level for svt
codec?
Every time I save a image using svt
codec this log appears
Svt[info]: -------------------------------------------
Svt[info]: SVT [version]: SVT-AV1 Encoder Lib v1.7.0
Svt[info]: SVT [build] : GCC 10.2.1 20210130 (Red Hat 10.2.1-11) 64 bit
Svt[info]: LIB Build date: Oct 13 2023 02:11:49
Svt[info]: -------------------------------------------
Svt[warn]: If you are using tiles with the intent of increasing the decoder speed, please also consider using --fast-decode 1, especially if the intended decoder is running with limited multi-threading capabilities.
Svt[info]: Number of logical cores available: 4
Svt[info]: Number of PPCS 74
Svt[info]: [asm level on system : up to sse4_2]
Svt[info]: [asm level selected : up to sse4_2]
Svt[info]: -------------------------------------------
Svt[info]: SVT [config]: main profile tier (auto) level (auto)
Svt[info]: SVT [config]: width / height / fps numerator / fps denominator : 1000 / 672 / 60000 / 1000
Svt[info]: SVT [config]: bit-depth / color format : 8 / YUV420
Svt[info]: SVT [config]: preset / tune / pred struct : 8 / PSNR / random access
Svt[info]: SVT [config]: gop size / mini-gop size / key-frame type : 321 / 32 / key frame
Svt[info]: SVT [config]: BRC mode / rate factor : CRF / 28
Svt[info]: -------------------------------------------
Svt[warn]: Failed to set thread priority
Svt[warn]: Failed to set thread priority
Svt[warn]: Failed to set thread priority
I'm currently using your plugin inside Thumbor
So, digging thought SVT source code, I found a env var SVT_LOG
that control log level.
After export this env the log was suppressed.
Hey @fdintino, I'm using
pillow_avif
lib and after some tests the size of the generated AVIF files are bigger than other format files.Do you know how can I increase the quality without losing file compression?
Bellow, you will find some tests comparing other ways to convert AVIF files.
To create all images used for this test, run the following commands:
Run this script to compare all images
Result:
Pictures by Marcelo Jorge Vieira licensed under CC-BY.