diff --git a/plugins/obs-ffmpeg/data/locale/en-US.ini b/plugins/obs-ffmpeg/data/locale/en-US.ini index 9652be160..e8b73293c 100644 --- a/plugins/obs-ffmpeg/data/locale/en-US.ini +++ b/plugins/obs-ffmpeg/data/locale/en-US.ini @@ -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)" diff --git a/plugins/obs-ffmpeg/obs-nvenc.c b/plugins/obs-ffmpeg/obs-nvenc.c index 62e5a4ca2..54436daee 100644 --- a/plugins/obs-ffmpeg/obs-nvenc.c +++ b/plugins/obs-ffmpeg/obs-nvenc.c @@ -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;