AVIF image size is very big


I have compiled opencv with avif support, i have tried it with the following code:

final MatOfInt matInt = new MatOfInt(Imgcodecs.IMWRITE_AVIF_QUALITY, 50);
final VideoWriter vw = new VideoWriter("sample2.avif", 0, 0, sz, matInt);

but it seems MatOfInt params is not supported

[ERROR:0@0.275] global cap_ffmpeg_impl.hpp:2726 open VIDEOIO/FFMPEG: unsupported parameters in VideoWriter, see logger INFO channel for details

it generates the file at the end but it is very huge compared to others like webp

I tried without MatOfInt paramsbut again the same output

how can i control the quality of the avif output ?