Low latency video stream from gstreamer pipeline on jetson TX2

hi,
I want to video stream and capture with use to gstreamer pipelines on my digital camera. I use this pipeline:
v4l2src device=/dev/video8 io-mode=2 ! video/x-raw, width=640, height=480,framerate=60/1 ! nvvidconv ! omxh264enc bitrate=1000000 ! mpegtsmux name=mux ! udpsink host=235.6.6.6 auto-multicast=true port=11002 ---> for video stream

udpsrc multicast-group = 235.6.6.6 auto-multicast=true port=11002 ! tsdemux ! video/x-h264 ! queue ! h264parse disable-passthrough=true ! avdec_h264 ! videoconvert ! video/x-raw, format=BGRA ! appsink name=outsink ---> for video receiver
These pipelines correctly works, but my video camera stream is low latency. I have a delay of at least 2 seconds.
How can i make the video stream real time?

Hi,
We have deprecated omx plugins. Please use nvv4l2h264enc. You can set the properties and try:

... ! nvv4l2h264enc insert-sps-pps=1 maxperf-enable=1 idrinterval=15 poc-type=2 ! 

Hi DaneLLL,
I tried this pipeline:

gst-launch-1.0 v4l2src  device=/dev/video8 io-mode=2  ! video/x-raw, width=640, height=480,framerate=60/1 ! nvvidconv ! nvv4l2h264enc insert-sps-pps=1 maxperf-enable=1 idrinterval=15 poc-type=2 ! mpegtsmux name=mux  ! udpsink host=235.6.6.6 auto-multicast=true port=11002

But I got this output:

WARNING: erroneous pipeline: no property "idrinterval" in element "nvv4l2h264enc0"

When remove idrinterval andpoc-type=2, :

gst-launch-1.0 v4l2src  device=/dev/video8 io-mode=2  ! video/x-raw, width=640, height=480,framerate=60/1 ! nvvidconv ! nvv4l2h264enc insert-sps-pps=1 maxperf-enable=1 ! mpegtsmux name=mux  ! udpsink host=235.6.6.6 auto-multicast=true port=11002

This pipeline is runable. But still the video stream has the same delay

1 Like

Hi,
Looks like you don’t use latest r32.5.1(Jetpack 4.5.1). Please share the release version:

$ head -1 /etc/nv_tegra_release

Please check glass-to-glass latency of the v4l2 source. In most cases, the latency is mainly from the source. Generally hardware encoding does not give much latency.

My jetpack version is 4.4.1.
Commond output:

R32 (realise) REVISION 4.3 BOARD=186ref EAI=aarch64

Hi,
The property idrinterval is added in r32.5.1. The source code of gst-v4l2 is public. You can build prebuilt lib from r32.5.1 source code and replace it to r32.4.3.

For setting poc-type, would need to upgrade to r32.5.1.

Hi Danell,
Is there any other way to speed it up video stream without update? Because I work on offline jetson system. I don’t have internet communication. Actually, I’m afraid to disrupt the working system

Hi,
You may check glass-to-glass latency first. If the latency is from source, may check to reduce it.

Since video decoding begins from IDR frames, setting small idrinterval should help. For idrinterval=15 in 30 fps, the theoretical latency is around 500-600ms.

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