MMAPI 08_video_dec_drm and nvdrmvideosink Crops Video

Hello, I’m using the Jetson Nano (B01, also reproduced on A02) trying to utilize nvdrmvideosink in a GStreamer pipeline but I’ve found it usually crops the video source. This can be replicated in this example pipeline:

gst-launch-1.0 videotestsrc ! video/x-raw,width=1920,height=1080 ! nvdrmvideosink conn_id=0 plane_id=2 set_mode=0

as well as in the MMAPI drm example. I’m running a fresh install of the Jetson Nano SD Card Image, and I am running the most recent version of the l4t multimedia api (32.4.3). I’ve also tried replacing the /usr/lib/aarch64-linux-gnu/tegra/libtegrav412.so with the library found at this post who seems to have a similar issue from an older version, but the issue persists.

I have noticed rarely (1/10 times) my video will appear full size using the same nvdrmvideosink, despite making no changes, and it seems more common after a fresh restart. This leads me to believe it could be some sort of conflict with maybe the display manager (gdm3) or something else running in the background. Here are the results of running MMAPI 08_video_dec_drm after stopping gdm, terminating seat0, and unblanking the second display:

 $ sudo ./video_dec_drm ../../data/Video/sample_outdoor_car_1080p_10fps.h264 H264 --disable-ui

sudo ./video_dec_drm ../../data/Video/sample_outdoor_car_1080p_10fps.h264 H264

(Apologies for not taking screenshots since the desktop is disabled)

Please let me know if I can answer any questions, any help would be really appreciated! Thank you very much!!

Hi,
Please make sure you have execute the steps in document:
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide%2Faccelerated_gstreamer.html%23wwpID0E0EP0HA

1. Stop the display manager:
   sudo systemctl stop gdm
   sudo loginctl terminate-seat seat0

Before you run 08_video_dec_drm or use nvdrmvideosink.

Thanks for the response @DaneLLL !

Unfortunately executing those steps doesn’t help with the drm sample or the gstreamer pipeline. Is it possible I need to stop a different display manager or seat? Or could there be other commands I need to run? I also tried:

sudo sh -c 'echo 0 > /sys/class/graphics/fb1/blank'

according to the Multimedia API Ref, but haven’t had any luck.

Also I’m running all these commands remotely over ssh if that changes anything.

I really appreciate the help, let me know if I can provide further information!

Hi,
Please share information about the TV for reference:

nvidia@nvidia-desktop:~$ cat /sys/class/graphics/fb0/modes

Hi Dane,

So far I’ve tried the mmapi sample with both a computer monitor and a tv (with the same results). Here’s the monitor information:

usr@Jetson:~$ cat /sys/class/graphics/fb0/modes
D:1366x768p-59
V:640x480p-60
V:800x600p-60
V:1024x768p-60
U:640x400p-60
S:1280x720p-60
D:1280x720p-60
D:720x480p-59
U:1920x1080p-60
U:1280x720p-60
U:720x480p-59
U:640x480p-59
U:1920x1080p-50
U:720x576p-50
U:1280x720p-50
U:1920x1080p-24
U:1920x1080p-60
U:1280x720p-60
U:1920x1080p-24

And the tv information:

usr@Jetson:~$ cat /sys/class/graphics/fb0/modes
D:1366x768p-59
D:1280x768p-59
U:720x400p-70
V:640x480p-60
V:800x600p-56
V:800x600p-60
V:1024x768p-60
S:1280x720p-60
D:1280x720p-60
D:720x480p-59
D:720x576p-50
U:1920x1080p-60
U:1280x720p-60
U:720x480p-59
U:640x480p-59
U:1920x1080p-50
U:1280x720p-50
U:720x576p-50
U:1920x1080p-24
U:1920x1080p-60
U:1280x720p-60
U:1920x1080p-24

Thanks again for the help!

Hi @DaneLLL,

Has anyone been able to replicate or make any progress on this issue? Is there any more information I can provide?

We’re working on a project that leans pretty heavily on getting this GStreamer element to function, and would love to help out in any way that could lead to a resolution as fast as possible.

Thank you very much for your help!

Hi,
Please check if the TV mode is in 1920x1080:

nvidia@nvidia-desktop:~$ cat /sys/class/graphics/fb0/mode
U:1920x1080p-60

Since the h264 stream is in 1920x1080, you would need the TV running in the mode also.

2 Likes

@DaneLLL is a wizard. Our displays were defaulting to a weird resolution. If anyone else has this issue changing the resolution will fix it:

xrandr --size 1920x1080

Thank you so much!!!

1 Like