The command I run is as follows:
gst-launch-1.0 videotestsrc num-buffers=200 ! ‘video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720’ ! nvvidconv ! ‘video/x-raw(memory:NVMM), format=(string)I420’ ! omxh264enc ! ‘video/x-h264, stream-format=byte-stream’ ! filesink location=test.h264 -e