Pulsing at iframe interval using nvv4l2h265enc

Hi, this thread is essentially to reopen

I’m using r32.6.1 and I’m still seeing the problem with the out-of-the box encoder.
@DaneLLL suggested selecting VBR and setting the qp range
He also suggested a patch to apply.

a) what should I set the qp range to?
b) is this patch still needed with r32.6.1 and if so, is it still valid?


The patch is not required for r32.6.1. Please set I frame ranging from 1-5 and check the result. And then adapt the range of I/P frame to find best match.

Thank you for the info. We’re already using a low iframinterval. Any suggestions in the I/P range values to try?


@DaneLLL : My understanding is that if I reduce the max qp value for I or P, I am forcing the encoder to keep more detail (and I probably have to increase the bitrate accordingly). Is this correct?

Also, can you please comment on whether I would need to adjust the vbv parameter?

For context: Ideally, I’m hoping for good quality and sub second latency (or lower) for a 6K by 6K image, 20 fps or higher. My network is reliable, cabled ethernet so I can afford to use a higher bitrate if it helps.


Yes, reducing max qp values gives better video quality but more bitrate. Bitrate and quality are tradeoff so you would need to tune the properties to find the best match in your usecase. Another property you can try is

  preset-level        : HW preset level for encoder
                        flags: readable, writable, changeable only in NULL or READY state
                        Enum "GstV4L2VideoEncHwPreset" Default: 1, "UltraFastPreset"
                           (0): DisablePreset    - Disable HW-Preset
                           (1): UltraFastPreset  - UltraFastPreset for high perf
                           (2): FastPreset       - FastPreset
                           (3): MediumPreset     - MediumPreset
                           (4): SlowPreset       - SlowPreset

SloePreset gives better quality but worse performance throughput(fps drops). Please also adjust it and try.

Setting vbv-size works in CBR mode. There are two ways of setting the properties:

  1. VBR + qp range + preset level
  2. CBR + vbv size + preset level

For CBR + vbv size, please refer to
Random blockiness in the picture RTSP server-client -Jetson TX2 - #5 by DaneLLL

Thank you @DaneLLL .
I didn’t know that the vbv parameter was only for CBR. Good to know!

The qp range seems to help. I’ll tune again when I get to the place where I will be running the device.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.