Stream in monitor

JP 5.1.1

I want to run the command in my DUT terminal in my laptop and get stream in my monitor connected to device via HDMI

i used the command export DISPLAY=:1
gst-launch-nvarguscamerasrc ! nvvidconv ! autovideosink

iam able to get the output
I need to test all the interfaces in the device , so i need to validate the whole interfaces in superuser

When i run the same command in root terminal
Iam not able to get the output
sudo DISPLAY=:1 gst-launch-1.0 nvarguscamerasrc ! nvvidconv ! autovideosink
No protocol specified
No protocol specified
No protocol specified
No protocol specified
nvbufsurftransform: Could not get EGL display connection
Setting pipeline to PAUSED …
No protocol specified
error: XDG_RUNTIME_DIR not set in the environment.
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
^C

sudo DISPLAY=:0 gst-launch-1.0 nvarguscamerasrc ! nvvidconv ! autovideosink
No protocol specified
No protocol specified
No protocol specified
No protocol specified
nvbufsurftransform: Could not get EGL display connection
Setting pipeline to PAUSED ...
No protocol specified
error: XDG_RUNTIME_DIR not set in the environment.
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified

Using winsys: x11 
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
error: XDG_RUNTIME_DIR not set in the environment.
Pipeline is live and does not need PREROLL ...
WARNING: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0: Could not initialise Xv output
Additional debug info:
xvimagesink.c(1773): gst_xv_image_sink_open (): /GstXvImageSink:autovideosink0-actual-sink-xvimage:
Could not open display (null)
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
No protocol specified
No protocol specified
No protocol specified
No protocol specified
(Argus) Error NotSupported: Failed to initialize EGLDisplay (in src/eglutils/EGLUtils.cpp, function getDefaultDisplay(), line 77)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function initialize(), line 89)
(Argus) Error BadParameter:  (propagating from src/eglstream/FrameConsumerImpl.cpp, function create(), line 44)
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadInitialize:320 Failer
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:241 (propag)
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, waitRunning:203 Invalid th3
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:806 (propagating)
WARNING: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstFakeSink:fake-video-sink: Pipeline construction is invalid, p.

please help me out to resolve this

Hi,
Orin Nano developer kit has only DP output. Do you use Orin Nano module + custom carrier board?

Custom board
We have connected a hdmi
we can see the hdmi
If i run the command without root i can get monitor stream
BUt if i run the same command within root
I can’t get camerastream

Hi,
Please run the command and try again:

$ xhost +

did you mean to run this in root terminal ?

and also

$ xhost +  (gst-launch-1.0 ....comand) ??

Hi,
Please try

$ export DISPLAY=:0
$ xhost +
$ sudo gst-launch-1.0 videotestsrc ! xvimagesink

Then I need to run all commands in sudo
That is my use case

Hi,
We are uncertain how to run the commands into single command. This would need other users to share experience.

How about changing the sudo permission with no password in firmware in /etc/sudoers

so we can run the command which need sudo like sudo command1 and other command which do not need sudo like command2

will it support??

Hi,
Not sure if the proposal works. You may give it a try.

Another method is to put the command in ~/.xsessionrc:

/usr/bin/xhost +

And then after booting, you can run the command:

$ sudo DISPLAY=:0 gst-launch-1.0 videotestsrc ! xvimagesink

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.