Reading an RTSP stream from a Sony camera using GStreamer on TX2

We freshly installed Jetpack 4.2.0 Jetson TX2 (P2597) (4.2.2 did not boot after flushing it).

Our TX2 is connected via LAN cable to a HP 2530-8G PoE+ Switch that has connected to it 7 Sony SNC-EB600 cameras.

When I try to run GStreamer this is what I get:

root@pxtx2-1:~# gst-launch-1.0 rtspsrc location=rtsp://10.5.1.10/video1 
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://10.5.1.10/video1
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
Progress: (request) SETUP stream 0
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
Progress: (request) Sending PLAY request
Progress: (request) Sent PLAY request
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc1: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc1:
streaming stopped, reason not-linked (-1)
Execution ended after 0:00:00.103155996
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
root@pxtx2-1:~#

The same command on our PC (with NVIDIA graphic card) shows the camera stream successfully.

Showing the camera output using mplayer works fine (shows the camera stream on screen) though there are some errors outputed to the console:

root@pxtx2-1:~# mplayer rtsp://10.5.1.10/video1
MPlayer 1.3.0 (Debian), built with gcc-7 (C) 2000-2016 MPlayer Team
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing rtsp://10.5.1.10/video1.
Resolving 10.5.1.10 for AF_INET6...

Couldn't resolve name for AF_INET6: 10.5.1.10
Connecting to server 10.5.1.10[10.5.1.10]: 554...

rtsp_session: unsupported RTSP server. Server type is 'Ze-PRO'.
libavformat version 57.83.100 (external)
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
VIDEO:  [H264]  1920x1080  0bpp  29.970 fps    0.0 kbps ( 0.0 kbyte/s)
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
[vdpau] Error when calling vdp_device_create_x11: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 57.107.100 (external)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Clip info:
 title: Sony RTSP Server
Audio: no sound
Starting playback...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 1920x1080 => 1920x1080 Planar YV12 
[ASPECT] Warning: No suitable new res found!
[ASPECT] Warning: No suitable new res found!
V:   1.2   0/  0 58%  5%  0.0% 0 0 
[rtsp @ 0x7faf0cde60]max delay reached. need to consume packet
[rtsp @ 0x7faf0cde60]RTP: missed 318 packets
V:   1.2   0/  0 59%  5%  0.0% 0 0 
[rtsp @ 0x7faf0cde60]max delay reached. need to consume packet
[rtsp @ 0x7faf0cde60]RTP: missed 1 packets
[h264 @ 0x7fae660ab0]error while decoding MB 111 65, bytestream -5
[h264 @ 0x7fae660ab0]concealing 298 DC, 298 AC, 298 MV errors in P frame
[rtsp @ 0x7faf0cde60]max delay reached. need to consume packet
[rtsp @ 0x7faf0cde60]RTP: missed 5 packets
[h264 @ 0x7fae660ab0]error while decoding MB 5 46, bytestream -5
[h264 @ 0x7fae660ab0]concealing 2684 DC, 2684 AC, 2684 MV errors in P frame
V:   2.3   0/  0 44%  3%  0.0% 0 0 
[rtsp @ 0x7faf0cde60]max delay reached. need to consume packet
[rtsp @ 0x7faf0cde60]RTP: missed 242 packets
V:   2.3   0/  0 44%  3%  0.0% 0 0 
[rtsp @ 0x7faf0cde60]max delay reached. need to consume packet
[rtsp @ 0x7faf0cde60]RTP: missed 10 packets
[h264 @ 0x7fae660ab0]error while decoding MB 62 20, bytestream -5
[h264 @ 0x7fae660ab0]concealing 5747 DC, 5747 AC, 5747 MV errors in P frame
V:   3.3   0/  0 40%  2%  0.0% 0 0

We are porting an application from Ubuntu on PC to our TX2 and our application use GStreamer internally.

Any help would be apprciated

Hi,
It looks like the pipeline is not complete. Please refer to following posts to construct a pipeline from source to sink:
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

Hi DaneLLL,

The same command line works on a regular PC. If the pipeline is not complete with this command line then the default behavior is broken. Please fix it.

Thank you, Sela.

@sela_lerer,

You should double check what you’re saying. As said by @DaneLLL, the gstreamer pipeline is incomplete and would fail on host as well.
Being so arrogant when requesting help is useless.

BTW, you would try a full pipeline like this:

gst-launch-1.0 rtspsrc location=rtsp://10.5.1.10/video1 ! queue ! decodebin ! videoconvert ! xvimagesink

@Honey_Patouceul this is a checked fact. Writing something that you know for sure to be true is not arrogant. Both machines are here next to me.

Thanks for your answer. It works :-)

Hi Honey_Patouceul,
Sincerely appreciate your help.