Image metrics for bitrate when using CQP

Hi Nvidia,
When setting the Constant Quantization Parameter (CQP), which image metrics or features can be used to determine whether the scene is complex or simple?

When using the CQP (Constant Quantization Parameter) setting, we have observed that some scenes exhibit relatively high bitrates while others show relatively low bitrates. We would like to employ certain image-based metrics to characterize the features of these scenes.

Thanks!

Hi,

Could you share more information about the CQP you mentioned?
Which framework/library do you want to use?

Thanks.

Constant Quantization Parameter (CQP) is the video encode method, please refer: How to set CQP encode mode in Jetson AGX Orin - #2 by carolyuu

Thanks for the reference! To provide more targeted guidance on image metrics for scene complexity assessment with CQP, could you clarify a few details:

  1. Framework/Library: Which specific tool or library are you using for CQP encoding? (e.g., NVIDIA Video Codec SDK, GStreamer, FFmpeg, or another framework?)
  2. Hardware Platform: Are you working specifically with Jetson AGX Orin, or a different platform?
  3. Metrics of Interest: What specific image metrics are you currently considering or have access to? (e.g., entropy, edge density, motion vectors, color variance, or others?)

Once we understand your setup and constraints, we can recommend the most relevant metrics for characterizing scene complexity in your use case.

  1. we would like to use CQP in jetson_multimedia_api SDK.

  2. Only in Jetson AGX Orin.

  3. At present, we do not have any specific image metrics under consideration or available for acquisition. We would like to seek official guidance from NVIDIA on which metrics would be most effective in helping us assess scene complexity. Specifically, we would like to understand what parameters the encoder uses in CQP mode to determine whether to allocate a high or low bitrate, and whether such parameters can be calculated or obtained in practice. This would help us better understand the relationship among QP, scene characteristics, and bitrate.

  4. Another question: Are the NVENC encoding algorithms integrated in server GPUs (e.g., RTX 4080) and in-vehicle SoCs (e.g., Jetson Orin) consistent? Since each GPU supports different encoding performance levels, if we encode the same image with identical parameters on a server GPU and on an automotive SoC such as Jetson Orin, will the encoding results be identical, or at least the discrepancy be negligibly small? This information would help us determine whether the test results and parameters obtained on server GPUs can be directly applied to Orin.

Hi,
As suggested in
How to set CQP encode mode in Jetson AGX Orin - #7 by DaneLLL

You can try the commands like:

01_video_encode$ gst-launch-1.0 videotestsrc num-buffers=166 ! video/x-raw,width=1920,height=1080,format=I420 ! filesink location=1080.yuv
01_video_encode$ ./video_encode 1080.yuv 1920 1080 H264 out.264 --report-metadata --econstqp -qpi 15 20 20

Each frame is encoded in fixed qp value and the encoded bits depend to complexity of the frame. It the scene is idnetical but encoded bits are different, it may de due to encoding to IDR/I frames or P frames. IDR/I frames are with larger bits under same QP value, comparing to P(or B) frames.

Hi,
We are using all intra‑frames (I‑frames). Could you please advise how frame complexity is evaluated? Are there any metrics available to compute frame complexity?

Hi,
You may dump motion vectors to get more information:

01_video_encode$ ./video_encode 1080.yuv 1920 1080 H264 out.264 --report-metadata --mvdump --econstqp -qpi 15 20 20

Except --report-metadata and --mvdump, there is no further infromation.