Skip to content

Commit

Permalink
Merge pull request #108 from luxonis/videnc_fixes
Browse files Browse the repository at this point in the history
Video encoder fixes
  • Loading branch information
SzabolcsGergely committed Apr 13, 2021
2 parents c19490c + 74103de commit a21c5e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pipeline/node/VideoEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,16 +176,16 @@ void VideoEncoder::setDefaultProfilePreset(int width, int height, float fps, Vid
const int pixelArea = width * height;
if(pixelArea <= 1280 * 720 * AREA_MUL) {
// 720p
setBitrateKbps(static_cast<int>((4000 * 1000 / ESTIMATION_FPS) * fps));
setBitrateKbps(static_cast<int>((4000 / ESTIMATION_FPS) * fps));
} else if(pixelArea <= 1920 * 1080 * AREA_MUL) {
// 1080p
setBitrateKbps(static_cast<int>((8500 * 1000 / ESTIMATION_FPS) * fps));
setBitrateKbps(static_cast<int>((8500 / ESTIMATION_FPS) * fps));
} else if(pixelArea <= 2560 * 1440 * AREA_MUL) {
// 1440p
setBitrateKbps(static_cast<int>((14000 * 1000 / ESTIMATION_FPS) * fps));
setBitrateKbps(static_cast<int>((14000 / ESTIMATION_FPS) * fps));
} else {
// 4K
setBitrateKbps(static_cast<int>((20000 * 1000 / ESTIMATION_FPS) * fps));
setBitrateKbps(static_cast<int>((20000 / ESTIMATION_FPS) * fps));
}
} break;

Expand Down

0 comments on commit a21c5e9

Please sign in to comment.