nvoverlaysink parameters

Hi everyone,

When I run the following pipeline on my TX2 with L4TR28.1:

gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM), framerate=(fraction)30/1' ! nvoverlaysink overlay-x=0 overlay-y=0 overlay-w=1280 overlay-h=720 overlay=1

I see the display, but not in the topleft corner.
Seems to have about 160 pixels x offset. Using -160 or lower value indeed make the overlay in the corner.

Can someone else see this, or is it just my TX2 ? (sha1sum -c /etc/nv_tegra_release says all OK).

If someone is interested in this topic, please also check this: [url]https://devtalk.nvidia.com/default/topic/1026691/jetson-tx2/how-to-overlay-two-picture-image-on-the-tx2/post/5222078/#5222078[/url] and let me know (even through private messages) if these problems are seen elsewhere or if it’s ok on your side.

Furthermore, I see overlay index should be in range [1 - 2], and overlay-depth in range [0 - 2].
Accelerated gstreamer user guide [url]http://developer2.download.nvidia.com/embedded/L4T/r28_Release_v1.0/Docs/Jetson_TX2_Accelerated_GStreamer_User_Guide.pdf[/url] gives no details about this. How to use these ?

Hi HP,
Here is a post about using overlay:
[url]https://devtalk.nvidia.com/default/topic/979415/jetson-tx1/about-the-issue-of-opening-two-nvoverlaysink/post/5032559/#5032559[/url]

On r28.1, there is a known issue and we have patches for it:
[url]https://devtalk.nvidia.com/default/topic/1024472/jetson-tx2/using-overlay-2-in-l4t-28-1-with-tx2/post/5213583/#5213583[/url]

For ‘overlay-depth’, it must be set along with ‘overlay’, please try/compare the two gstreamer commands below:
$ gst-launch-1.0 filesrc location= Bourne_Trailer.mp4 ! qtdemux ! h264parse ! omxh264dec ! nvoverlaysink overlay=1 overlay-depth=0 & gst-launch-1.0 filesrc location= Bourne_Trailer.mp4 ! qtdemux ! h264parse ! omxh264dec ! nvoverlaysink overlay-w=640 overlay-h=360 overlay=2 overlay-depth=1

$ gst-launch-1.0 filesrc location= Bourne_Trailer.mp4 ! qtdemux ! h264parse ! omxh264dec ! nvoverlaysink overlay=1 overlay-depth=2 & gst-launch-1.0 filesrc location= Bourne_Trailer.mp4 ! qtdemux ! h264parse ! omxh264dec ! nvoverlaysink overlay-w=640 overlay-h=360 overlay=2 overlay-depth=1

Additional info there: https://devtalk.nvidia.com/default/topic/1024063/jetson-tx2/hdmi-display-failed-on-jetson-tx2/post/5224118/#5224118

Also noted different x-offset on TX1 from TX2. I suppose this happens with frame aspect ratio conversions.

Seems unless specified as overlay-w and overlay-h, it tries to maximize a centered display on the screen:

gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM), format=I420, width=640, height=480, framerate=30/1' ! nvoverlaysink
gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM), format=I420, width=640, height=480, framerate=30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=I420, width=480, height=640, framerate=30/1' ! nvoverlaysink
gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM), format=I420, width=640, height=480, framerate=30/1' ! nvoverlaysink overlay-w=640 overlay-h=480

only the latter displays a 640x480 frame.