Gstreamer mpegtsmux slows down pipe enormously

Hi,
I use the Jetson Nano with the Raspberry pi HQ camera. My goal is to stream the video footage to a webbrowser without latency.

On the nano I am using the following pipe:

gst-launch-1.0 nvarguscamerasrc ! "video/x-raw(memory:NVMM), format=NV12, width=1920, height=1080" ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420' ! omxh264enc profile=high cabac-entropy-coding=true insert-sps-pps=true iframeinterval=30 ! 'video/x-h264, level=(string)4.2, stream-format=(string)byte-stream' ! mpegtsmux ! tcpserversink host=10.42.0.1 port=5001
re

The problem is, the “mpegtsmux” adds almost three seconds of latency. If i use the same pipe without mpegtsmux i have an acceptable latency of about 200 ms.
I can confirm it’s the mpegtsmux because when i use the following pipe to show the videostream on the nano with display, I also have a latency of about 3 seconds.

gst-launch-1.0 nvarguscamerasrc ! "video/x-raw(memory:NVMM), format=NV12, width=1920, height=1080" ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)I420' ! omxh264enc profile=high cabac-entropy-coding=true insert-sps-pps=true iframeinterval=30 ! 'video/x-h264, level=(string)4.2, stream-format=(string)byte-stream' ! mpegtsmux !  decodebin ! autovideosink

Do any of you have any suggestions on what I could improve to get latency below 500ms when using mpegtsmux?
Or is there a way to avoid the muxing.

I also tried the hlssink but it seems the nano gets too hot with hlssink.

Hi,
A user has mentioned delay in using tsdemux plugin:
Udp h264 to nv3dsink latency optimization - #7 by davidz0yyl

Probably it is the mechanism in transport stream. Are you able to try other muxer such as matroskamux?

Or try UDP streaming:
Gstreamer TCPserversink 2-3 seconds latency - #5 by DaneLLL