Set I frame max qp to 22 for nvidia encoder

This commit is contained in:
dijunkun
2023-09-21 17:02:35 +08:00
parent 156172accb
commit 9355b670b8
7 changed files with 44 additions and 9 deletions

View File

@@ -1,6 +1,7 @@
#include "video_decoder_factory.h"
#include "ffmpeg/ffmpeg_video_decoder.h"
#include "log.h"
#include "nvcodec/nvidia_video_decoder.h"
VideoDecoderFactory::VideoDecoderFactory() {}
@@ -26,6 +27,9 @@ bool VideoDecoderFactory::CheckIsHardwareAccerlerationSupported() {
CUvideoctxlock cudaCtxLock;
cuResult = cuvidCtxLockCreate(&cudaCtxLock, 0);
if (cuResult != CUDA_SUCCESS) {
LOG_WARN(
"System not support hardware accelerated decode, use default software "
"decoder");
return false;
}