I can’t seem to get Gstreamer to load a RTSP stream from an IP camera on the TX2 running L4T 28.2. I have verified the camera works with VLC 2.2.5.1. GStreamer version is 1.8.3. The pipelines I have tried are with playbin and rtspsrc. Here are the respective terminal outputs:
tegra@tegra-ubuntu:~$ gst-launch-1.0 playbin uri=rtsp://192.168.2.119/554
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://192.168.2.119/554/
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
It pauses here for about three minutes. Looking at the system monitor, it gradually uses more CPU
and memory until reaching about 105% on CPU, then giving the following error ####
(gst-launch-1.0:2645): GStreamer-WARNING **: failed to create thread: Error creating thread: Resource
temporarily unavailable
nvidia@tegra-ubuntu:~$ gst-launch-1.0 rtspsrc location=rtsp://192.168.2.119/554 latency=0 ! decodebin ! nvvidconv ! videoconvert ! xvimagesink sync=false
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://192.168.2.119/554
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
It pauses here for about three minutes. Looking at the system monitor, it gradually uses more CPU
and memory until reaching about 105% on CPU, then giving the following error ####
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc1: Internal data flow error.
Additional debug info:
gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc1:
streaming task paused, reason not-linked (-1)
Execution ended after 0:00:00.213841344
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …
nvidia@tegra-ubuntu:~$
tegra@tegra-ubuntu:~$ gst-launch-1.0 rtspsrc location=rtsp://192.168.2.119/554/h264 ! rtph264depay !
h264parse ! omxh264dec ! nveglglessink
Setting pipeline to PAUSED …
Using winsys: x11
Pipeline is live and does not need PREROLL …
Got context from element ‘eglglessink0’: gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://192.168.2.119/554/h264
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
It pauses here for about three minutes. Looking at the system monitor, it gradually uses more CPU
and memory until reaching about 105% on CPU, then giving the following error ####
(gst-launch-1.0:2461): GStreamer-WARNING **: failed to create thread: Error creating thread: Resource
temporarily unavailable
nvidia@tegra-ubuntu:~/Documents$ vlc rtsp://127.0.0.1:8554/test
VLC media player 2.2.5.1 Umbrella (revision 2.2.5.1-14-g05b653355c)
[0000000000415160] core libvlc: Running vlc with the default interface. Use ‘cvlc’ to use vlc without interface.
[0000000000528b60] [cli] lua interface: Listening on host “*console”.
VLC media player 2.2.5.1 Umbrella
Command Line Interface initialized. Type `help’ for help.
[0000007f80008ee0] vdpau_avcodec generic error: unsupported codec 1211250229 or profile 1
Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
[0000007f9c0009c0] core input error: ES_OUT_RESET_PCR called
[hevc @ 0x7f8c059970] Could not find ref with POC 14
At this point, the VLC window opens up but displays the colorful blocky vertical lines that TVs back in the day would display when there was no video. The terminal with the test-launch script itself has no errors and says “stream ready at rtsp://…”.
To be clear about my intention with this, I’m ultimately trying to feed this IP video input into OpenCV to run object detection on the TX2. I initially used this as a guide: How to Capture and Display Camera Video with Python on Jetson TX2. But it didn’t work, I have been trying everything I can think of to troubleshoot it and have reflashed many times. Currently, I have a clean install flashed from JetPack 3.2 with the exception of VLC 2.2.5.1 built from source.
nvidia@tegra-ubuntu:/usr/include/gstreamer-1.0/gst$ sudo apt-get install libgstreamer1.0-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
libgstreamer1.0-dev is already the newest version (1.8.3-1~ubuntu0.1).
0 upgraded, 0 newly installed, 0 to remove and 293 not upgraded.
In my case, when I execute your steps above they both return the tv pallete with white noise.
However, I am rather concerned in the steps,
as I am interested to test network broadcast and found steps at the forum.
Upd: though it appears that you are using IP camera, while I tested with CSI MIPI
If you are using an IP camera it should have some web service I guess.
What model of the IP camera do you use?
As far as I am concerned an IP camera has a dedicated IP address and does cast somehow persistently. It won’t require a call from Jetson to start webcast. Moreover IP cameras may have some API.
On the other hand if you connect a camera to Jetson, and start broadcast with rtsp - it will rather utilize ip address of Jetson, and to some extent will represent a form of somewhat IP camera.
Could you clarify what is the interface you are using to connect camera with Jetson? Is it Ethernet? TCP-IP wires? WIFI? USB? CSI?
It appears to me that the camera is not connected with jetson by other means than the TCP/IP network.
As far as I am concerned, you are approaching to control camera with gstreamer somehow.
The interface with the IP camera is ethernet. I’m trying to get this guide to work: How to Capture and Display Camera Video with Python on Jetson TX2. My ultimate goal is to get the live feed into OpenCV to run object detection. I’ve posted on the gstreamer forums previously and only got one reply which was to remove anything nVidia related from the TX2.