I’m having a TX2 flashed with JetPack 4.4 DP and a quite ‘old’ Microsoft LifeCam VX-800. When I’m connected directly on the TX2 (no ssh) I have no problems in running gstreamer like this:
gst-launch-1.0 v4l2src device=/dev/video1 ! xvimagesink with a relatively good performance.
However if I want to do it remotely via ssh I have a lot of trouble get it working. On my host (win10) I’m running Xming server and set a display variable like this: set DISPLAY=127.0.0.1:0.0 and then connect to my TX2 ssh -Y tx2@192.168.0.150 I’m able to confirm that the forwarding works with commands like xclock or xeyes, but the gst-launch command above unfortunateley throws this error:
tx2@tx2-desktop:~$ gst-launch-1.0 v4l2src device=/dev/video1 ! xvimagesink
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Could not initialise Xv output
Additional debug info:
xvimagesink.c(1773): gst_xv_image_sink_open (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
XVideo extension is not available
Setting pipeline to NULL ...
Freeing pipeline ...
I also read about adding videoconvert before xvimagesink, but that doesn’t help either :/
Same error persists:
tx2@tx2-desktop:~$ gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,framerate=30/1,width=640,height=480 ! videoconvert ! xvimagesink
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Could not initialise Xv output
Additional debug info:
xvimagesink.c(1773): gst_xv_image_sink_open (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
XVideo extension is not available
Setting pipeline to NULL ...
Freeing pipeline ...
Here’s my v4l2-ctl -d /dev/video1 --list-formats-ext if that helps:
I’m still getting an error and it tells me HDMI-0 disconnected primary
tx2@tx2-desktop:~$ env | grep DISPLAY
DISPLAY=localhost:10.0
tx2@tx2-desktop:~$ export DISPLAY=:1
tx2@tx2-desktop:~$ xrandr
Can't open display :1
tx2@tx2-desktop:~$ export DISPLAY=:0
tx2@tx2-desktop:~$ xrandr
Screen 0: minimum 8 x 8, current 640 x 480, maximum 32767 x 32767
HDMI-0 disconnected primary (normal left inverted right x axis y axis)
However if I try to run the gstreamer command I can see the camera is working (the green LED is indicating that), but I guess since HDMI-0 is disconnected that’s the reason I cannot see any picture and it stucks there:
tx2@tx2-desktop:~$ gst-launch-1.0 v4l2src device=/dev/video1 ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Btw. - not sure if it is important, but I just realized/saw this error message directly after login to the Jetson TX2:
[...]
Xlib: extension "NV-GLX" missing on display "localhost:10.0".
Xlib: extension "NV-GLX" missing on display "localhost:10.0".
Xlib: extension "NV-GLX" missing on display "localhost:10.0".
tx2@tx2-desktop:~$
saving to a file works fine. However, is it possible to get the ‘livestream’ as a preview as it is possible without X11 on the device itself?
I might want to process the stream later on and therefore it is a little bit uncomfortable to save it to a file before :/
Well, I’d like to see the preview on my laptop which is connected to the device via ssh/x11.
I just figured out that it works when I use ximagesink in combination with videoconvert instead of xvimagesink.
Hi,
Sorry I thought it is native display and did not realize it is ssh/x11 forwarding. We don’t support it in nveglglessink. You would need to use ximagesink.
One possible solution is to use RTSP. Please refer to a valid usecase: