Creating a CUDA -> nveglstreamsrc gstreamer pipeline

I would like to connect a CUDA producer to a gstreamer pipeline. Right now, my CUDA producer repeatedly calls cuEGLStreamProducerPresentFrame to present egl frames to the gstreamer pipeline. The gstreamer pipeline looks something like this: nveglstreamsrc -> omxh264enc -> appsink. This works for exactly 63 frames, but after that, cuEGLStreamProducerPresentFrame fails with error code 999.

My guess is that the consumer (in this case, nveglstreamsrc), is not releasing the frame, so the egl stream queue grows until capacity, after which calls to cuEGLStreamProducerPresentFrame fail. Is this accurate? How can I fix this issue? I have already tried connecting the Argus api to the same gstreamer pipeline (as done in the gstVideoEncode sample) and it works without problems.

Please refer to

On R28.2.1/TX2, it requires to replace On r28.3, the issue is fixed and it should run fine with default

Hi DaneLLL,
I tried replacing, but ran into more errors: “NvEglStreamSrcInitializeEgl: Cannot find function NvEglRegClientApi” and “NvEGLStreamSrc: NvEglStreamSrcInitializeEgl function failed: err=8”. For reference, I am running with Jetpack 4.2, which I believe runs L4T 32.1.

You don’t need the prebuilt lib on r32.1 and the sample should work fine. However, it is eglstream producer and may not be your usecase.

For running CUDA producer, we have a sample and you can execute

$ /usr/local/cuda/bin/ ~/

and refer to


Please also refer to
Calling cuEGLStreamProducerReturnFrame() accordingly is necessary.