From 689419a78238626aba887e974cbfcf5dff99de81 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 10 Mar 2023 10:16:09 +0100 Subject: Fix for ffmpeg 6 (nvenc hevc doesn't support b frames) --- src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index d007b0d..5581e77 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -413,6 +413,8 @@ static AVCodecContext *create_video_codec_context(AVPixelFormat pix_fmt, codec_context->bit_rate = 0; #endif + av_opt_set_int(codec_context->priv_data, "b_ref_mode", 0, 0); + //codec_context->rc_max_rate = codec_context->bit_rate; //codec_context->rc_min_rate = codec_context->bit_rate; //codec_context->rc_buffer_size = codec_context->bit_rate / 10; -- cgit v1.2.3