GStreamer pipeline with omxh264enc and RTP

I am attempting to stream video and need to use H264 encoding. The following pipeline works:

gst-launch-1.0 nvarguscamerasrc maxperf=1 ! 'video/x-raw(memory:NVMM), width=(int)640, height=(int)480, framerate=(fraction)30/1' ! nvv4l2h264enc ! rtph264pay ! udpsink host=127.0.0.1 port=5000

However, as soon as I swap out the nvv4l2h264enc for omxh264enc, the pipeline no longer works:

gst-launch-1.0 nvarguscamerasrc maxperf=1 ! 'video/x-raw(memory:NVMM), width=(int)640, height=(int)480, framerate=(fraction)30/1' ! omxh264enc ! rtph264pay ! udpsink host=127.0.0.1 port=5000

I see the following error in debug mode:
WARN omxvideoenc gstomxvideoenc.c:1860:gst_omx_video_enc_set_format: Error setting temporal_tradeoff 0 : Vendor specific error (0x00000001)

I need to use omxh264enc, and I have seen similar posts, but I was unable to fix the issue. Can someone confirm that this issue by running the two pipelines above? I have tried on both a TX2 and Xavier running JetPack 4.2.

Thank you.

Hi,
Please add h264parse and try again.

A reference post:
https://devtalk.nvidia.com/default/topic/1027423/jetson-tx2/gstreamer-issue-on-tx2/post/5225972/#5225972

Thank you, yes, that worked. Is there a reason this needs to be added for the omxh264enc decoder but not nvv4l2h264enc?

Hi,
Not sure why it works without h264parse. We always have it after nvv4l2h264enc while linking to muxer(qtmux, matroskamux, …). Please check examples in user guide.
https://developer.nvidia.com/embedded/dlc/l4t-accelerated-gstreamer-guide-32-2

For writing h264 stream to a file without muxing, it is not required and nvv4l2h264enc can be linked with filesink directly.