Help: H.265 Encode Error

I am trying to encode uncompressed video in H.265; however, when I write the following pipeline I receive an error message that I cannot resolve. I am following the example code in Tegra X1 Multimedia User Guide, and I do not understand why the following pipeline does not work. I am a beginner in video compression so any help would be very useful. The code/error message:

ubuntu@tegra-ubuntu:~ gst-launch-1.0 filesrc location=small_mem_vid.mov ! 'video/x-raw, format=(string)I420, framerate=(fraction)30/1, width=(int)1280, height=(int)720' ! omxh265enc ! filesink location=new_encode.mov -e Setting pipeline to PAUSED ... Inside NvxLiteH264DecoderLowLatencyInitNvxLiteH264DecoderLowLatencyInit set DPB and MjstreamingInside NvxLiteH265DecoderLowLatencyInitNvxLiteH265DecoderLowLatencyInit set DPB and MjstreamingPipeline is PREROLLING ... Framerate set to : 30 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 8 ===== MSENC ===== NvMMLiteBlockCreate : Block : BlockType = 8 ERROR: from element /GstPipeline:pipeline0/GstOMXH265Enc-omxh265enc:omxh265enc-omxh265enc0: Could not write to resource. Additional debug info: /dvs/git/dirty/git-master_linux/external/gstreamer/gst-omx/omx/gstomxvideoenc.c(2139): gst_omx_video_enc_handle_frame (): /GstPipeline:pipeline0/GstOMXH265Enc-omxh265enc:omxh265enc-omxh265enc0: Failed to write input into the OpenMAX buffer ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... Freeing pipeline ... ubuntu@tegra-ubuntu:~ gst-launch-1.0 filesrc location=small_mem_vid.mov ! ‘video/x-raw, format=(string)I420, framerate=(fraction)30/1, width=(int)1280, height=(int)720’ ! omxh265enc ! filesink location=new_encode.mov -e

Hi jack81964,

What’s your file format of small_mem_vid.mov?

If you want to encoding an YUV(I420 for example) file into H265, you can refer to below example:

gst-launch-1.0 filesrc location=XXX.yuv ! videoparse width= 1920 height= 1080 format=2 framerate=30 ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420' ! omxh265enc ! filesink location= XXX.h265

Please provide more information, then we can help with.

Thanks