Hi,
I’m running a GStreamer pipeline that publishes video via WHIP to LiveKit Ingress using whipsink / webrtcbin.
I’m trying to reliably detect when the remote side (Ingress / LiveKit) goes away.
Setup
-
GStreamer (Python GI bindings)
-
whipsink→ internalwebrtcbin -
Send-only video (H264 RTP)
-
Docker environment (publisher and ingress on same Docker network)
What I’m observing
-
I attach
notify::connection-stateandnotify::ice-connection-stateonwebrtcbin.for prop in ("connection-state", "ice-connection-state"): if webrtcbin.find_property(prop): webrtcbin.connect(f"notify::{prop}", on_notify) -
I correctly see the initial transitions:
-
connection-state = CONNECTED -
ice-connection-state = COMPLETED
-
-
I then stop both LiveKit and Ingress containers completely (WHIP HTTP endpoint + ICE UDP port are gone).
-
Even after 5+ minutes, I observe:
-
connection-stateremainsCONNECTED -
ice-connection-stateremainsCOMPLETED -
No WARN/ERROR/ELEMENT messages from
webrtcbinornicesinkon the bus -
Outbound RTP counters (
OUTBOUND_RTP packetsSent/bytesSent) continue to increase -
get-stats()does not exposeREMOTE_INBOUND_RTPor anybytesReceivedfields on this build
-
-
The only bus messages I see are periodic
TAGmessages fromGstNiceSink, which appear to be metadata only.
Stats visibility (from get-stats)
The following stat types are present:
-
PEER_CONNECTION -
OUTBOUND_RTP -
TRANSPORT -
CANDIDATE_PAIR -
local/remote ICE candidates
But no:
-
REMOTE_INBOUND_RTP -
INBOUND_RTP -
bytesReceived -
RTT / jitter / packetsLost
So I currently have no receiver feedback stats to rely on.
Question
Is this expected behaviour?
Specifically:
-
Is it normal for
webrtcbinto remain in CONNECTED / ICE COMPLETED indefinitely if the remote peer disappears and UDP sends still succeed locally? -
Is there a recommended signal or mechanism in GStreamer to detect that a WHIP/WebRTC peer is no longer reachable when:
-
no receiver-report stats are exposed, and
-
no bus ERROR/WARNING is emitted?
-
-
Should ICE consent / keepalive eventually transition the connection state to
DISCONNECTED/FAILED, or can it legitimately remainCOMPLETEDforever in this scenario? -
Is there a way to force or configure stricter liveness detection (timeouts, consent checks, etc.) in
webrtcbin?
I’m not trying to restart the whole pipeline on transient issues — I just need a reliable signal that the remote endpoint is gone.
Any guidance on the intended behaviour here (or what signal I should be watching instead) would be much appreciated.
Thanks!