We’re trying to track down a video encode problem on TX1 with the latest Jetson 4.4.1 release. Our problem is video encoding throws strange encoding problems in the long run. We’re able to reproduce our results with NVIDIA samples, namely the 01_video_encode demo in the multimedia samples. What we do is:
- Spawn 8 video encoder processes with 1080p resolution, all high profile
- Wait for all to finish
- Restart all if no errors
- Quit if any of the video encoders fail
Here is the log from video_encode application when the error occurs:
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
Creating Encoder in blocking mode
Opening in BLOCKING MODE
875967048
842091865
H264: Profile = 100, Level = 51
NvRmChannelSubmit: NvError_IoctlFailed with error code 22
NvRmPrivFlush: NvRmChannelSubmit failed (err = 196623, SyncPointIdx = 4, SyncPointValue = 0)
fence_set_name ioctl failed with 22
NvMMLiteVideoEncDoWork:NvMSEncConvertSurfaceFormat failed
VENC: NvMMLiteVideoEncDoWork: 4283: BlockSide error 0x4
NvVideoEnc: BlockError
NvVideoEncTransferOutputBufferToBlock: DoWork failed line# 667
NvVideoEnc: NvVideoEncTransferOutputBufferToBlock TransferBufferToBlock failed Line=678
[ERROR] (NvV4l2ElementPlane.cpp:178) <enc0> Capture Plane:Error while DQing buffer: Invalid argument
Error while dequeing buffer from output plane
NvVideoEncTransferCaptureBufferToBlock: DoWork failed line# 631
NvVideoEncTransferCaptureBufferToBlock: DoWork failed line# 631
NvVideoEncTransferCaptureBufferToBlock: DoWork failed line# 631
[ERROR] (NvV4l2ElementPlane.cpp:178) <enc0> Output Plane:Error while DQing buffer: Invalid argument
ERROR while DQing buffer at output plane
Encoder is in error
We’ve created a simple bash script demonstrating the issue, source codes can be accessed from [1]. Our Jetpack version is:
# R32 (release), REVISION: 4.4, GCID: 23942405, BOARD: t210ref, EABI: aarch64, DATE: Fri Oct 16 19:44:43 UTC 2020
And we are running video_encode application with the following command:
./video_encode test.raw 1920 1080 H264 out.264 -p high
where test.raw is a random data generated with the following command:
dd if=/dev/urandom of=test.raw bs=3110400 count=30
size is arbitrary, data is random to cause maximum entropy to stress encoder. Please note that this issue is present long before Jetpack 4.4, we’re seeing similar problems with Jetpack 3.3 as well.
Thanks,
Caglar
[1] https://gitlab.com/sparsetech/jetson-video-encode-stress-test