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:
And here is that frame i got:
Any ideas on how I can resolve this?