mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 13:08:50 +02:00
obs-x264: Block 10-bit formats
Don't want to silently generate 8-bit video.
This commit is contained in:
parent
8ca35e4e10
commit
175093b26b
@ -10,4 +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."
|
||||
HdrUnsupported="OBS does not support using x264 with Rec. 2100."
|
||||
|
@ -700,14 +700,25 @@ static void *obs_x264_create(obs_data_t *settings, obs_encoder_t *encoder)
|
||||
{
|
||||
video_t *video = obs_encoder_video(encoder);
|
||||
const struct video_output_info *voi = video_output_get_info(video);
|
||||
switch (voi->colorspace) {
|
||||
case VIDEO_CS_2100_PQ:
|
||||
case VIDEO_CS_2100_HLG:
|
||||
switch (voi->format) {
|
||||
case VIDEO_FORMAT_I010:
|
||||
case VIDEO_FORMAT_P010:
|
||||
obs_encoder_set_last_error(encoder,
|
||||
obs_module_text("HdrUnsupported"));
|
||||
obs_module_text("10bitUnsupported"));
|
||||
warn_enc(encoder,
|
||||
"OBS does not support using x264 with Rec. 2100");
|
||||
"OBS does not support using x264 with 10-bit formats");
|
||||
return NULL;
|
||||
default:
|
||||
switch (voi->colorspace) {
|
||||
case VIDEO_CS_2100_PQ:
|
||||
case VIDEO_CS_2100_HLG:
|
||||
obs_encoder_set_last_error(
|
||||
encoder, obs_module_text("HdrUnsupported"));
|
||||
warn_enc(
|
||||
encoder,
|
||||
"OBS does not support using x264 with Rec. 2100");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
struct obs_x264 *obsx264 = bzalloc(sizeof(struct obs_x264));
|
||||
|
Loading…
Reference in New Issue
Block a user