nvoverlaysink issue on TX2

Hi Folks

I have simple gstreamer command line for reading two cameras concurrently in Tx1/Tx2 and displaying each camera output for preview…

This command line works on Tx1 but not on Tx2.

alias preview="gst-launch-1.0 nvcamerasrc sensor-id=0 ! 


What works on TX2 is -



gst-launch-1.0 nvcamerasrc fpsRange=“60.0 60.0" sensor-id=0 ! ‘video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)I420, framerate=(fraction)60/1’ ! nvtee ! nvvidconv flip-method=2 ! ‘video/x-raw, format=(string)I420’ ! xvimagesink -e



Could someone please explain why first command line does not work on TX2 ?

Thanksvideo/x-raw\(memory:NVMM\),width=1920,height=1080


What works on TX2 is -



gst-launch-1.0 nvcamerasrc fpsRange=“60.0 60.0" sensor-id=0 ! ‘video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)I420, framerate=(fraction)60/1’ ! nvtee ! nvvidconv flip-method=2 ! ‘video/x-raw, format=(string)I420’ ! xvimagesink -e



Could someone please explain why first command line does not work on TX2 ?

Thanks ! nvoverlaysink overlay-x=40 overlay-y=40 overlay-w=1200 overlay-h=1200 overlay=1 nvcamerasrc sensor-id=1 ! 


What works on TX2 is -



gst-launch-1.0 nvcamerasrc fpsRange=“60.0 60.0" sensor-id=0 ! ‘video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)I420, framerate=(fraction)60/1’ ! nvtee ! nvvidconv flip-method=2 ! ‘video/x-raw, format=(string)I420’ ! xvimagesink -e



Could someone please explain why first command line does not work on TX2 ?

Thanksvideo/x-raw\(memory:NVMM\),width=1920,height=1080


What works on TX2 is -



gst-launch-1.0 nvcamerasrc fpsRange=“60.0 60.0" sensor-id=0 ! ‘video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)I420, framerate=(fraction)60/1’ ! nvtee ! nvvidconv flip-method=2 ! ‘video/x-raw, format=(string)I420’ ! xvimagesink -e



Could someone please explain why first command line does not work on TX2 ?

Thanks ! nvoverlaysink overlay-x=1240 overlay-y=40  overlay-w=1200 overlay-h=1200 overlay=2"

What works on TX2 is -

gst-launch-1.0 nvcamerasrc fpsRange=“60.0 60.0" sensor-id=0 ! 'video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)I420, framerate=(fraction)60/1' ! nvtee ! nvvidconv flip-method=2 ! 'video/x-raw, format=(string)I420' ! xvimagesink -e

Could someone please explain why first command line does not work on TX2 ?

Thanks

Please apply the patch @ [url]https://devtalk.nvidia.com/default/topic/1024472/jetson-tx2/using-overlay-2-in-l4t-28-1-with-tx2/post/5213583/#5213583[/url]

Hi DaneLLL

Are these patches applicable to R28.2 ?

Thanks

It is specific to r28.1 and might have merge conflict on r28.2. Is your issue on r28.2?

Yes, I am facing this on R28.2.

Please follow the steps:

  1. Flash r28.2 on tx2
  2. Set win_mask:
        # sudo -s 
        # cd /sys/class/graphics/fb0 
        # echo 4 > blank 
        # echo 0x0 > device/win_mask 
        # echo 0x3f > device/win_mask 
        # echo 0 > blank
  3. Stop x11:
        $ sudo service lightdm stop
  4. Run pipeline:
        $ gst-launch-1.0 videotestsrc num-buffers=300 is-live=true ! nvoverlaysink overlay=1 overlay-x=100 overlay-y=100 overlay-w=320 overlay-h=240 & gst-launch-1.0 videotestsrc num-buffers=300 is-live=true ! nvoverlaysink overlay=2 overlay-x=600 overlay-y=600 overlay-w=320 overlay-h=240

hi DaneLLL

When I do cd /sys/class/graphics/fb0 , screen goes blank for long time and then with echo 4 > blank the systems seems to become very unstable

Do I need to run all commands mentioned in step #2 from host ?

Thanks

echo 0x0 > device/win_mask 

bash: echo: write error: Invalid argument

THanks

dumbogeorge,

It is not possible that monitor goes to blank just because you cd to some directory. The monitor will be blanked after you use “echo 4 > blank” but not “cd”.

If you hit above problem, please reboot and try again. The whole process is simple, blank the monitor, change the setting and then unblank the monitor.

Please run the steps on target TX2.

Sorry I did not report it well. The screen goes blank after echo 4 > blank. Are you suggesting that I run commands like echo 0x0 > device/win_mask - during the time it goes blank ?

Thanks

Yes, it must be done when your monitor is blanking.

cd /sys/class/graphics/fb0 ; echo 4 > blank ; echo 0x0 > device/win_mask ;  echo 0x3f > device/win_mask ; echo 0 > blank

Seem to do it reliably well. However, when I do

sudo service lightdm stop

System would do a black screen with few messages… and never seem to return to normal…

Thanks

Yes, if lightdm is off, ubuntu GUI desktop would also gone.

If GUI desktop is gone - how do I work with system ? How would I run

gst-launch-1.0 videotestsrc num-buffers=300 is-live=true ! nvoverlaysink overlay=1 overlay-x=100 overlay-y=100 overlay-w=320 overlay-h=240 & gst-launch-1.0 videotestsrc num-buffers=300 is-live=true ! nvoverlaysink overlay=2 overlay-x=600 overlay-y=600 overlay-w=320 overlay-h=240

Sorry I am able to follow how would steps suggested in #6 help ?

Thanks

Hi,
The command can be run without X11.

Trying to do the same on R28.2.1 and cannot write to win_mask, fails with invalid parameter.

Twice today then to figure out it’s my own fault, if you take to long to set the parameters you end up in the weeds and does not work, so paste as one line:

cd /sys/class/graphics/fb0 ; echo 4 > blank ; echo 0x0 > device/win_mask ; echo 0x3f > device/win_mask ; echo 0 > blank

then

service lightdm stop

then the pipeline:

gst-launch-1.0 videotestsrc num-buffers=300 is-live=true ! nvoverlaysink overlay=1 overlay-x=100 overlay-y=100 overlay-w=320 overlay-h=240 & gst-launch-1.0 videotestsrc num-buffers=300 is-live=true ! nvoverlaysink overlay=2 overlay-x=600 overlay-y=600 overlay-w=320 overlay-h=240

And we have success

Hi DaneLLL, In Xavier Board, Can I enable 6 overlays in xavier like this or only way to enable 6 overlays via modifying win_mask to 0x3f in DTB file ? also if possible please tell me what is the use of /dev/fb1 and /dev/fb2 or how can i use these device node.

Thanks

Please start a new thread for Xavier.