omxh264dec issues

Hi, I’m having some issues with using the omxh264 decoder for standard 264 encoded Ethernet video streams.

The pipeline I am casting with from a laptop using a 640x480 webcam is below:

appsrc ! queue ! videoconvert ! video/x-raw ! x264enc ! video/x-h264 ! h264parse ! rtph264pay mtu=1300 ! udpsink host=10.45.9.101 port=5000

From this I can see the network packets sending fine and can decode/display on a TX2 with

gst-launch-1.0 udpsrc port=5000 caps="application/x-rtp, media=(string)video, encoding-name=(string)H264" ! queue ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! xvimagesink

The issue with the above is that I get roughly 4 seconds lag time between video sending and video display.

However using the accelerated hardware with:

gst-launch-1.0 udpsrc port=5000 caps="application/x-rtp, media=(string)video, encoding-name=(string)H264" ! queue ! rtph264depay ! h264parse ! video/x-h264, stream-format=byte-stream ! omxh264dec ! nvoverlaysink

Results in the following error:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
NvMMLiteOpen : Block : BlockType = 261 
TVMR: NvMMLiteTVMRDecBlockOpen: 7647: NvMMLiteBlockOpen 
NvMMLiteBlockCreate : Block : BlockType = 261 
TVMR: TVMRBufferProcessing: 5431: video_parser_parse Unsupported Codec 
Event_BlockError from 0BlockH264Dec : Error code - e3040
Sending error event from 0BlockH264DecTVMR: NvMMLiteTVMRDecDoWork: 6193: TVMR Video Dec Unsupported Stream 
ERROR: from element /GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0: GStreamer encountered a general supporting library error.
Additional debug info:
/dvs/git/dirty/git-master_linux/external/gstreamer/gst-omx/omx/gstomxvideodec.c(2849): gst_omx_video_dec_loop (): /GstPipeline:pipeline0/GstOMXH264Dec-omxh264dec:omxh264dec-omxh264dec0:
OpenMAX component in error state Format not detected (0x80001020)
Execution ended after 0:00:01.100448256
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
TVMR: TVMRFrameStatusReporting: 6132: Closing TVMR Frame Status Thread -------------
Setting pipeline to NULL ...
TVMR: TVMRVPRFloorSizeSettingThread: 5942: Closing TVMRVPRFloorSizeSettingThread -------------
TVMR: TVMRFrameDelivery: 5982: Closing TVMR Frame Delivery Thread -------------
TVMR: NvMMLiteTVMRDecBlockClose: 7815: Done 
Freeing pipeline ...

My question is this: Is it possible to use the omx decoder to decode h264 streams that have not been encoded using the omx264enc plugin and if so is there some issue with either of my pipes that are preventing this ?

We have a working udp streaming case at
https://devtalk.nvidia.com/default/topic/1027423/jetson-tx2/gstreamer-issue-on-tx2/post/5225972/#5225972

Can you try it? In the case it also saves the received bitstream into a file. You may remove it if it is not required.