Client traffic hangs reliably within predictable time, gst-launch-1.0, gstreamer-1.16, RTP/video/THEORA, local host loopback
gst-launch-1.0, gstreamer-1.16, RTP/video/THEORA, local host loopback, client traffic hangs reliably within predictable time
env: gstreamer-1.16, Windows 10, Dell XPS desktop, cpu: i7.
I was running RTP video & audio tests, and client traffic always hangs after some predictable time.
So I simplify the test to video only.
Both server & client run on the same machine. video RTP with THEORA, audio RTP with opus
my test commands are as follow.
=========================================================
1 server, 1 client
server command:
gst-launch-1.0 \
ksvideosrc ! \
"video/x-raw,\
framerate=15/1,\
width=352,height=288" ! \
theoraenc ! \
rtptheorapay config-interval=2 ! \
udpsink host="127.0.0.1" port=5555
client command:
gst-launch-1.0 \
udpsrc port=5555 ! \
"application/x-rtp,media=video,clock-rate=90000,\
encoding-name=THEORA" ! \
rtpjitterbuffer latency=500 ! \
rtptheoradepay ! \
queue ! \
theoradec ! \
queue ! \
videoconvert ! \
autovideosink sync=false
This set of server/client would always run for 2-3 hours, roughly, before client traffic hangs, no video display update on screen.
If I restart the client command, without touching server process, the traffic/video will restart on screen. So it seems the server is fine.
To further identify the problem, I change the commands to the following,
=============================================================
1 server, 2 clients:
Server outgoing traffic is split, tee, into 2 UDP ports, and there are 2 clients receiving the traffic.
server command: send video to 2 UDP ports
gst-launch-1.0 ksvideosrc ! \
"video/x-raw,\
framerate=15/1,\
width=352,height=288" ! \
theoraenc ! \
rtptheorapay config-interval=2 ! \
tee name = sp \
sp. ! queue ! \
udpsink host="127.0.0.1" port=5555 \
sp. ! queue ! \
udpsink host="127.0.0.1" port=5560
client 1: receive video from UDP 5555
gst-launch-1.0 -v -m \
udpsrc port=5555 ! \
"application/x-rtp,media=video,clock-rate=90000,\
encoding-name=THEORA" ! \
rtpjitterbuffer latency=500 ! \
rtptheoradepay ! \
queue ! \
theoradec ! \
queue ! \
videoconvert ! \
autovideosink sync=false
client 2: receive video from UDP 5560
gst-launch-1.0 -v -m \
udpsrc port=5560 ! \
"application/x-rtp,media=video,clock-rate=90000,\
encoding-name=THEORA" ! \
rtpjitterbuffer latency=500 ! \
rtptheoradepay ! \
queue ! \
theoradec ! \
queue ! \
videoconvert ! \
autovideosink sync=false
This setup would always run for about ~30 minutes before both clients video display hang, stop updating.
If restart client 1, client 1's video display starts. But client 2's video still hangs.
If also restart client 2, client 2's video also starts flowing.
Then both client video hang again in ~30 minutes.
When video hangs, the client gst-launch-1.0 pipeline seems still running without major complaints.
Server side seems fine.
Don't know if client stops reading incoming UDP ports or not doing update.
==========================================================================
As far as I know, all plugins used are gstreamer good/base plugins, except for ksvideosrc, though video capturing doesn't seem to be the problem.
Please comment.
Copy and paste to this web page/interface is a bit difficult. Hope the commands look correct.