Skip to content

Commit 13a0c99

Browse files
committed
feat: set encoder bitrate during initialization
1 parent 632ef26 commit 13a0c99

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/codecs/v4l2/v4l2_encoder.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ bool V4L2Encoder::Configure(int width, int height, uint32_t src_pix_fmt, bool is
2929
V4L2_MPEG_VIDEO_H264_PROFILE_BASELINE);
3030
V4L2Util::SetExtCtrl(fd_, V4L2_CID_MPEG_VIDEO_H264_LEVEL, V4L2_MPEG_VIDEO_H264_LEVEL_4_0);
3131
V4L2Util::SetExtCtrl(fd_, V4L2_CID_MPEG_VIDEO_H264_I_PERIOD, KEY_FRAME_INTERVAL);
32+
V4L2Util::SetExtCtrl(fd_, V4L2_CID_MPEG_VIDEO_BITRATE, bitrate_bps_);
3233

3334
auto src_memory = is_dma_src ? V4L2_MEMORY_DMABUF : V4L2_MEMORY_MMAP;
3435
PrepareBuffer(&output_, width, height, src_pix_fmt, V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,

0 commit comments

Comments
 (0)