Slow GStreamer accelerated pipeline

I’m streaming using the following pipeline :
gst-launch-1.0 videotestsrc is-live=true ! nvvidconv !
nvv4l2h264enc insert-sps-pps=1 idrinterval=15 bitrate=4000000 EnableTwopassCBR=1 !
h264parse !
rtph264pay config-interval=1 pt=96 !
udpsink host=127.0.0.1 port=5001 sync=0 async=0

When I receive the stream using this accelerated pipeline :
gst-launch-1.0 -v udpsrc port=5001 caps=“application/x-rtp,media=video,encoding-name=H264,payload=96” ! \
queue ! rtph264depay ! h264parse ! nvv4l2decoder ! nvvidconv ! \
capsfilter caps=“video/x-raw, format=I420” ! autovideosink

The stream is being displayed extremely slowly. However when I use :
gst-launch-1.0 udpsrc port=5001 \
caps=“application/x-rtp, media=video, encoding-name=H264, payload=96” ! \
rtph264depay ! avdec_h264 ! autovideosink

It’s perfect and fast.

Why is the accelerated pipeline so slow ?

HW: Jetson AGX Orin
OS “Ubuntu 22.04.5 LTS”
R36 (release), REVISION: 4.3, GCID: 38968081, BOARD: generic, EABI: aarch64, DATE: Wed Jan 8 01:49:37 UTC 2025

KERNEL_VARIANT: oot

TARGET_USERSPACE_LIB_DIR=nvidia
TARGET_USERSPACE_LIB_DIR_PATH=usr/lib/aarch64-linux-gnu/nvidia

Logs of the accelerated pipeline :
Setting pipeline to PAUSED … Opening in BLOCKING MODE
Pipeline is live and does not need PREROLL … Pipeline is PREROLLED … Setting pipeline to PLAYING …
/GstPipeline:pipeline0/GstUDPSrc:udpsrc0.GstPad:src: caps = application/x-rtp, media=(string)video, encoding-name=(string)H264, payload=(int)96, clock-rate=(int)90000 /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = application/x-rtp, media=(string)video, encoding-name=(string)H264, payload=(int)96, clock-rate=(int)90000 /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = application/x-rtp, media=(string)video, encoding-name=(string)H264, payload=(int)96, clock-rate=(int)90000 New clock: GstSystemClock
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, parsed=(boolean)true NvMMLiteOpen : Block : BlockType = 261
NvMMLiteBlockCreate : Block : BlockType = 261 /GstPipeline:pipeline0/nvv4l2decoder:nvv4l2decoder0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, parsed=(boolean)true /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:sink: caps = application/x-rtp, media=(string)video, encoding-name=(string)H264, payload=(int)96, clock-rate=(int)90000 /GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)320, height=(int)240, framerate=(fraction)0/1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)constrained-baseline, level=(string)2.1
/GstPipeline:pipeline0/nvv4l2decoder:nvv4l2decoder0.GstPad:sink: caps = video/x-h264, stream-format=(string)byte-stream, alignment=(string)au, width=(int)320, height=(int)240, framera
te=(fraction)0/1, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, profile=(string)constrained-baseline, level=(string)2.1
/GstPipeline:pipeline0/nvv4l2decoder:nvv4l2decoder0.GstPad:src: caps = video/x-raw(memory:NVMM), format=(string)NV12, width=(int)320, height=(int)240, interlace-mode=(string)progressi
ve, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono,
pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt601, framerate=(fraction)0/1, nvbuf-memory-type=(string)nvbuf-mem-surface-array, gpu-id=(int)0
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:src: caps = video/x-raw, width=(int)320, height=(int)240, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-
flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate
=(fraction)0/1, nvbuf-memory-type=(string)nvbuf-mem-surface-array, gpu-id=(int)0, format=(string)I420, colorimetry=(string)bt601
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, width=(int)320, height=(int)240, interlace-mode=(string)progressive, multiview-mode=(string)mono, mult
iview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, fra
merate=(fraction)0/1, nvbuf-memory-type=(string)nvbuf-mem-surface-array, gpu-id=(int)0, format=(string)I420, colorimetry=(string)bt601
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw, width=(int)320, height=(int)240, interlace-mode=(string)progressive,
multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pix
el-aspect-ratio=(fraction)1/1, framerate=(fraction)0/1, nvbuf-memory-type=(string)nvbuf-mem-surface-array, gpu-id=(int)0, format=(string)I420, colorimetry=(string)bt601
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstXvImageSink:autovideosink0-actual-sink-xvimage.GstPad:sink: caps = video/x-raw, width=(int)320, height=(int)240, interlace-mo
de=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half
-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)0/1, nvbuf-memory-type=(string)nvbuf-mem-surface-array, gpu-id=(int)0, format=(string)I420, colorimetry=(stri
ng)bt601
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink: caps = video/x-raw, width=(int)320, height=(int)240, interlace-mode=(string)progressive, multiview-mode=(strin
g)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fract
ion)1/1, framerate=(fraction)0/1, nvbuf-memory-type=(string)nvbuf-mem-surface-array, gpu-id=(int)0, format=(string)I420, colorimetry=(string)bt601
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, width=(int)320, height=(int)240, interlace-mode=(string)progressive, multiview-mode=(string)mono, mul
tiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, fr
amerate=(fraction)0/1, nvbuf-memory-type=(string)nvbuf-mem-surface-array, gpu-id=(int)0, format=(string)I420, colorimetry=(string)bt601
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:sink: caps = video/x-raw(memory:NVMM), format=(string)NV12, width=(int)320, height=(int)240, interlace-mode=(string)progressive, mult
iview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-as
pect-ratio=(fraction)1/1, colorimetry=(string)bt601, framerate=(fraction)0/1, nvbuf-memory-type=(string)nvbuf-mem-surface-array, gpu-id=(int)0
Redistribute latency…

Hi,
Please follow the examples in developer guide to use nv3dsink or nveglglessink:

Accelerated GStreamer — NVIDIA Jetson Linux Developer Guide

And please set sync=0 to the sink plugin for a try.

this is not linked to the autovideosink, since this happen when I also use intervideosink and output another way.

Hi,
Please try

$ gst-launch-1.0 videotestsrc is-live=true ! nvvidconv ! \
nvv4l2h264enc insert-sps-pps=1 idrinterval=15 bitrate=4000000 EnableTwopassCBR=1 poc-type=2 ! \
"video/x-h264,profile=main" ! h264parse ! \
rtph264pay config-interval=1 pt=96 ! \
udpsink host=127.0.0.1 port=5001 sync=0 async=0
$ DISPLAY=:0 gst-launch-1.0 -v udpsrc port=5001 caps="application/x-rtp,media=video,encoding-name=H264,payload=96" ! \
queue ! rtph264depay ! h264parse ! nvv4l2decoder ! nvvidconv ! "video/x-raw(memory:NVMM)" ! nv3dsink sync=0