1

I wrote a code to encode a 1080p video to AV1 codec to reduce the file size. At the same time, I encoded the same video to x265. As they say, AV1 should reduce the size around 40-50% more than x265. But I didn't achieve it.

The original file size: 74 MB

the file encoded with AV1: 53 MB

The file encoded with x265: 34 MB

My AV1 code:

ffmpeg -i "input.webm" -vcodec libsvtav1 -preset 4 -crf 38 -acodec libopus -ac 1 -b:a 24K "output.mkv";

My x265 code:

ffmpeg -i "input.webm" -vcodec libx265 -preset fast -crf 31 -acodec libopus -ac 1 -b:a 24K "output.mkv";

I used a higher CRF for AV1 code to get a smaller file, but it didn't work. What's wrong with my AV1 code?

I used different input files and got similar results. My OS: Ubuntu 24.10

living being
  • 1,106

1 Answers1

0

I'd compare encode speed and quality with some reference default values for each codec.

For the old libx265 I have used -crf 28 -preset medium as a reference.

For my initial AV1 libsvtav1 experiments I have used -crf 35 -preset 5 which is 1.8x larger output for my usual 1 minute .dv test clip compared to libx265 while with libsvtav1 -crf 40 -preset 5 the output file size is about the same at least for that input.

My Intel Mac does not natively support AV1 so I am still on the fence looking at AV1 and have not yet done quality checks.

FWIW I use libx265 -crf 18 -preset slow to slightly overdo output quality with the worst quality input.

wywh
  • 66