TX2i video encoder frequency

Hello,

we have found that video encoder frequency on TX2i is lower by 25% compared to TX2 (883 MHz vs 1165 MHz). This entails corresponding loss in performance, which is quite significant for our project. Is there a way to overclock somehow the video encoder on TX2i? Other system clocks (e.g. CPU and EMC) seem not to have such a big drop in frequency when switching from TX2 to TX2i.

Hi,
There is a property in nvv4l2h264enc:

> maxperf-enable      : Enable or Disable Max Performance mode
                        flags: readable, writable, changeable only in NULL or READY state
                        Boolean. Default: false

Please enable it and check if there is improvement.

This property is enabled, it just fixes frequency to the maximum value as observed by tegrastats. Encoding is indeed faster with this option than without, but doesn’t change the 25% difference between TX2 and TX2i.

Hi,
TX2i is for industrial environment. We will check and evaluate your request. Will update.

Maybe we don’t actually need to increase frequency of encoder, because according to specification we currently aren’t reaching the declared H265 encoder performance. In the document named “DATA SHEET NVIDIA Jetson TX2 Series System-on-Module” it’s written:

H.265 2160p60 | (3x) 2160p30 | (4x)1080p60 | (8x) 1080P30

3x 3840x2160 30 FPS is 746.5 MP/s

But we are getting closer to one third of that with 4 streams 3968x3010 - 5 FPS on TX2, even less on TX2i. It also depends on settings like bitrate. Could you give us some information about H265 encoder?

  1. What is the maximum reachable MP/s speed of encoder on TX2 on TX2i (obviously they are different, but it’s not documented anywhere)?
  2. Does it depend on:
    a. number of streams
    b. image size
    c. output bitrate
    d. 10 or 8 bit mode
    e. other encoder settings
    f. GPU or EMC load
    g. scene contents (e.g. how dynamic it is)
    h. anything else?
  3. How do presets work? It seems that H.265 has only 2 settings - TEGRA_FAST and TEGRA_SLOW. All others (TEGRA_ULTRAFAST and TEGRA_MEDIUM) give the same result as TEGRA_SLOW. Is this a bug? What exactly these presets change? There is a description in “ACCELERATED GSTREAMER USER GUIDE”, but given that not all of them work with H265, I suspect that information is only actual for H.264 codec.
  4. Any advice on reaching the declared performance aside from maxperf-enable option? Does it matter if multiple streams are encoded from one process (different threads) or from separate processes?

Hi,
We have confirmed the max clock of NVENC is 833MHz on TX2i.
The spec listed in documents are mainly for TX2 and there may be degrade to run on TX2i. Please try with sudo nvpmodel -m 0 and sudo jetson_clocks. see if the setting brings improvement.

For more information, please share your usecase. We verify standard resolutions(3840x2160, 1920x1080, …) in SQA tests and your resolution looks unique.

Hi,

we have reached the desired performance by using FAST preset and 8-bit encoding (we were using 10-bit before). I assume encoding speed from TX2 specification was measured with ULTRAFAST preset and 8-bit encoding.

Still, if you have any information you can give us regarding questions 2 and 3 from my previous post it would be most helpful.

Regarding ULTRAFAST and MEDIUM presets not working - I actually can’t reproduce anymore ULTRAFAST being as slow as SLOW preset. But MEDIUM seems to be indistinguishable in speed to SLOW for any codec (H264, H265 8 and 10 bits). Also, in header file v4l2_nv_extensions.h one more preset option exists - V4L2_ENC_HW_PRESET_DISABLE - what effect does it have?

1 Like

One more question - I see in R32.3.1 new encoding parameter was added - H265 level. What is its default value? I mean what happens if application doesn’t set the level?

Hi,

It is dummy definition we add in integrating gst-v4l2 public code. It does not have effect and please not use it.

If it is not set, it is automatically selected in encoder per resolution and framerate.

All levels are listed in

Hi,

thank you for your answers.

I’ve found the following mention of DISABLE preset in gst-inspect-1.0 nvv4l2h265env output:

  quant-i-frames      : Quantization parameter for I-frames (0xffffffff=component default),
                         use with ratecontrol-enable = 0
                         and preset-level = 0
                        flags: readable, writable, changeable only in NULL or READY state
                        Unsigned Integer. Range: 0 - 4294967295 Default: 4294967295
  quant-p-frames      : Quantization parameter for P-frames (0xffffffff=component default),
                         use with ratecontrol-enable = 0
                         and preset-level = 0
                        flags: readable, writable, changeable only in NULL or READY state
                        Unsigned Integer. Range: 0 - 4294967295 Default: 4294967295
  quant-b-frames      : Quantization parameter for B-frames (0xffffffff=component default),
                         use with ratecontrol-enable = 0
                         and preset-level = 0
                        flags: readable, writable, changeable only in NULL or READY state
                        Unsigned Integer. Range: 0 - 4294967295 Default: 4294967295

It looks like it’s describing ConstQP encoding mode. Is it what ratecontrol-enable = 0 means? Why preset has to be DISABLED for that? Also qp-range seems to overlap with these 3 parameters, I wonder how they interact.

Hi,
The properties are to configure constant QP values to IDR/I/P/B frames. No VBR/CBR algorithm is run in this mode.

On r32.3.1, there is an issue of configuring control-rate(CBR/VBR). Please check the patch in