From 0cc7ed4382fdaa2a06c932a417bb89c5c24327e1 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 11 Aug 2022 21:35:29 +0100 Subject: [PATCH] obs-ffmpeg: Add b-frame logging for AMD encoder Add b-frame value to log for the AMD ENcoder When checking for b-frame support, also set bf=0 so the log will reflect reality. --- plugins/obs-ffmpeg/texture-amf.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/obs-ffmpeg/texture-amf.cpp b/plugins/obs-ffmpeg/texture-amf.cpp index d0228b1c8..2de251227 100644 --- a/plugins/obs-ffmpeg/texture-amf.cpp +++ b/plugins/obs-ffmpeg/texture-amf.cpp @@ -1137,6 +1137,7 @@ static bool amf_avc_init(void *data, obs_data_t *settings) warn("B-Frames set to %lld but b-frames are not " "supported by this device", bf); + bf = 0; } int rc = get_avc_rate_control(rc_str); @@ -1175,11 +1176,12 @@ static bool amf_avc_init(void *data, obs_data_t *settings) "\tkeyint: %d\n" "\tpreset: %s\n" "\tprofile: %s\n" + "\tb-frames: %d\n" "\twidth: %d\n" "\theight: %d\n" "\tparams: %s", - rc_str, bitrate, qp, gop_size, preset, profile, enc->cx, enc->cy, - ffmpeg_opts); + rc_str, bitrate, qp, gop_size, preset, profile, bf, enc->cx, + enc->cy, ffmpeg_opts); return true; }