Distortion issues on video of Gstreamer on Jetson Xavier NX

Hi, I’m using the production module of Jetson Xavier NX

Jetpack 4.5.1 [L4T 32.5.1]
cuDNN: 8.0.0.180

I use GitHub - balena-os/balena-jetson yocto build as base. and this docker container:

https://hub.docker.com/layers/balenalib/jetson-nano-ubuntu/bionic/images/sha256-b29927f1e1b2dcd282be960df873f9cb371a9d5b815340868d8d39d367e72493?context=explore

gst-launch-1.0 rtspsrc latency=50 location=rtsp://192.168.1.219:8554/ ! rtph264depay ! decodebin ! nvvidconv ! video/x-raw,width=1280,height=720,format=BGRx | appsink

The current command works fine on Jetson Nano, but not on the Xavier NX

The image is getting disorted by unknown reasons.

Here’s my factory output

GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtspsrc"
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtspwms"
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtspreal"
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtph264depay"
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "decodebin"
GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element "typefind" named "typefind"
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "nvvidconv"
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "appsink"
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "pipeline"
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "capsfilter"
 
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "udpsrc"
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "udpsrc"
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "udpsrc"
GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element "rtpbin" named "manager"
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpsession"
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpssrcdemux"
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpstorage"
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "funnel"
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "funnel"
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpjitterbuffer"
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpptdemux"
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "h264parse"
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "capsfilter"
GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "nvv4l2decoder"

Hi,
Please check if you observe the same issue in video playback:

$ gst-launch-1.0 rtspsrc latency=50 location=rtsp://192.168.1.219:8554/ ! rtph264depay ! h264parse ! nv4l2decoder ! nvoverlaysink

Exactly the same issue


 h264parse ! nvv4l2decoder ! nvoverlaysinkh-1.0 rtspsrc latency=50 location=rtsp://192.168.1.219:8554/  ! rtph264depay ! 
nvbuf_utils: Could not get EGL display connection
Setting pipeline to PAUSED ...
Opening in BLOCKING MODE
Opening in BLOCKING MODE 
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://192.168.1.219:8554/channel1_1
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
Progress: (request) SETUP stream 0
Progress: (request) SETUP stream 0
Progress: (request) SETUP stream 0
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
Progress: (request) Sending PLAY request
Progress: (request) Sent PLAY request
NvMMLiteOpen : Block : BlockType = 261 
NVMEDIA: Reading vendor.tegra.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 261 

(gst-launch-1.0:59501): GStreamer-CRITICAL **: 16:19:56.452: gst_mini_object_unref: assertion 'mini_object != NULL' failed
NvMMLiteOpen : Block : BlockType = 261 
NVMEDIA: Reading vendor.tegra.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 261 
WARNING: from element /GstPipeline:pipeline0/GstNvOverlaySink-nvoverlaysink:nvoverlaysink-nvoverlaysink0: A lot of buffers are being dropped.
Additional debug info:
gstbasesink.c(2902): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstNvOverlaySink-nvoverlaysink:nvoverlaysink-nvoverlaysink0:
There may be a timestamping problem, or this computer is too slow.
WARNING: from element /GstPipeline:pipeline0/GstNvOverlaySink-nvoverlaysink:nvoverlaysink-nvoverlaysink0: A lot of buffers are being dropped.
Additional debug info:
gstbasesink.c(2902): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstNvOverlaySink-nvoverlaysink:nvoverlaysink-nvoverlaysink0:
There may be a timestamping problem, or this computer is too slow.
WARNING: from element /GstPipeline:pipeline0/GstNvOverlaySink-nvoverlaysink:nvoverlaysink-nvoverlaysink0: A lot of buffers are being dropped.
Additional debug info:
gstbasesink.c(2902): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstNvOverlaySink-nvoverlaysink:nvoverlaysink-nvoverlaysink0:
There may be a timestamping problem, or this computer is too slow.

Did a test with outputting an png

gst-launch-1.0 rtspsrc latency=50 location=rtsp://192.168.1.219:8554/ ! rtph264depay ! decodebin ! nvjpegenc ! filesink location= ./start/web/build/test10.jpg

got this as output

thanks for the support

Hi,
It seems like the stream is corrupted. Please try software decoder:

$ export DISPLAY=:0
$ gst-launch-1.0 rtspsrc latency=50 location=rtsp://192.168.1.219:8554/ ! rtph264depay ! h264parse ! avdec_h264 ! xvimagesink

yes already done that :) the image is fine then. The yocto build depends on GitHub - OE4T/meta-tegra: BSP layer for NVIDIA Jetson platforms, based on L4T

Is this issue known for L4T 32.5.1 specific cases?

Hi,
Please save the h264 stream to local file:

gst-launch-1.0 rtspsrc latency=50 location=rtsp://192.168.1.219:8554/ ! rtph264depay ! h264parse ! video/x-h264,stream-format=byte-stream ! filesink location=test.h264

And check if software decoder works:

gst-launch-1.0 filesrc location=test.h264 ! h264parse ! avdec_h264 ! xvimagesink

Hardware decoder fails to decode the stream correctly:

gst-launch-1.0 filesrc location=test.h264 ! h264parse ! nvv4l2decoder ! nvoverlaysink

If running above commands shows the error please attach test.h264 so that we can give it a try.

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