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.
Thanks
James

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?

James

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:
#!/bin/sh
if [ $# -lt 1 ];then
echo usage diver number
exit
fi
CHAN=$1
APORT=$((3444+$CHAN))
VPORT=$((5000+$CHAN))

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)

Just to simplify the setup a little, are you seeing the same issue if you remove the audio branch and do video only?

Note that with sync=false you’ll probably get jittery video.

Page … Page … Page … Here it is on page 1

Watching the stream as User1 sent by User1 cpu cores at 75ish% and latency is well sub 1 sec

Watching the stream as User2 sent by User1, 2 cores and 2 threads late 90s% and latency some 5 secs per min.

Relieved to have found it. Dissapointed!

James