How to resolve error "gstDecoder -- failed to retrieve next image buffer"

Hi

I am using python code from here jetson-inference/detectnet-example-2.md at master · dusty-nv/jetson-inference · GitHub and running it on a video file. I have noticed that it runs fine sometimes but then shows the error gstDecoder -- failed to retrieve next image buffer. Below is the full output

[video]  created gstDecoder from file:///home/john/Documents/video/2022-11-16T13-05-01.mp4
------------------------------------------------
gstDecoder video options:
------------------------------------------------
  -- URI: file:///home/john/Documents/video/2022-11-16T13-05-01.mp4
	 - protocol:  file
	 - location:  /home/john/Documents/video/2022-11-16T13-05-01.mp4
	 - extension: mp4
  -- deviceType: file
  -- ioType:     input
  -- codec:      h264
  -- width:      2592
  -- height:     1944
  -- frameRate:  25.000000
  -- bitRate:    0
  -- numBuffers: 4
  -- zeroCopy:   true
  -- flipMethod: none
  -- loop:       0
  -- rtspLatency 2000
------------------------------------------------
[gstreamer] opening gstDecoder for streaming, transitioning pipeline to GST_STATE_PLAYING
[gstreamer] gstreamer changed state from NULL to READY ==> mysink
[gstreamer] gstreamer changed state from NULL to READY ==> capsfilter1
[gstreamer] gstreamer changed state from NULL to READY ==> omxh264dec-omxh264dec0
[gstreamer] gstreamer changed state from NULL to READY ==> h264parse1
[gstreamer] gstreamer changed state from NULL to READY ==> queue0
[gstreamer] gstreamer changed state from NULL to READY ==> qtdemux1
[gstreamer] gstreamer changed state from NULL to READY ==> filesrc0
[gstreamer] gstreamer changed state from NULL to READY ==> pipeline0
[gstreamer] gstreamer changed state from READY to PAUSED ==> capsfilter1
[gstreamer] gstreamer changed state from READY to PAUSED ==> omxh264dec-omxh264dec0
[gstreamer] gstreamer changed state from READY to PAUSED ==> h264parse1
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> queue0
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer stream status CREATE ==> sink
[gstreamer] gstreamer changed state from READY to PAUSED ==> qtdemux1
[gstreamer] gstreamer changed state from READY to PAUSED ==> filesrc0

(python3:15511): GStreamer-CRITICAL **: 19:26:23.699: gst_caps_is_empty: assertion 'GST_IS_CAPS (caps)' failed

(python3:15511): GStreamer-CRITICAL **: 19:26:23.699: gst_caps_truncate: assertion 'GST_IS_CAPS (caps)' failed

(python3:15511): GStreamer-CRITICAL **: 19:26:23.699: gst_caps_fixate: assertion 'GST_IS_CAPS (caps)' failed

(python3:15511): GStreamer-CRITICAL **: 19:26:23.699: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed

(python3:15511): GStreamer-CRITICAL **: 19:26:23.699: gst_structure_get_string: assertion 'structure != NULL' failed

