Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > VP9 and AV1

Reply
 
Thread Tools Search this Thread Display Modes
Old 13th April 2021, 11:43   #1  |  Link
orion44
None
 
orion44's Avatar
 
Join Date: Jul 2007
Location: The Background
Posts: 240
Which VP9's crf value corresponds to x264's crf 20?

I want to encode a 480p movie with VP9 in two passes.

Google recommends to use crf 34 for low quality encoding of 480p video, and crf 33 for medium quality:

https://developers.google.com/media/vp9/settings/vod

I am also using '-tune-content film' option to optimize for grain.

Which crf value in VP9 corresponds to x264's crf 20?
orion44 is offline   Reply With Quote
Old 14th April 2021, 02:52   #2  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 3,596
I doubt there's going to be a linear relationship. Even in x264 and x265, which have more in common than either does with VP9, similar subjective quality can be up to 5 CRF values apart.

And even within one encoder, a difference of 1 CRF isn't that visible; definitely smaller than the difference between "low" and "medium" quality. Those would be more like 6 CRF apart in x264 or x265.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 18th April 2021, 16:42   #3  |  Link
takla
Registered User
 
Join Date: May 2018
Posts: 14
The text in your link talks about cq, which is not crf. Generally speaking, all google docs and most other users data is way outdated when it comes to vp9.

From personal experience, I'd advice against 2pass uses with vp9, because it enables auto-alt-ref frames, which you cannot turn off. This option forces very aggressive denoising which destroys very fine detail even with the lowest denoise settings.

I found a much clearer outcome with just 1pass, cpu-used 1 & -g=fps*10, -row-mt 1 and a very low crf value (10 to 15), aswell as denoising with mvtools (do not mess with tile settings. vpx-vp9 v1.09 and newer does a very good job with most settings on auto, except for the mentioned settings). The final video file resulted in a video file size 2 to 3 times lower over the raw bluray file.

Last edited by takla; 18th April 2021 at 16:46.
takla is offline   Reply With Quote
Old Today, 02:05   #4  |  Link
VS_Fan
Registered User
 
Join Date: Jan 2016
Posts: 97
Quote:
Originally Posted by benwaggoner View Post
I doubt there's going to be a linear relationship. Even in x264 and x265, which have more in common than either does with VP9, similar subjective quality can be up to 5 CRF values apart.
I found that there is indeed a linear relationship between the crf values for the vp9, x265 and x264 codecs. My experimental approximation:

Code:
x265_crf(x264_crf) = 1.09 * x264_crf −  4.19
vp9_crf (x264_crf) = 1.98 * x264_crf − 14.46
This means the answer to the OP's question would be: a value of crf=35.41 for the vp9 codec should encode a video with about the same quality: 18.66 SSIM dB (0.9864 SSIM), as the one generated by the x264 codec with a value of crf=20.0, or crf=17.61 for x265.

Continue reading for the details and explanation of my findings:

Last January I ran an experiment with ffmpeg (git-20210110), comparing the vp9(v1.9.0-122-gebac57ce9), x264(core 161 r3027 4121277) and x265(version 3.4) codecs. I selected a set of 20 seconds full-HD (1920x1080) videos captured with two different android phones, a canon camera, a nikon camera, and the xbox game bar in windows 10.

Each of the videos in the set was encoded using ffmpeg with each of these codecs, for 7 different crf values aiming to result in videos with quality ranging between 10 to 22 SSIM dB. A pivot table of the metrics obtained, averaging the SSIM for the set of videos at the each crf, leads to the following graphic and linear regressions, that show for each codec separately, the clear linear relationship between CRF and encoded video quality measured in SSIM dB:



This evidently, in turn, shows the linear relationship between the crf of the three codecs, as illustrated in the equations at the beginning of this post.

In the not too distant future I expect to have some time to summarize some other findings in my exercise regarding the quality, bitrate and encoding speed for each codec depending on the crf.
VS_Fan is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 15:44.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.