From 2ac3767e7a25ae5f804ecbeaff3c202d8e560408 Mon Sep 17 00:00:00 2001 From: gxalpha Date: Thu, 27 Apr 2023 20:49:52 +0200 Subject: [PATCH] obs-x264: Disallow 16-bit color formats --- plugins/obs-x264/data/locale/en-US.ini | 2 +- plugins/obs-x264/obs-x264.c | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/plugins/obs-x264/data/locale/en-US.ini b/plugins/obs-x264/data/locale/en-US.ini index 9ef9af603..cf7314b82 100644 --- a/plugins/obs-x264/data/locale/en-US.ini +++ b/plugins/obs-x264/data/locale/en-US.ini @@ -10,5 +10,5 @@ Tune="Tune" None="(None)" EncoderOptions="x264 Options (separated by space)" VFR="Variable Framerate (VFR)" -10bitUnsupported="OBS does not support using x264 with 10-bit formats." +HighPrecisionUnsupported="OBS does not support using x264 with high-precision color formats." HdrUnsupported="OBS does not support using x264 with Rec. 2100." diff --git a/plugins/obs-x264/obs-x264.c b/plugins/obs-x264/obs-x264.c index 1de88d372..4a8910659 100644 --- a/plugins/obs-x264/obs-x264.c +++ b/plugins/obs-x264/obs-x264.c @@ -694,10 +694,13 @@ static void *obs_x264_create(obs_data_t *settings, obs_encoder_t *encoder) switch (voi->format) { case VIDEO_FORMAT_I010: case VIDEO_FORMAT_P010: - obs_encoder_set_last_error(encoder, - obs_module_text("10bitUnsupported")); - warn_enc(encoder, - "OBS does not support using x264 with 10-bit formats"); + case VIDEO_FORMAT_P216: + case VIDEO_FORMAT_P416: + obs_encoder_set_last_error( + encoder, obs_module_text("HighPrecisionUnsupported")); + warn_enc( + encoder, + "OBS does not support using x264 with high-precision formats"); return NULL; default: if (voi->colorspace == VIDEO_CS_2100_PQ ||