We have a very reproducible issue when encoding multiple mp4 videos. This reproduces on Xavier AGX, on the latest and previous versions of Jetpack.
Our sample application creates small videos by successively creating encoders and freeing them. Our real life use case is to split long videos into manageable sizes. After video 165, we have these errors:
Starting NVMME enc0 video encoding to 166-test-vid.mp4
NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
875967048
842091865
H264: Profile = 77, Level = 0
NVMME enc0 beginEncoding succeeded for 166-test-vid.mp4
NvMMLiteNvMediaCreate:3702: NvMediaDeviceCreate failed
NVMEDIA_ENC: 3996: Failed to create NvMedia encoder
VENC: NvMMLiteVideoEncDoWork: 4283: BlockSide error 0x4
NvVideoEnc: BlockError
NvVideoEncTransferCaptureBufferToBlock: DoWork failed line# 631
NvVideoEncTransferOutputBufferToBlock: DoWork failed line# 667
NvVideoEnc: NvVideoEncTransferOutputBufferToBlock TransferBufferToBlock failed Line=678
NvVideoEncTransferCaptureBufferToBlock: DoWork failed line# 631
NvVideoEncTransferOutputBufferToBlock: DoWork failed line# 667
NvVideoEnc: NvVideoEncTransferOutputBufferToBlock TransferBufferToBlock failed Line=678
NvVideoEncTransferOutputBufferToBlock: DoWork failed line# 667
NvVideoEnc: NvVideoEncTransferOutputBufferToBlock TransferBufferToBlock failed Line=678
[NvMediaDeviceCreate:95] Unable to create TVMR device[ERROR] (/usr/src/jetson_multimedia_api/samples/common/classes/NvV4l2ElementPlane.cpp:178) <enc0> Output Plane:Error while DQing buffer: Invalid argument
[ERROR] (/usr/src/jetson_multimedia_api/samples/common/classes/NvV4l2ElementPlane.cpp:178) <enc0> Capture Plane:Error while DQing buffer: Invalid argument
NVMME enc0 failed to dequeue buffer from encoder capture plane
NVMME enc0 deInit()
NVMME enc0 endEncoding() for 166-test-vid.mp4
Attached is complete code and makefile, should work on a jetson with jetpack.
vidrepro.tar.gz (32.7 KB)
Note: Our encoder class relies on the files provided by Jetpack on /usr/src/jetson_multimedia_api/samples/common/classes
.
Thank you for your help!