From ea4087d6222306612295e504b26e5fb26210a14f Mon Sep 17 00:00:00 2001 From: xufuji456 Date: Thu, 22 Sep 2022 11:07:37 +0800 Subject: [PATCH] Feature: change bitrate to kb/s --- Live/src/main/cpp/VideoStream.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Live/src/main/cpp/VideoStream.cpp b/Live/src/main/cpp/VideoStream.cpp index e11f8ee..353b871 100644 --- a/Live/src/main/cpp/VideoStream.cpp +++ b/Live/src/main/cpp/VideoStream.cpp @@ -39,11 +39,11 @@ int VideoStream::setVideoEncInfo(int width, int height, int fps, int bitrate) { //i_rc_method:bitrate control, CQP(constant quality), CRF(constant bitrate), ABR(average bitrate) param.rc.i_rc_method = X264_RC_ABR; //bitrate(Kbps) - param.rc.i_bitrate = bitrate / 1000; + param.rc.i_bitrate = bitrate / 1024; //max bitrate - param.rc.i_vbv_max_bitrate = bitrate / 1000 * 1.2; + param.rc.i_vbv_max_bitrate = bitrate / 1024 * 1.2; //unit:kbps - param.rc.i_vbv_buffer_size = bitrate / 1000; + param.rc.i_vbv_buffer_size = bitrate / 1024; //frame rate param.i_fps_num = fps;