2022-05-25

WARNING: This article may be obsolete
This post was published in 2022-05-25. Obviously, expired content is less useful to users if it has already pasted its expiration date.
This article is categorized as "Garbage" . It should NEVER be appeared in your search engine's results.

strace nginx

我给我的博客提供了webp和avif的支持,但nginx access.log并不记录webp/avif被读取了,我应该如何得知这些压缩图片确实被nginx读取了?

使用 strace ,参考:🔗 [gzip - How can I check that the nginx gzip_static module is working? - Stack Overflow] https://stackoverflow.com/questions/2460821/how-can-i-check-that-the-nginx-gzip-static-module-is-working回答备份截图

anaconda pycurl

完整文章见:🔗 [PycURL的性能取决于安装方法和编译依赖 - Truxton's blog] https://truxton2blog.com/pycurl-performance-differs/

anaconda环境下安装pycurl经常出问题,如果不想配置openssl那些路径参数,有一种简洁不容易报错的安装方法:

$  conda install -c anaconda pycurl

来自:https://stackoverflow.com/a/55197682

测试avifenc的不同参数

(如无特别声明,默认cq-level=18)

(1)测试用图片:https://upload.wikimedia.org/wikipedia/commons/7/74/A-Cat.jpg

图片大小(Byte)执行时间通过avifdec变回jpg的大小butteraugli
原图2.2M
speed=6 (默认)764K8.6 s1.3M2.938205
speed=5844K22.4 s
speed=4856K29.1 s1.4M2.572569
speed=3868K66 s
speed=2876K93 s1.4M2.423154
speed=0876K1.4M2.763549
speed=7804K8.1 s1.3M3.297063
speed=8376K4.5 s1.1M4.537639
speed=9376K3.2 s
speed=10376K3.2 s
speed=6,但cq-level=27368K1.2M4.698296

对同一张图继续测试,这次侧重关注:speed能否带来较大的质量提升?

由于相近大小的图片很难凑出,只能尽可能大小接近了:

图片大小butteraugli
speed=6,但cq-level=30276K5.918262
speed=4,但cq-level=31248K6.385068
speed=7,但cq-level=18804K3.297063
speed=4,但cq-level=19828K2.684392
speed=8,但cq-level=18376K4.537639
speed=6,但cq-level=26384K4.315894
speed=6,但cq-level=27368K4.698296
speed=4,但cq-level=27372K5.513559

结论:

暂时没有结论。avif实在是太迷了。考虑到speed<6实在是太慢,而且butteraugli评分不稳定,目前还是老老实实放弃其他参数,专心使用 cq-level 调整大小吧。


 Last Modified in 2022-10-25 

Leave a Comment Anonymous comment is allowed / 允许匿名评论