two nvoverlaysink problem on jetson nano

Hi

when 2 nvoverlaysink set as"overlay=2",I get the iv_renderer.overlay.yuv420 error.

gst-launch-1.0 udpsrc multicast-iface="eth1" multicast-group=224.1.1.5 "port=40010" ! "application/x-rtp, media=video, encoding-name=H264" ! rtph264depay ! queue ! h264parse ! omxh264dec enable-low-outbuffer=1 ! nvoverlaysink overlay-x=1920 overlay-y=0 overlay-w=1920 overlay-h=1080 overlay=1 &
gst-launch-1.0 udpsrc multicast-iface="eth1" multicast-group=224.1.1.5 "port=40010" ! "application/x-rtp, media=video, encoding-name=H264" ! rtph264depay ! queue ! h264parse ! omxh264dec enable-low-outbuffer=1 ! nvoverlaysink overlay-x=0 overlay-y=1080 overlay-w=1920 overlay-h=1080 overlay=1

nvdc: open: Too many open files
nvdc: failed to open ‘/dev/tegra_dc_ctrl’.
NvxBaseWorkerFunction[2575] comp OMX.Nvidia.std.iv_renderer.overlay.yuv420 Error -2147479552
^Chandling interrupt.

one nvoverlaysink sets as “overlay=2” and another nvoverlaysink sets as “overlay=1” works well.

gst-launch-1.0 udpsrc multicast-iface="eth1" multicast-group=224.1.1.5 "port=40010" ! "application/x-rtp, media=video, encoding-name=H264" ! rtph264depay ! queue ! h264parse ! omxh264dec enable-low-outbuffer=1 !  nvoverlaysink overlay-w=1920 overlay-h=1080 overlay=2 &
gst-launch-1.0 udpsrc multicast-iface="eth1" multicast-group=224.1.1.5 "port=40010" ! "application/x-rtp, media=video, encoding-name=H264" ! rtph264depay ! queue ! h264parse ! omxh264dec enable-low-outbuffer=1 ! nvoverlaysink overlay-x=1920 overlay-y=0 overlay-w=1920 overlay-h=1080 overlay=1

I also setted win_mask and stop the x11.I’m not sure the setting is successful.
After display become black, I setted “echo 0x0 > device/win_mask”. And got error “-su: echo: write error: Invalid argument”

# sudo -s 
    # cd /sys/class/graphics/fb0 
    # echo 4 > blank 
    # echo 0x0 > device/win_mask 
    # echo 0x3f > device/win_mask 
    # echo 0 > blank 
    $ sudo service lightdm stop

Hi,
For running two overlays you have to set one as onerlay=1 and the other as overlay=2. You may refer to
[url]https://devtalk.nvidia.com/default/topic/979415/jetson-tx1/about-the-issue-of-opening-two-nvoverlaysink/post/5032559/#5032559[/url]

Hi
Thank you for your replay.

①what is max number of overlay?
②set as “overlay=2”,“overlay=1”,“overlay=1” for 3 overlays,?
③Is jetson-nano’ max number of overlay same as jetson-tx1,tx2?
[VIDEO PLAYBACK WITH GSTREAMER-1.0] in

# echo 0x0 > device/win_mask # // Clears current window setting. # // window setting. # echo 0x3f > device/win_mask # // Assigns all 6 overlay windows # // in display controller to # // display 0 (fb0). # echo 0 > blank // Unblank display.

Tx2 seen has 6 overlays

Hi,
[VIDEO PLAYBACK WITH GSTREAMER-1.0] in gstreamer user guide is specific to TX2. For Jetson Nano, maximum overlay number is 2. If you have more than two udp sources, you can utilize nvcompositor plugins to composite multiple sources into one overlay. There is an example pipeline in the document.

Hi

Thank you for the advice.
Actually,I want nvcompositor.
I tried 4 upd, but cpu utiliztion up to 250%.
Does nvcompositor use HW hw acceleration?

gst-launch-1.0 nvcompositor name=comp \
               sink_0::xpos=0 sink_0::ypos=0 sink_0::width=1920 sink_0::height=1080 \
               sink_1::xpos=1920 sink_1::ypos=0 sink_1::width=1920 sink_1::height=1080 \
               sink_2::xpos=0 sink_2::ypos=1080 sink_2::width=1920 sink_2::height=1080 \
               sink_3::xpos=1920 sink_3::ypos=1080 sink_3::width=1920 sink_3::height=1080 ! nvoverlaysink \
               udpsrc multicast-iface="eth1" multicast-group=224.1.1.5 "port=40010" ! "application/x-rtp, media=video, encoding-name=H264" ! rtph264depay ! queue ! h264parse ! omxh264dec enable-low-outbuffer=1 ! comp. \
               udpsrc multicast-iface="eth1" multicast-group=224.1.1.5 "port=40010" ! "application/x-rtp, media=video, encoding-name=H264" ! rtph264depay ! queue ! h264parse ! omxh264dec enable-low-outbuffer=1 ! comp. \
               udpsrc multicast-iface="eth1" multicast-group=224.1.1.5 "port=40010" ! "application/x-rtp, media=video, encoding-name=H264" ! rtph264depay ! queue ! h264parse ! omxh264dec enable-low-outbuffer=1 ! comp. \
               udpsrc multicast-iface="eth1" multicast-group=224.1.1.5 "port=40010" ! "application/x-rtp, media=video, encoding-name=H264" ! rtph264depay ! queue ! h264parse ! omxh264dec enable-low-outbuffer=1 ! comp. -e

Hi,

Yes, it is hardware accelerated.

For profiling stats, you can execute ‘sudo tegrastats’ to get CPU frequency and loading in percentage.