Shmsink/src or udpsink/src

I’m struggling with latency.
I want to share video from 1 user to another user.
My pipeline with udp works but I hold CPU cores in 90s % usage and I get lag caused by that. Any opinion if shm would have lower usage.

Not sure, it depends on your actual platform and use case, but I don’t think that shmsrc/shmsink is the easiest way for your case.
It also depends on what format you’re sending through, but time stamping may be an issue.
In some cases you may try enabling shmsrc property do-timestamp=1.

Though, I’d better advise to use RTP over UDP for localhost. You can have a look to this post for some options depending on actual formats/encoding/RTPpayload.

Thanks lots!
Bizare! I’m using rtph264pay. If I stream as user1 and watch as user1 the latency is perfect.
If I watch as user2 then the stream drifts back in time: some 5secs / minute

Nothing else changed. Has anyone any ideas?


Can you try without NoMachine in the loop ?

Ta, I’ll ponder how to do that - 1 machine - 1 display and keyboard: User1 acquires video, User2 watches stream.
I’ll try nomachine launches then shuts down, User2 watches
I’ll give the exact scenario in case there are ideas, better than this:
Divemaster collects video from 1 to 4 divers. He watches and talks to all divers.
In other parts of ship watchers watch, fullscreen, a particular diver.
I tried HTML streaming with tcp. Works except that the watchers are likely to usevwingows laptops and windows-explore will not accept the bug in tcpserversrc, only firefox will.

Pictures show a diver, Divemaster and watchers screens

The watcher screen drifts 5 secs per minute on udpsink/src as another user

I’m utterley confused, there must be something I do not understand

User1 publishes a udp stream

If I watch that stream as User1 it is perfectly syncronised. If I watch as User2 it drifts back in time oooooh 5 secs / min.

I watch with this script:
if [ $# -lt 1 ];then
echo usage diver number

echo “aport:” $APORT " vport:" $VPORT

gst-launch-1.0 -vc \
udpsrc port=$VPORT close-socket=false multicast-iface=false auto-multicast=true ! application/x-rtp, payload=96 ! \
rtpjitterbuffer ! \
rtph264depay !
avdec_h264 !
xvimagesink sync=false async=false
udpsrc port=$APORT !
‘application/x-rtp,media=audio,payload=96,clock-rate=22000,encoding-name=L24’ !
rtpL24depay !
audioconvert !
autoaudiosink sync=false

If anyone has inspiration or ideas, I’d be so gratefull. The picture is after 1/2 hour of streaming (not clear time 16:43:08)