./gst-rtsp-server/examples/test-launch "v4l2src device=/dev/video2 ! video/x-raw, width=2560, height=720, framerate=60/1 ! nvvidconv ! nvv4l2h265enc maxperf-enable=1 iframeinterval=4 profile=4 ! h265parse ! rtph265pay name=pay0"
```
```
gst-launch-1.0 nvcompositor name=comp sink_0::xpos=0 sink_0::ypos=0 sink_0::width=2560 sink_0::height=720 sink_0::zorder=1 sink_0::alpha=1 sink_1::xpos=0 sink_1::ypos=0 sink_1::width=2560 sink_1::height=720 sink_1::zorder=2 sink_1::alpha=0.1 ! 'video/x-raw(memory:NVMM),format=RGBA' ! nv3dsink rtspsrc location=rtsp://127.0.0.1:8554/test latency=0 ! rtph265depay ! h265parse ! nvv4l2decoder ! nvvidconv ! 'video/x-raw(memory:NVMM),format=RGBA' ! comp.sink_0 videotestsrc ! videoconvert ! video/x-raw,format=RGBA ! nvvidconv ! 'video/x-raw(memory:NVMM),format=RGBA,width=2560,height=720' ! comp.sink_1
```
I want my video to open in full screen but keep the 2560x720 ratio. I know xvimagesink keeps aspect ratios automatically. I was wondering if I could use xvimagesink instead or if not, how to open nv3dsink as a fullscreen but keeping the aspect-ratio (ie. filling in the rest with a black screen)
Sorry to clarify, it does open with the right aspect-ratio, but I want the window to have black padding on the top and bottom. In other words I want it to open in “full screen mode”. I can position it with window-height but that’ll still show my computer background
Hi,
Have checked and confirmed nv3dsink does not support filling background. A possible solution is to use nvcompositor to composite out a video plane with back ground and then render out.
Thanks @DaneLLL I’m trying to avoid nvcompositor to do this because it would add a bit of latency. What about adding some parameters to xvimagesink so that it opens in full screen in this pipeline?
Thanks I decided to just use a script that calls wmctrl -r 'gst-launch-1.0' -b toggle,fullscreen so that I don’t have to set a parameter. I appreciate your help!