GStreamer 1.0 error : Failed to write input into the OpenMAX buffer

Hi,

I try this line command to read a yuv file, to encode it with the hardware encoder available in Jetson TX2 and then to save the result in a file :

gst-launch-1.0 filesrc location=/media/ubuntu/6634-3132/Basketball_640x360.yuv ! 'video/x-raw, width=(int)640, height=(int)360, format=(string)I420, framerate=(fraction)25/1' ! omxh264enc ! h264parse ! filesink location=/media/ubuntu/6634-3132/result1059s.h264 -e

But I obtain these errors :

Setting pipeline to PAUSED ...
Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set DPB and MjstreamingInside NvxLiteH265DecoderLowLatencyInitNvxLiteH265DecoderLowLatencyInit set DPB and MjstreamingPipeline is PREROLLING ...
Framerate set to : 25 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 4 
===== MSENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
ERROR: from element /GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0: Could not write to resource.
Additional debug info:
/dvs/git/dirty/git-master_linux/external/gstreamer/gst-omx/omx/gstomxvideoenc.c(2280): gst_omx_video_enc_handle_frame (): /GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0:
Failed to write input into the OpenMAX buffer
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

Someone can help me to resolve the issues.

Thanks in advance.

Please try 640x368

Hi,

Thank you for your response, I change the height to 360, but I have always the same error. Could be an error related to the free space I have in my TX2, I have less than 2GB ?

Regards,

Please put ‘videoparse’ and try again.

Here is a reference post: https://devtalk.nvidia.com/default/topic/934164/

Hi Danell,

Thanks for your response. The problem is resolved by specifying the blocksize property for the filesrc element:

gst-launch-1.0 filesrc blocksize=345600 location=Basketball.yuv ! 'video/x-raw, width=(int)640, height=(int)360, format=(string)I420, framerate=(fraction)25/1' ! omxh264enc ! 'video/x-h264, stream-format=(string)byte-stream' ! filesink location=results_block_size_345600.h264

Regards,