Udp h264 to nv3dsink latency optimization

I suspect that the latency problem originates in the tsdemux. It seems to have a default latency setting of 700 ms, and can not be changed as far as I understand. Is there any alternative to using the tsdemux?

It seems later versions of the tsdemux plugin support latency setting. How do I go about upgrading the gstreamer plugins on a target?

After doing:

sudo apt install openssl-dev
sudo gst-install --prefix=/home/ubuntu/gst --version=1.16.2

I was able to install gstreamer 1.16.2 according to the user manual. But this version did not have the latency property for tsdemux either. I also failed to install gstreamer 1.18.1 in the same way. It failed with:

sudo gst-install --prefix=/home/ubuntu/gst --version=1.18.1

/usr/bin/gst-install: line 82: ./configure: no such file or directory
make: *** No targets specified and no makefile found. Stop.

1.18.0 and 1.18.1 fails in the same way. 1.16.x works.