Hi!
We started having issues with the hardware encoder after updating to the Jetpack 6.0 GA (R36.3.0).
We have noticed that whenever we encode raw YUV (V4L2_PIX_FMT_YUV420M) to h264, we see a lot of error messages on the journal:
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to unpin memory for NvVIC 11
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to pin memory, handle already pinned as read-only
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to pin memory for NvVIC 13
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to unpin memory, no such handle being tracked
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to unpin memory for NvVIC 11
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to pin memory, handle already pinned as read-only
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to pin memory for NvVIC 13
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to unpin memory, no such handle being tracked
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to unpin memory for NvVIC 11
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to pin memory, handle already pinned as read-only
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to pin memory for NvVIC 13
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to unpin memory, no such handle being tracked
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to unpin memory for NvVIC 11
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to pin memory, handle already pinned as read-only
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to pin memory for NvVIC 13
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to unpin memory, no such handle being tracked
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to unpin memory for NvVIC 11
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to pin memory, handle already pinned as read-only
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to pin memory for NvVIC 13
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to unpin memory, no such handle being tracked
Jul 04 11:02:01 orin-devkit video_cuda_enc[10413]: Module_id 56 Severity 2 : failed to unpin memory for NvVIC 11
The final encoded file seems to be correct, but the journal gets completely flooded with the above errors.
The same problem doesn’t happen if we try to encode V4L2_PIX_FMT_NV12M (instead of YUV420M) to h264.
We also haven’t had this issue before updating to the 6.0 GA.
The error can be reproduced through the following steps:
1. Install the multimedia API
$ sudo apt install nvidia-l4t-jetson-multimedia-api
2. Build the video_cuda_enc sample
$ cd /usr/src/jetson_multimedia_api/samples/03_video_cuda_enc
$ sudo make
3. Try to encode yuv420 to h264
$ ./video_cuda_enc /tmp/test.yuv 1920 1080 H264 /tmp/test.h264
4. Check logs on journal
Please advise on any fix that we could try or identifying what is causing the issue. Thanks!