H265 video file streaming over TCP

Hello,

I’m using Gstreamer 1.8.3 and Jetson Tx2.
Now, I want to send a mp4 file, encode with h.265 and streaming over TCP by this command:

gst-launch-1.0 filesrc location=hncloud.mp4 ! decodebin ! omxh265enc ! mpegtsmux ! queue ! tcpserversink host=xxx.xxx.x.xxx port=5000 recover-policy=keyframe sync-method=latest-keyframe sync=false

To receive, I use VLC to play this file on my Linux PC (tcp://xxx.xxx.x.xx:5000) but nothing happends. The screen just has a black color. Someone please help me.

I tested with videotestsrc:

gst-launch-1.0 videotestsrc ! decodebin ! omxh265enc ! mpegtsmux ! queue ! tcpserversink host=xxx.xxx.x.xxx port=5000 recover-policy=keyframe sync-method=latest-keyframe sync=false

everything works fine.

You may add caps for NV12 format between decodebin and omxh265enc.
This seems working:

gst-launch-1.0 -e filesrc location=test.mp4 ! decodebin ! <b>video/x-raw,format=NV12</b> ! omxh265enc ! mpegtsmux ! tcpserversink host=<tx2_server_IP> port=5000 recover-policy=keyframe sync-method=latest-keyframe sync=false

and this for receiver (tested with a headless xavier, no pulseaudio so no vlc):

gst-launch-1.0  tcpclientsrc host=<tx2_server_ip> port=5000 ! queue ! tsdemux ! h265parse ! omxh265dec ! nvvidconv ! xvimagesink

Thank you very much. I have succeed in capturing frame by adding caps for NV12 format as you said. But something seems wrong.

Here is my original frame:

Imgur

And here is that frame i got:

Any ideas on how I can resolve this?

Hi,
For live streaming, you may also consider using rtsp.
https://devtalk.nvidia.com/default/topic/1018689/jetson-tx2/vlc-playing-gstreamer-flow/post/5187270/#5187270
https://devtalk.nvidia.com/default/topic/1014789/jetson-tx1/-the-cpu-usage-cannot-down-use-cuda-decode-/post/5188538/#5188538
https://devtalk.nvidia.com/default/topic/1043770/jetson-tx2/problems-minimizing-latency-and-maximizing-quality-for-rtsp-and-mpeg-ts-/post/5295828/#5295828