Skip to content

Commit

Permalink
obs-outputs: Prevent streaming HDR AV1/HEVC over RTMP
Browse files Browse the repository at this point in the history
Currently unsupported by all remotes accepting enhanced RTMP. This
commit may be removed at a later date.
  • Loading branch information
yuriy-chumak authored and derrod committed Mar 25, 2023
1 parent 3e2d585 commit 029ac6c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions plugins/obs-outputs/rtmp-stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -1426,6 +1426,23 @@ static void *connect_thread(void *data)
stream->start_dts_offset = get_ms_time(&packet, packet.dts);
}

// HDR streaming disabled for AV1 and HEVC
obs_output_t *context = stream->output;
obs_encoder_t *vencoder = obs_output_get_video_encoder(context);
const char *codec = obs_encoder_get_codec(vencoder);
if (strcmp(codec, "hevc") == 0 || strcmp(codec, "av1") == 0) {
video_t *video = obs_get_video();
const struct video_output_info *info =
video_output_get_info(video);

if (info->colorspace == VIDEO_CS_2100_HLG ||
info->colorspace == VIDEO_CS_2100_PQ) {
obs_output_signal_stop(stream->output,
OBS_OUTPUT_HDR_DISABLED);
return NULL;
}
}

ret = try_connect(stream);

if (ret != OBS_OUTPUT_SUCCESS) {
Expand Down

0 comments on commit 029ac6c

Please sign in to comment.