Variable speed lossless H265 encoding on Jetson Orin NX 16GB

Hi,
I am experimenting with H265 lossless encoding on Jetson Orin NX 16GB.

Depending on the data to be encoded, I observe large variations in encoding speed. These are the commands to reproduce this observation:

Please note, input file is stored in RAM so that disk is not to be considered.

Test 1:

  • create a YUV file where large portion of video is static:
gst-launch-1.0 videotestsrc num-buffers=100 !  'video/x-raw, width=(int)4384, height=(int)2192, format=(string)Y444'  ! filesink location=/dev/shm/static_y444_4384_2192.yuv
  • then encode with jetson_multimedia_api sample 01:
./video_encode /dev/shm/static_y444_4384_2192.yuv 4384 2192 H265 ~/Videos/static.h265 -p main --elossless -cf 3 --max-perf -hpt 1 --stats

The resulting FPS is: 47.18 FPS (best of 5 runs)

Test 2:

  • create a YUV file filled with noise:
gst-launch-1.0 videotestsrc pattern=snow num-buffers=100 !  'video/x-raw, width=(int)4384, height=(int)2192, format=(string)Y444'  ! filesink location=/dev/shm/snow_y444_4384_2192.yuv
  • then encode with jetson_multimedia_api sample 01:
./video_encode /dev/shm/snow_y444_4384_2192.yuv 4384 2192 H265 ~/Videos/snow.h265 -p main --elossless -cf 3 --max-perf -hpt 1 --stats

The resulting FPS is: 11.73 FPS (best of 5 runs)

Could you please explain why there is such a large gap between this 2 extreme cases in encoding speed?

If you have any tip for faster lossless encoding, I am open to suggestions.

Hi,
This looks expected in lossless encoding. The complexity of scene is in proportion to bitrate. We should also see this while recording grassland or crowd in baseball field.

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