Gstreamer pipelines in console mode in Jetson Orin Nano

Hi,

I am working on Jetson Orin Nano with custom carrier card with Jetpack 6.2.1 installed and have 2 video sources connected. I am trying to run two separate gstreamer pipelines in console mode.

gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480 ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=NV12,width=1280,height=800’ ! nvdrmvideosink

gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,width=640,height=480 ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=NV12,width=1280,height=800’ ! nvdrmvideosink

The first pipeline runs successfully, but when I try to launch the second pipeline from a different terminal, it fails to start.

Any suggestions on how to display both video streams at the same time would be greatly appreciated.

— 🤖 This is an automated AI response. I’m here to help, but please verify important details! —

To run two separate GStreamer pipelines in console mode on the Jetson Orin Nano, you can use the nvdrmvideosink element to display the video streams. However, since you are trying to display both video streams at the same time, you will need to use a different approach.

One possible solution is to use the nvoverlaysink element instead of nvdrmvideosink. The nvoverlaysink element allows you to display multiple video streams on the same screen.

Here is an example pipeline that you can use to display both video streams:

gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480 ! nvvidconv ! video/x-raw(memory:NVMM),format=NV12,width=1280,height=800 ! nvoverlaysink

gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,width=640,height=480 ! nvvidconv ! video/x-raw(memory:NVMM),format=NV12,width=1280,height=800 ! nvoverlaysink

However, this will display the two video streams on top of each other. If you want to display them side by side, you can use the nvcompositor element to composite the two video streams into a single stream.

Here is an example pipeline that you can use to display both video streams side by side:

gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480 ! nvvidconv ! video/x-raw(memory:NVMM),format=NV12,width=1280,height=800 ! nvcompositor ! nvoverlaysink

gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw,width=640,height=480 ! nvvidconv ! video/x-raw(memory:NVMM),format=NV12,width=1280,height=800 ! nvcompositor ! nvoverlaysink

Note that you will need to adjust the width and height parameters of the nvcompositor element to match the resolution of your screen.

Also, make sure that you have the necessary dependencies installed, including the nvcompositor and nvoverlaysink elements.

I hope this helps! Let me know if you have any further questions.

— We support team will also look into your issue to have further suggestions soon. please stay tuned. —

In Jetpack 6.2.1, nvoverlaysink is not available

Hello @elsa.maria

Since this is local console mode, avoid running two independent nvdrmvideosink instances. Both pipelines may try to control the same DRM/KMS display resource.

Use a single pipeline with nvcompositor, then send the composed output to one nvdrmvideosink:

gst-launch-1.0 \
  nvcompositor name=comp \
    sink_0::xpos=0 sink_0::ypos=0 sink_0::width=640 sink_0::height=480 \
    sink_1::xpos=640 sink_1::ypos=0 sink_1::width=640 sink_1::height=480 \
  ! 'video/x-raw(memory:NVMM),format=NV12,width=1280,height=480' \
  ! nvdrmvideosink \
  v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480 ! nvvidconv ! comp.sink_0 \
  v4l2src device=/dev/video1 ! video/x-raw,width=640,height=480 ! nvvidconv ! comp.sink_1

This keeps only one DRM display sink active and displays both video streams side by side.

Regards,
Daniel R.
Embedded SW Engineer at RidgeRun
Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com
Website: www.ridgerun.com