Is it possible to disable periodic I-frame insertion for H265 encoding ?
I’m focusing low-latency encoding and decoding. So I want to insert I-frame explicitly when I needed.
And I found NvVideoEncoder::getExtControls
seems not working. I want to know which value had set by default. Is there any default encoder setting parameters list?
And I want to know acceptable value range for each controls which has integral argument.
Here is test source code. NvVideoEncoder::getExtControls
returns nothing.
Are encoder parameters write only?
#include "NvVideoEncoder.h"
#include "NvLogging.h"
#include <iostream>
void ReadConfig(NvVideoEncoder* enc){
v4l2_ext_controls req{};
v4l2_ext_control ctrl{};
ctrl.id = V4L2_CID_MPEG_VIDEO_GOP_SIZE;
req.count = 1;
req.controls = &ctrl;
req.ctrl_class = V4L2_CTRL_CLASS_MPEG;
auto ret = enc->getExtControls(req);
std::cout << "NvVideoEncoder::getExtControls: "
<< ret << ", " << ctrl.value << std::endl;
}
int main(){
log_level = LOG_LEVEL_DEBUG;
auto enc = NvVideoEncoder::createVideoEncoder("enc0");
enc->setCapturePlaneFormat(V4L2_PIX_FMT_H265, 1920, 1080, 10*1024*1024);
enc->setOutputPlaneFormat(V4L2_PIX_FMT_YUV420M, 1920, 1080);
ReadConfig(enc);
enc->setIFrameInterval(24);
ReadConfig(enc);
return 0;
}
Regards.