Error while lossless H265 encoding on Jetson Orin NX 16GB

Hi,
I encounter errors when trying to encode certain sequences of images.

Steps to reproduce the error:

  • create test file:
dd if=/dev/urandom of=/dev/shm/random.yuv bs=1024 count=2815350
  • lossless encoding with jetson_multimedia_api sample 01:
./video_encode /dev/shm/random.yuv 4384 2192 H265 ~/Videos/out1.h265 -p main --elossless -cf 3 --max-perf -hpt 1 --stats

I get the following errors:

===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 8 
892744264
875711833
NVMEDIA: H265 : Profile : 1 
NVMEDIA: Need to set EMC bandwidth : 2872000 
NVMEDIA_ENC: bBlitMode is set to TRUE 
NVMAP_IOC_READ:1077431815 failed [22]
[1077431815]: Offset 14417920 SrcStride 8192 pDst 0xffff825fbfa8 DstStride 8192 Count 1
NVMAP_IOC_WRITE:1077431814 failed [22]
NVMAP_IOC_READ:1077431815 failed [22]
[1077431815]: Offset 14426112 SrcStride 8192 pDst 0xffff825fbfa8 DstStride 8192 Count 1
NVMAP_IOC_WRITE:1077431814 failed [22]
NVMAP_IOC_READ:1077431815 failed [22]
[1077431815]: Offset 14434304 SrcStride 8192 pDst 0xffff825fbfa8 DstStride 8192 Count 1
NVMAP_IOC_WRITE:1077431814 failed [22]
NVMAP_IOC_READ:1077431815 failed [22]
[1077431815]: Offset 14442496 SrcStride 8192 pDst 0xffff825fbfa8 DstStride 8192 Count 1
NVMAP_IOC_WRITE:1077431814 failed [22]
NVMAP_IOC_READ:1077431815 failed [22]
[1077431815]: Offset 14450688 SrcStride 8192 pDst 0xffff825fbfa8 DstStride 8192 Count 1
NVMAP_IOC_WRITE:1077431814 failed [22]
NVMAP_IOC_READ:1077431815 failed [22]
[1077431815]: Offset 14458880 SrcStride 8192 pDst 0xffff825fbfa8 DstStride 8192 Count 1
NVMAP_IOC_WRITE:1077431814 failed [22]
NVMAP_IOC_READ:1077431815 failed [22]
[1077431815]: Offset 14467072 SrcStride 8192 pDst 0xffff825fbfa8 DstStride 8192 Count 1
NVMAP_IOC_WRITE:1077431814 failed [22]
NVMAP_IOC_READ:1077431815 failed [22]
....

Any idea how to fix this?

Note: trying the same thing with a file full of zeros instead of random data gives no errors.

Hi,
This is artificial data and hardware encoder may not work properly. Please try with real scene.

You may try with the y4m file in
Index of /video/derf/y4m

Hi @DaneLLL,
I first tried on real data and it crashes too with the same error. I gave the random example so it is easier to reproduce.

We are trying to compress large RAW Bayer RGGB8 images so we can send them out. The most promising approach we found so far is to encode with lossless parameter WxH RAW bayer images to WxH/2 YUV444 images. Each RGGB 2x2 CFA patern is converted to 2 pixels with (R, G2, B) and (R, G1, B) in YUV channels.
Unfortunately, we get the same error as described in the first post. If we look at the forged images we send to the encoder, it looks like non artificial data.

Do you have any recommendation for encoding Bayer images 4384x4384 in size at 20 fps (lossless if possible)? We are working with medical images.

Hi,
There is no hardware encoder for encoding Bayer data. Not sure if there’s software encoder supporting this. Would need other users to share experience.

We would like to focus on encoding real data. Please share the YUV444 file so that we can reproduce it by encoding the real data. And check further.

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