New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disambiguate vpx to vp8 or vp9 #6456
Conversation
int defaultVp9Crf = 31; | ||
if (h265Crf >= 0 && h265Crf <= 51) | ||
{ | ||
var vp9Crf = Convert.ToInt32(h265Crf * 1.12); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does 1.12
come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a comment in the code, but I'll reproduce it here for posterity.
This conversion factor is chosen to match the default CRF for H.265 to the recommended 1080p CRF from Google. The factor also maps the logarithmic CRF scales of x265 [0, 51] to that of VP9 [0, 63] relatively
Resources:
if (threads <= 0) | ||
{ | ||
return 0; | ||
// Automatically set thread count | ||
return mustSetThreadCount ? Math.Max(Environment.ProcessorCount - 1, 1) : 0; | ||
} | ||
else if (threads >= Environment.ProcessorCount) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is higher than the recommended value for vpx, is it not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not change the behavior from before, but no, vpx with -row-mt
enabled should be able to exploit row-based parallelism during encoding (in addition to any tile-based parallelism).
Squashed intermediate change commits so feel free to merge whenever :) |
Changes
Currently,
vpx
is being sent by clients to refer to the VP8/VP9 codecs ambiguously when indicating transcoding jobs. This change disambiguates between them in the server while providing backwards compatibility with codecs set asvpx
, defaulting to VP8 as the codec. Additionally, as a part of this change, proper encoding support for VP9 is implemented leveraginglibvpx-vp9
.Issues
Progress on #6455