(python3:15511): GStreamer-CRITICAL **: 19:26:23.699: gst_mini_object_unref: assertion 'mini_object != NULL' failed
NvMMLiteOpen : Block : BlockType = 261 
NVMEDIA: Reading vendor.tegra.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 261 
Allocating new output: 2592x1952 (x 8), ThumbnailMode = 0
OPENMAX: HandleNewStreamFormat: 3605: Send OMX_EventPortSettingsChanged: nFrameWidth = 2592, nFrameHeight = 1944 
[gstreamer] gstreamer stream status ENTER ==> sink
[gstreamer] gstreamer message stream-start ==> pipeline0
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer message duration-changed ==> h264parse1
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstDecoder -- onPreroll()
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ /\ AVC", bitrate=(uint)3108665;
[gstreamer] gstreamer mysink taglist, title=(string)"Session\ streamed\ with\ GStreamer", comment=(string)rtsp-server, encoder=(string)Lavf57.83.100, container-format=(string)"ISO\ MP4/M4A";
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(High\ Profile\)", bitrate=(uint)3108665;
[gstreamer] gstBufferManager -- map buffer size was less than max size (1008 vs 7558272)
[gstreamer] gstBufferManager recieve caps:  video/x-raw(memory:NVMM), format=(string)NV12, width=(int)2592, height=(int)1944, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)25/1
[gstreamer] gstBufferManager -- recieved first frame, codec=h264 format=nv12 width=2592 height=1944 size=7558272
[gstreamer] gstBufferManager -- recieved NVMM memory
RingBuffer -- allocated 4 buffers (8 bytes each, 32 bytes total)
[gstreamer] gstreamer changed state from READY to PAUSED ==> mysink
[gstreamer] gstreamer changed state from READY to PAUSED ==> pipeline0
[gstreamer] gstreamer message async-done ==> pipeline0
[gstreamer] gstreamer message new-clock ==> pipeline0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> mysink
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> capsfilter1
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> omxh264dec-omxh264dec0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> h264parse1
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> queue0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> qtdemux1
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> filesrc0
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> pipeline0
nvbuf_utils: dmabuf_fd 1362 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
nvbuf_utils: dmabuf_fd 1364 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
nvbuf_utils: dmabuf_fd 1366 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
RingBuffer -- allocated 4 buffers (15116544 bytes each, 60466176 bytes total)
[OpenGL] glDisplay -- set the window size to 1036x777
[OpenGL] creating 1036x777 texture (GL_RGB8 format, 2414916 bytes)
[cuda]   registered openGL texture for interop access (1036x777, GL_RGB8, 2414916 bytes)
nvbuf_utils: dmabuf_fd 1368 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
nvbuf_utils: dmabuf_fd 1370 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(High\ Profile\)", bitrate=(uint)3108665, minimum-bitrate=(uint)489200, maximum-bitrate=(uint)489200;
nvbuf_utils: dmabuf_fd 1380 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(High\ Profile\)", bitrate=(uint)3108665, minimum-bitrate=(uint)489200, maximum-bitrate=(uint)515400;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(High\ Profile\)", bitrate=(uint)3108665, minimum-bitrate=(uint)489200, maximum-bitrate=(uint)658800;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(High\ Profile\)", bitrate=(uint)3108665, minimum-bitrate=(uint)480000, maximum-bitrate=(uint)658800;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(High\ Profile\)", bitrate=(uint)3108665, minimum-bitrate=(uint)480000, maximum-bitrate=(uint)665600;
nvbuf_utils: dmabuf_fd 1362 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
[gstreamer] gstBufferManager -- failed to retrieve timestamp buffer (default to 0)
nvbuf_utils: dmabuf_fd 1372 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
[gstreamer] gstBufferManager -- failed to retrieve timestamp buffer (default to 0)
nvbuf_utils: dmabuf_fd 1376 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
nvbuf_utils: dmabuf_fd 1362 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
[gstreamer] gstBufferManager -- failed to retrieve timestamp buffer (default to 0)
nvbuf_utils: dmabuf_fd 1368 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(High\ Profile\)", bitrate=(uint)3108665, minimum-bitrate=(uint)480000, maximum-bitrate=(uint)671400;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(High\ Profile\)", bitrate=(uint)3108665, minimum-bitrate=(uint)480000, maximum-bitrate=(uint)729800;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(High\ Profile\)", bitrate=(uint)3108665, minimum-bitrate=(uint)480000, maximum-bitrate=(uint)736800;
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(High\ Profile\)", bitrate=(uint)3108665, minimum-bitrate=(uint)480000, maximum-bitrate=(uint)80345600;
nvbuf_utils: dmabuf_fd 1376 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
nvbuf_utils: dmabuf_fd 1378 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
nvbuf_utils: dmabuf_fd 1380 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
nvbuf_utils: dmabuf_fd 1374 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(High\ Profile\)", bitrate=(uint)3108665, minimum-bitrate=(uint)473200, maximum-bitrate=(uint)80345600;
nvbuf_utils: dmabuf_fd 1364 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
nvbuf_utils: dmabuf_fd 1366 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
[gstreamer] gstBufferManager -- failed to retrieve timestamp buffer (default to 0)
nvbuf_utils: dmabuf_fd 1370 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
nvbuf_utils: dmabuf_fd 1376 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
nvbuf_utils: dmabuf_fd 1378 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
nvbuf_utils: dmabuf_fd 1366 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
[gstreamer] gstBufferManager -- failed to retrieve timestamp buffer (default to 0)
nvbuf_utils: dmabuf_fd 1370 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
[gstreamer] gstBufferManager -- failed to retrieve timestamp buffer (default to 0)
nvbuf_utils: dmabuf_fd 1374 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
nvbuf_utils: dmabuf_fd 1376 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
nvbuf_utils: dmabuf_fd 1374 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
[gstreamer] gstBufferManager -- failed to retrieve timestamp buffer (default to 0)
nvbuf_utils: dmabuf_fd 1378 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
nvbuf_utils: dmabuf_fd 1382 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
[gstreamer] gstBufferManager -- failed to retrieve timestamp buffer (default to 0)
nvbuf_utils: dmabuf_fd 1364 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
[gstreamer] gstBufferManager -- failed to retrieve timestamp buffer (default to 0)
nvbuf_utils: dmabuf_fd 1370 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
nvbuf_utils: dmabuf_fd 1362 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
[gstreamer] gstBufferManager -- failed to retrieve timestamp buffer (default to 0)
nvbuf_utils: dmabuf_fd 1368 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
nvbuf_utils: dmabuf_fd 1382 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
[gstreamer] gstBufferManager -- failed to retrieve timestamp buffer (default to 0)
nvbuf_utils: dmabuf_fd 1368 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
nvbuf_utils: dmabuf_fd 1370 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
nvbuf_utils: dmabuf_fd 1378 mapped entry NOT found
nvbuf_utils: NvReleaseFd Failed... Exiting...
[gstreamer] gstDecoder -- failed to retrieve next image buffer
[gstreamer] gstreamer mysink taglist, video-codec=(string)"H.264\ \(High\ Profile\)", bitrate=(uint)3108665, minimum-bitrate=(uint)473200, maximum-bitrate=(uint)81252400;
[gstreamer] gstDecoder -- stopping pipeline, transitioning to GST_STATE_NULL
[gstreamer] gstDecoder -- onPreroll()
[gstreamer] gstreamer changed state from PLAYING to PAUSED ==> capsfilter1
[gstreamer] gstreamer changed state from PLAYING to PAUSED ==> omxh264dec-omxh264dec0
[gstreamer] gstreamer changed state from PLAYING to PAUSED ==> h264parse1
[gstreamer] gstreamer changed state from PLAYING to PAUSED ==> queue0
[gstreamer] gstreamer changed state from PLAYING to PAUSED ==> qtdemux1
[gstreamer] gstreamer changed state from PLAYING to PAUSED ==> filesrc0
[gstreamer] gstreamer changed state from PLAYING to PAUSED ==> pipeline0
[gstreamer] gstDecoder -- pipeline stopped

Is there anyway to resolve this issue

Hi @ART97, given the amount of messages you are getting from nvbuf_utils (which I suspect may be related to the resolution of your video), you may want to try rebuilding jetson-inference with the -DENABLE_NVMM=off cmake option:

cd jetson-inference/build
cmake -DENABLE_NVMM=off ../
make
sudo make install

If you try a video of a different/lower resolution (or more standard resolution), does that work for you?

Hi dusty_nv

Thanks for your reply. I was using videos from the camera which was set for a very high resolution. I have changed the resolution now to 1280x720 and it looks like the issue is somewhat resolved as I am not getting too much errors now.

Do you recommend any set resolution?

Thanks

Although they aren’t technically limited to these as long as the width/height are even numbers IIRC, when using the hardware codecs typically I’ve found that the standard resolutions work most reliably across a variety of input media/streams/codecs (like 1920x1080, 1280x720, 3840x2160, 640x480, ect)

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