Achieving 30fps Encode on Jetson Nano

Hi,
I have the following gstreamer pipeline in which I am attempting to achieve 4k30 encoding (the Jetson Nano datasheet specifies that this is supported for H265). However I am only achieving 21fps and other sources online also show benchmark results of 21fps (e.g. RidgeRun’s wiki article (Jetson Nano GStreamer example pipelines for H264 H265 and VP8 Encoding).

Why is this and how can I achieve the full 30fps encoder performance?

Settings:

  • Power Mode - MAXN
  • Jetson Clocks - On

Pipeline:

gst-launch-1.0 nvarguscamerasrc sensor-id=0 sensor-mode=0 wbmode=1 saturation=0.0 tnr-mode=1 tnr-strength=0.25 gainrange="1.0 1.0" ispdigitalgainrange="1.0 1.0" ee-mode=0 ee-strength=0.0 ! "video/x-raw(memory:NVMM), stream-format=(string)NV12, width=4056, height=3040, framerate=30/1" ! nvv4l2h265enc ! "video/x-h265, stream-format=(string)byte-stream" ! h265parse ! splitmuxsink muxer=mp4mux location=/home/nvidia/Documents/video_0_%d.mp4 max-size-time=60000000000

Edit: I should mention that this pipeline uses splitmuxsink, but I have tried with standard filesink and other options as well with the same results.
Edit 2: Setting mapperf-enable=true on the encoder has no effect on the achieved encoding FPS.

Hi,
Please set the property to nvv4l2h265enc to get maximum throughput:

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

Since the resolution 4056x3040 is above 4K 3840x2160, it may not achieve 30fps. Please note this.

Hi DaneLLL, thanks for the suggestion, unfortunately maxperf-enabled doesn’t change my results at all.

I was under the impression that image 4096 pixel width was the capacity of the encoder (“true” 4K definition vs 4k UHD at 3840 pixel wide image) and therefore what the 30fps performance specification was based on. Is this not the case?

How is encoder performance expected to scale with larger images? I assume it is by total image area, for example if I calculate the ratio between 4056x3040 and 3840x2160 and apply that to the expected 30fps performance the result is ~20.2fps, lower than I am achieving (it’s more like ~21.1fps) but perhaps there is a bit of breathing room in the encoder spec.

Thanks.

Hi,
The capability listed in module data sheet is standard resolutions, such as 3840x2160, 1920x1080. So it can encode in 3840x2160 30fps. If your resolution is higher, frame rate is expected to be lower.

3840x2160 30fps is guaranteed in the data sheet, so in real run, fps will be a bit higher than it.

1 Like

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