Dear All,
Is it possible to read in a tcp stream and show it on display with jetson nano?
I tried and failed with:
gst-launch-1.0 rtspsrc location=rtspt://XXX.YYY.com:ZZZ ! queue ! rtph264depay ! h264parse ! omxh264dec enable-low-outbuffer=1 ! nvvidconv ! videoconvert ! nveglglessink -e
Terveisin, Markus
You can specify the lower transport protocols in rtspsrc. If the rtsp server supports tcp, the following would work:
gst-launch-1.0 -v rtspsrc <b>protocols=tcp</b> location=<b>rtsp</b>://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov ! application/x-rtp, media=video ! queue ! decodebin ! videoconvert ! xvimagesink
As your topic’s title is more generic, it is also possible to receive stream through tcp with tcpclientsrc:
gst-launch-1.0 -v tcpclientsrc host=127.0.0.1 port=7001 ! decodebin ! videoconvert ! xvimagesink
Here it is looking for a local host stream that can be generated before with:
gst-launch-1.0 videotestsrc is-live=true ! video/x-raw,width=640,width=480,framerate=30/1 ! queue ! omxh264enc ! video/x-h264, stream-format=byte-stream ! h264parse ! matroskamux ! queue leaky=2 ! tcpserversink port=7001 host=0.0.0.0 recover-policy=keyframe sync-method=latest-keyframe
Note that on earlier releases for nano, omxh264enc may be deprecated, so you would use nvv4l2h264enc instead.
Thanks, it works for me.
Just to sure: when one says
gst-launch-1.0 -v rtspsrc protocols=tcp location=rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov ! application/x-rtp, media=video ! queue ! decodebin ! videoconvert ! xvimagesink
Are we using here TCP protocoll and not RTSP?
(My concern is does gstreamer work for any other protocols other than RTSP? )
RTSP is an application layer protocol, that can use different lower layer transport protocols such as UDP or TCP. With this option, if the server supports it, a TCP connexion will be used.
The latter couple of commands in my previous post shows how using tcpserversink/tcpclientsrc for more generic usage of TCP connexion from gstreamer.