Can't use nvdrmvideosink in Jetson Xavier NX

I want to use nvdrmvideosink to display stream from one usb camera to one hdmi device.
But when I run the command which is ok in Jetson AGX Orin(usb device path /dev/video8) as shown bellow, the errors are output in the Xavier NX(usb device path /dev/video0).

The comands:

service gdm stop
loginctl terminate-seat seat0
modprobe tegra_udrm modeset=1
*export GST_DEBUG=FACTORY:4 *
gst-launch-1.0 v4l2src device=/dev/video8 ! videoconvert ! nvvidconv ! nvdrmvideosink max-bitrate=16384000 set_mode=0 sync=false

The Result:

gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! nvvidconv ! nvdrmvideosink max-bitrate=16384000 set_mode=0 sync=false -e

0:00:00.236774048 23904 0x55bd0f6390 INFO **GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create:** creating element "v4l2src"

0:00:00.240772603 23904 0x55bd0f6390 INFO **GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create:** creating element "videoconvert"

0:00:00.271175067 23904 0x55bd0f6390 INFO **GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create:** creating element "nvvidconv"

0:00:00.272795769 23904 0x55bd0f6390 INFO **GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create:** creating element "nvdrmvideosink"

0:00:00.273443928 23904 0x55bd0f6390 INFO **GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create:** creating element "pipeline"

Setting pipeline to PAUSED ...

Pipeline is live and does not need PREROLL ...

Setting pipeline to PLAYING ...

New clock: GstSystemClock

Failed to set plane

Failed to display frame buffer

ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.

Additional debug info:

gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:

streaming stopped, reason error (-5)

EOS on shutdown enabled -- waiting for EOS after Error

Waiting for EOS...

Could anybody know why and how to solve it?

Hi,
Do you also flash Jetpack 5.0.2 to the Xavier NX? not sur e if you use same version for both Orin and Xaiver NX.

And please try with videotestsrc and see if it works:

$ gst-launch-1.0 videotestsrc is-live=1 ! videoconvert ! nvvidconv ! nvdrmvideosink

No, I am not flash Jetpack 5.0.2 to Xavier NX.
I use the jetpack 4.5 in Xavier NX.

The result as bellow.

root@nx:/usr/local/robu/source# service gdm stop
root@nx:/usr/local/robu/source#
root@nx:/usr/local/robu/source# loginctl terminate-seat seat0
root@nx:/usr/local/robu/source#
root@nx:/usr/local/robu/source# modprobe tegra_udrm modeset=1
root@nx:/usr/local/robu/source#
root@nx:/usr/local/robu/source# export GST_DEBUG=FACTORY:4
root@nx:/usr/local/robu/source# gst-launch-1.0 videotestsrc is-live=1 ! videoconvert ! nvvidconv ! nvdrmvideosink

Setting pipeline to PAUSED ...

Pipeline is live and does not need PREROLL ...

Setting pipeline to PLAYING ...

New clock: GstSystemClock

Failed to set plane

Failed to display frame buffer

ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data stream error.

Additional debug info:

gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:

streaming stopped, reason error (-5)

Execution ended after 0:00:00.015413958

Setting pipeline to PAUSED ...

Setting pipeline to READY ...

Setting pipeline to NULL ...

Freeing pipeline ...

root@nx:/usr/local/robu/source# gst-launch-1.0 videotestsrc is-live=1 ! videoconvert ! nvvidconv ! nvdrmvideosink -e

Setting pipeline to PAUSED ...

Pipeline is live and does not need PREROLL ...

Setting pipeline to PLAYING ...

New clock: GstSystemClock

Failed to set plane

Failed to display frame buffer

ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data stream error.

Additional debug info:

gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:

streaming stopped, reason error (-5)

EOS on shutdown enabled -- waiting for EOS after Error

Waiting for EOS...

I can use nvoverlaysink:

root@nx:/usr/local/robu/source# gst-launch-1.0 videotestsrc is-live=1 ! videoconvert ! nvvidconv ! nvoverlaysink -e

Setting pipeline to PAUSED ...

Pipeline is live and does not need PREROLL ...

Setting pipeline to PLAYING ...

New clock: GstSystemClock

Hi,
For using Jetpack 4 release, please refer to this version of document:
Jetson Linux API Reference: 08_video_dec_drm (Direct Rendering Manager)

This command is not required for Jetpack 4:

root@nx:/usr/local/robu/source# modprobe tegra_udrm modeset=1

Please not to execute it and try again.

https://docs.nvidia.com/jetson/archives/r34.1/DeveloperGuide/text/SD/Multimedia/AcceleratedGstreamer.html#gstreamer-1-0-installation-and-setup

I refer to the information before, it shows:

Load the DRM driver:

For Jetson Xavier use
$ sudo modprobe tegra_udrm modeset=1

For Jetson Orin use
$ sudo modprobe nvidia-drm modeset=1

The link you provided is not gstreamer related API and method, I think it have many low-level API to use,right ? It is a long time to use C program language for me, and the low-level API is hard for me. I am now using python mainly.

If not execute $ sudo modprobe tegra_udrm modeset=1, error also happens.


root@nx:/usr/local/robu/source# service gdm stop

root@nx:/usr/local/robu/source# loginctl terminate-seat seat0

root@nx:/usr/local/robu/source# gst-launch-1.0 videotestsrc is-live=1 ! videoconvert ! nvvidconv ! nvdrmvideosink -e

Setting pipeline to PAUSED ...

Pipeline is live and does not need PREROLL ...

Setting pipeline to PLAYING ...

New clock: GstSystemClock

Failed to set plane

Failed to display frame buffer

ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data stream error.

Additional debug info:

gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:

streaming stopped, reason error (-5)

EOS on shutdown enabled -- waiting for EOS after Error

Waiting for EOS...

Hi,
The steps between different release may not be identical. For Jetpack 4, the gstreamer user guide is in
https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3261/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/accelerated_gstreamer.html#wwpID0E06P0HA

Thanks, I will have a try later.

One error output as bellow.

**root@nx**:**/sys/class/graphics/fb0**# echo 4 > blank

**root@nx**:**/sys/class/graphics/fb0**# echo 0x0 > device/win_mask

**root@nx**:**/sys/class/graphics/fb0**# echo 0x3f > device/win_mask

bash: echo: write error: Invalid argument

Hi,
By default the commands should work:

root@nx:/usr/local/robu/source# service gdm stop
root@nx:/usr/local/robu/source# loginctl terminate-seat seat0
root@nx:/usr/local/robu/source# gst-launch-1.0 videotestsrc is-live=1 ! videoconvert ! nvvidconv ! nvdrmvideosink 

A bit strange it does not work. Do you use Xavier NX developer kit? And would be great if you can try Jetpack 4.6.3.

For comparison, you may try this jetson_multimedia_api sample:

/usr/src/jetson_multimedia_api/samples/08_video_dec_drm/

The sample also uses DRM. Please give it a try.

I tried the command in another Xavier NX, and it indeed has no problem.
So it maybe something wrong with the machine I used before.
Thanks very much. I will use other machines instead of the one before.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.