mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-05-05 22:04:46 -04:00
obs-ffmpeg: Check if current NVENC configuration supports 4:4:4 encode
This commit is contained in:
@@ -40,6 +40,7 @@ NVENC.8bitUnsupportedHdr="OBS does not support 8-bit output of Rec. 2100."
|
||||
NVENC.I010Unsupported="NVENC does not support I010. Use P010 instead."
|
||||
NVENC.10bitUnsupported="Cannot perform 10-bit encode on this encoder."
|
||||
NVENC.16bitUnsupported="Cannot perform 16-bit encode on this encoder."
|
||||
NVENC.444Unsupported="Cannot perform 4:4:4 encode on this encoder."
|
||||
NVENC.NoAV1FallbackPossible="AV1 encoding is not available with the current settings. Try disabling any re-scaling or GPU options that may be set. Check the log for more details."
|
||||
NVENC.Preset2.p1="P1: Fastest (Lowest Quality)"
|
||||
NVENC.Preset2.p2="P2: Faster (Lower Quality)"
|
||||
|
||||
@@ -1371,12 +1371,19 @@ static bool init_encoder(struct nvenc_data *enc, enum codec_type codec,
|
||||
int bf = (int)obs_data_get_int(settings, "bf");
|
||||
const bool support_10bit =
|
||||
nv_get_cap(enc, NV_ENC_CAPS_SUPPORT_10BIT_ENCODE);
|
||||
const bool support_444 =
|
||||
nv_get_cap(enc, NV_ENC_CAPS_SUPPORT_YUV444_ENCODE);
|
||||
const int bf_max = nv_get_cap(enc, NV_ENC_CAPS_NUM_MAX_BFRAMES);
|
||||
|
||||
video_t *video = obs_encoder_video(enc->encoder);
|
||||
const struct video_output_info *voi = video_output_get_info(video);
|
||||
enc->in_format = get_preferred_format(voi->format);
|
||||
|
||||
if (enc->in_format == VIDEO_FORMAT_I444 && !support_444) {
|
||||
NV_FAIL(obs_module_text("NVENC.444Unsupported"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_10_bit(enc) && !support_10bit) {
|
||||
NV_FAIL(obs_module_text("NVENC.10bitUnsupported"));
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user