Skip to content

Commit

Permalink
H.265 のエンコーダーに Level と HWPresetType を設定する
Browse files Browse the repository at this point in the history
  • Loading branch information
enm10k committed Feb 2, 2024
1 parent afe6698 commit 80bdf10
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/hwenc_jetson/jetson_video_encoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,13 @@ int32_t JetsonVideoEncoder::JetsonConfigure() {
// V4L2_MPEG_VIDEO_H265_PROFILE_MAIN or V4L2_MPEG_VIDEO_H265_PROFILE_MAIN10
ret = encoder_->setProfile(V4L2_MPEG_VIDEO_H265_PROFILE_MAIN);
INIT_ERROR(ret < 0, "Failed to setProfile");

// https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding_tiers_and_levels#Levels
ret = encoder_->setLevel(V4L2_MPEG_VIDEO_H265_LEVEL_6_2_HIGH_TIER);
INIT_ERROR(ret < 0, "Failed to setLevel");

ret = encoder_->setHWPresetType(V4L2_ENC_HW_PRESET_ULTRAFAST);
INIT_ERROR(ret < 0, "Failed to setHWPresetType");
} else if (codec_.codecType == webrtc::kVideoCodecVP8) {
uint32_t qp_min =
codec_.mode == webrtc::VideoCodecMode::kScreensharing ? 12 : 2;
Expand Down

0 comments on commit 80bdf10

Please sign in to comment.