update camera encoder
This commit is contained in:
parent
e537194897
commit
23fdde3730
@ -884,7 +884,7 @@ bool RealsenseCamera::initSingleEncoder(std::shared_ptr<FfmpegEncoderInfo>& enco
|
|||||||
ctx->time_base = {1, fps}; // 时间基(1/fps)
|
ctx->time_base = {1, fps}; // 时间基(1/fps)
|
||||||
ctx->framerate = {fps, 1}; // 帧率
|
ctx->framerate = {fps, 1}; // 帧率
|
||||||
ctx->max_b_frames = 0; // 禁用B帧(降低延迟)
|
ctx->max_b_frames = 0; // 禁用B帧(降低延迟)
|
||||||
ctx->gop_size = 10;//I帧间隔1,每一帧都是I帧
|
ctx->gop_size = 10;//I帧间隔
|
||||||
// 5. 设置编码器私有参数
|
// 5. 设置编码器私有参数
|
||||||
if (codec->id == AV_CODEC_ID_H264) {
|
if (codec->id == AV_CODEC_ID_H264) {
|
||||||
av_opt_set(ctx->priv_data, "preset", "ultrafast", 0);
|
av_opt_set(ctx->priv_data, "preset", "ultrafast", 0);
|
||||||
@ -903,6 +903,7 @@ bool RealsenseCamera::initSingleEncoder(std::shared_ptr<FfmpegEncoderInfo>& enco
|
|||||||
"min-keyint=%d:" // 最小关键帧间隔
|
"min-keyint=%d:" // 最小关键帧间隔
|
||||||
"no-open-gop=1:" // 禁用开放GOP
|
"no-open-gop=1:" // 禁用开放GOP
|
||||||
"bframes=0:" // 禁用B帧
|
"bframes=0:" // 禁用B帧
|
||||||
|
"lookahead=0:"
|
||||||
"log-level=none", // 日志级别
|
"log-level=none", // 日志级别
|
||||||
10, 10); // 设置keyint和min-keyint为10
|
10, 10); // 设置keyint和min-keyint为10
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user