Error pushing buffer to GStreamer pipeline

I have a question regarding video creation using Jetson Xavier NX.

I am processing images obtained from a camera using the OpenCV VideoWriter class in a GStreamer pipeline. After processing a certain number of images, a video file is generated, and the next GStreamer pipeline processing is repeated. However, during this repeated processing, GStreamer always outputs an error after processing a certain number of images. Do you know the cause of this problem?

The video is output to the following location, and the errors output by GStreamer are as follows:

XXXX: SYNC_IOC_FENCE_INFO ioctl failed with 9
XXXX: NvDdkVicExecute Failed
XXXX: nvbuffer_transform Failed
XXXX: gst_nvvconv_transform: NvBufferTransform Failed
XXXX: [ WARN:8] global /media/XXXX/opcv/opencv/modules/videoio/src/cap_gstreamer.cpp (1825) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module appsrc3 reported: Internal data stream error.
XXXX: [ WARN:8] global /media/XXXX/opcv/opencv/modules/videoio/src/cap_gstreamer.cpp (1728) writeFrame OpenCV | GStreamer warning: Error pushing buffer to GStreamer pipeline

File output location: /tmp/qtmux*

The operating environment is as follows:

  • OpenCV: 4.5.1
  • GStreamer (JetsonSDK): 1.14.5
  • Ubuntu 18.04 LTS (JetPackSDK Ver 4.5)

Hi,
The prints may be triggered by memory leak. Please check if there’s suspicious memory leak in the application code.

Thank you for your advice!
Please advise on potential memory leak points.

The video generation class is instantiated as follows, and the camera images (camera_image) are processed frame by frame through a pipeline.

static cv::VideoWriter *video;
video = new cv::VideoWriter();

video->open(video settings);
*video << camera_image;

After processing a certain number of camera images (camera_image), the following cleanup is performed before creating a new VideoWriter class object. This process is repeated.

delete video;
video->release();

Is there a possibility of a memory leak in this cleanup process?

Hi,
This seems to be swapped:

delete video;
video->release();

May try to call like

video->release();
delete video;

I have tried correcting the call order, but the same error still occurs.
Are there any other possible issues to consider?

Hi,
You may try different gstreamer pipelines and check if the issue is still present.

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