0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00

UI: Suggest hw encoding by default depending on hw

In the auto-configuration dialog, use hardware encoding by default if
NVENC is available due to the fact that the latest generations of NVENC
currently has a better quality to bitrate ratio than veryfast x264 and
most other hardware devices.
This commit is contained in:
jp9000 2019-02-14 20:25:38 -08:00
parent aca8d60d0a
commit dab44ae75a

View File

@ -814,14 +814,18 @@ AutoConfig::AutoConfig(QWidget *parent)
streamPage->ui->bitrate->setValue(bitrate);
streamPage->ServiceChanged();
streamPage->ui->preferHardware->setChecked(os_get_physical_cores() <= 4);
TestHardwareEncoding();
if (!hardwareEncodingAvailable) {
delete streamPage->ui->preferHardware;
streamPage->ui->preferHardware = nullptr;
}
/* Newer generations of NVENC have a high enough quality to bitrate
* ratio that if NVENC is available, it makes sense to just always
* prefer hardware encoding by default */
bool preferHardware = nvencAvailable || os_get_physical_cores() <= 4;
streamPage->ui->preferHardware->setChecked(preferHardware);
setOptions(0);
setButtonText(QWizard::FinishButton,
QTStr("Basic.AutoConfig.ApplySettings"));