h.264 video codec of gstreamer

Hi,
For running UDP streaming, you may refer to pipelines in below post and check your code.
https://devtalk.nvidia.com/default/topic/1027423/jetson-tx2/gstreamer-issue-on-tx2/post/5225972/#5225972

Sorry, I actually want to encode the video data and send it to Target (RTSP video stream) via the network. the Target can decode the h.264 video stream with opencv. am I in the wrong direction?

Hi,
For running RTSP, we suggest verify #18 first. If you can run it successfully, you can move forward to customize it into your usecase.

with opencv you need to use this pipeline:

rtspsrc location=rtsp://192.168.1.100:554/user=admin&password=&channel=1&stream=0.sdp? ! rtph264depay ! h264parse ! omxh264dec ! nvvidconv ! video/x-raw(memory:NVMM),format=BGRx ! nvvidconv ! video/x-raw ! videoconvert ! video/x-raw,format=BGR ! appsink

opencv uses BGR format as standard so you need to convert frames in this format.
Unfortunately “nvvidconv” is not able to manage RGB or BGR, so you cannot use HW acceleration to convert frames in these formats.
In fact, as you can see, in last step is required to use videoconvert (using CPU) to convert frames to BGR.