livekitwebrtcsink: intermittent failure to publish after re-connecting to a room
On MacOS M1 with GStreamer installed from the SDK (/Library/Frameworks/GStreamer.framework/
), I'm seeing an intermittent behavior where re-connecting to a livekit room will succeed, but the connection will be in the 'Joined' state, and not the 'Active' state, and no video track is published (I'm calling this the failed state below).
The pipeline I'm using for these tests is autovideosrc ! videoconvert ! video/x-raw ! queue ! livekitwebrtcsink
(see properties in the first line of logs output below).
Since this is an intermittent problem it's hard to say anything with certainty, but here is what I've observed:
- Connecting to a new room usually or always succeeds
- Reconnecting to the same room succeeds with perhaps 50% probability
- Failures seem to be 'sticky' - once failures happen, it seems like most (but not all) attempts fail
- Failed connections close themselves after ~35s (you can see this in the logs below)
- Deleting the room with
$ livekit-cli delete-room --room <room>
causes the next connection attempt to usually (but not always) succeed
Joined vs Active
This is based on watching the output of livekit-cli list-participants --room <room>
. A successful connection will show
Using default project <project>
gstreamer (ACTIVE) tracks: 1
Whereas a failed case shows
Using default project <project>
gstreamer (JOINED) tracks: 0
Success Case Logs
…/gst-plugins-rs on livekit-0.2 via 🐍 v3.9.6 via 🦀 v1.72.0 took 36s 11:44:11
$ GST_DEBUG=webrtcsink:6 GST_PLUGIN_PATH=$HOME/src/rust/gst-plugins-rs/target/release/ gst-launch-1.0 -e autovideosrc ! videoconvert ! video/x-raw ! queue ! livekitwebrtcsink video-caps='video/x-vp8' signaller::ws-url=wss://<project-id>.livekit.cloud signaller::api-key="<api-key>" signaller::secret-key="<secret-key>" signaller::room-name='<room-name>'
Setting pipeline to PAUSED ...
0:00:00.061110000 52084 0x13500d1e0 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:1402:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::prepare:<livekitwebrtcsink0> preparing
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.210546000 52084 0x136021f00 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:3035:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::sink_event:<livekitwebrtcsink0:video_0> Received caps event Caps { seqnum: Seqnum(68), running-time-offset: 0, structure: Some(GstEventCaps { caps: (GstCaps) video/x-raw, width=(int)1920, height=(int)1080, format=(string)UYVY, framerate=(fraction)30/1 }), caps: Caps(video/x-raw(memory:SystemMemory) { width: (gint) 1920, height: (gint) 1080, format: (gchararray) "UYVY", framerate: (GstFraction) 30/1 }) }
Redistribute latency...
0:00:00.408493000 52084 0x13683e890 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:2773:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<livekitwebrtcsink0> Running discovery pipeline for input caps video/x-raw, width=(int)1920, height=(int)1080, format=(string)UYVY, framerate=(fraction)30/1 and output caps ANY with codec Codec { name: "VP8", caps: Caps(video/x-vp8(memory:SystemMemory)), stream_type: StreamType(VIDEO), payload_type: Some(96), decoding_info: Some(DecodingInfo { has_decoder: true }), encoding_info: Some(EncodingInfo { encoder: ElementFactory { inner: TypedObjectRef { inner: 0x136037b30, type: GstElementFactory } }, payloader: ElementFactory { inner: TypedObjectRef { inner: 0x1360d8810, type: GstElementFactory } }, output_filter: None }) }
0:00:00.408501000 52084 0x13683e890 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:2779:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<livekitwebrtcsink0> Running discovery pipeline
0:00:00.418854000 52084 0x13683e890 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:3518:<gstrswebrtc::webrtcsink::imp::BaseWebRTCSink as glib::subclass::object::ObjectImpl>::signals::SIGNALS::{{closure}}::{{closure}}:<livekitwebrtcsink0> applying default configuration on encoder Element { inner: TypedObjectRef { inner: 0x1361f81e0, type: GstVP8Enc } }
0:00:00.428804000 52084 0x13683e890 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:2876:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}: Discovery pipeline got caps Caps(application/x-rtp(memory:SystemMemory) { media: (gchararray) "video", clock-rate: (gint) 90000, encoding-name: (gchararray) "VP8", payload: (gint) 96, ssrc: (guint) 1334916620, timestamp-offset: (guint) 2250615053, seqnum-offset: (guint) 20837, a-framerate: (gchararray) "30", extmap-1: (gchararray) "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01" })
0:00:00.428827000 52084 0x13683e890 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:2892:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<livekitwebrtcsink0> Codec discovery pipeline for caps video/x-raw, width=(int)1920, height=(int)1080, format=(string)UYVY, framerate=(fraction)30/1 with codec Codec { name: "VP8", caps: Caps(video/x-vp8(memory:SystemMemory)), stream_type: StreamType(VIDEO), payload_type: Some(96), decoding_info: Some(DecodingInfo { has_decoder: true }), encoding_info: Some(EncodingInfo { encoder: ElementFactory { inner: TypedObjectRef { inner: 0x136037b30, type: GstElementFactory } }, payloader: ElementFactory { inner: TypedObjectRef { inner: 0x1360d8810, type: GstElementFactory } }, output_filter: None }) } succeeded: application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)VP8, payload=(int)96, extmap-1=(string)http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01;
0:00:00.736020000 52084 0x13683e890 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:1959:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session:<livekitwebrtcsink0> Adding session: unique for peer: unique
0:00:00.747451000 52084 0x13683e890 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:1357:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::request_webrtcbin_pad::{{closure}}:<livekitwebrtcsink0> Requesting WebRTC pad with caps application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)VP8, payload=(int)96, extmap-1=(string)http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01, ssrc=(uint)942818330
0:00:00.747954000 52084 0x13683e890 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:1836:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::negotiate:<livekitwebrtcsink0> Negotiating for session unique
0:00:00.747973000 52084 0x13683e890 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:1859:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::negotiate: Creating offer for session unique
0:00:00.748234000 52084 0x13683e890 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:2265:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<session-pipeline-unique> Recalculating latency
0:00:00.748255000 52084 0x13683e890 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:2265:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<session-pipeline-unique> Recalculating latency
0:00:00.789384000 52084 0x13683e890 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:2265:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<session-pipeline-unique> Recalculating latency
0:00:00.790755000 52084 0x1361f3860 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:1862:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::negotiate::{{closure}}: Created offer for session unique
0:00:00.794298000 52084 0x1361f3860 LOG webrtcsink net/webrtc/src/webrtcsink/imp.rs:2162:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<livekitwebrtcsink0> Ice gathering state in session unique (peer unique) changed: Gathering
0:00:00.836172000 52084 0x1361f3860 WARN webrtcsink net/webrtc/src/webrtcsink/imp.rs:2039:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}::{{closure}}: rtprtxsend doesn't have a `stuffing-kbps` property, stuffing disabled
0:00:00.836454000 52084 0x1361f3860 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:2732:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::handle_sdp_answer::{{closure}}: received reply Ok(None)
0:00:00.836465000 52084 0x1361f3860 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:979:gstrswebrtc::webrtcsink::imp::Session::connect_input_stream:<livekitwebrtcsink0> Connecting input stream video_0 for consumer unique and media 0
0:00:00.836467000 52084 0x1361f3860 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:1000:gstrswebrtc::webrtcsink::imp::Session::connect_input_stream:<livekitwebrtcsink0> Picking codec from local offer
0:00:00.839085000 52084 0x1361f3860 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:3518:<gstrswebrtc::webrtcsink::imp::BaseWebRTCSink as glib::subclass::object::ObjectImpl>::signals::SIGNALS::{{closure}}::{{closure}}:<livekitwebrtcsink0> applying default configuration on encoder Element { inner: TypedObjectRef { inner: 0x1358bc350, type: GstVP8Enc } }
0:00:00.839146000 52084 0x13683e890 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:2265:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<session-pipeline-unique> Recalculating latency
0:00:00.840346000 52084 0x1361f3860 LOG webrtcsink net/webrtc/src/webrtcsink/imp.rs:2125:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<livekitwebrtcsink0> Ice connection state in session unique (peer unique) changed: Checking
0:00:00.840357000 52084 0x1361f3860 LOG webrtcsink net/webrtc/src/webrtcsink/imp.rs:2091:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<livekitwebrtcsink0> Connection state in session unique (peer unique) changed: Connecting
0:00:00.849577000 52084 0x13683e890 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:2265:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<session-pipeline-unique> Recalculating latency
0:00:00.853598000 52084 0x13683e890 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:2265:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<session-pipeline-unique> Recalculating latency
0:00:00.983424000 52084 0x1361f3860 LOG webrtcsink net/webrtc/src/webrtcsink/imp.rs:2125:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<livekitwebrtcsink0> Ice connection state in session unique (peer unique) changed: Connected
0:00:00.983659000 52084 0x13683e890 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:2265:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<session-pipeline-unique> Recalculating latency
0:00:01.007956000 52084 0x1361f3860 LOG webrtcsink net/webrtc/src/webrtcsink/imp.rs:2091:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<livekitwebrtcsink0> Connection state in session unique (peer unique) changed: Connected
0:00:01.131851000 52084 0x13683e890 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:2265:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<session-pipeline-unique> Recalculating latency
0:00:01.131995000 52084 0x13683e890 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:2265:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<session-pipeline-unique> Recalculating latency
0:00:02.869330000 52084 0x1361f3860 LOG webrtcsink net/webrtc/src/webrtcsink/imp.rs:2162:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<livekitwebrtcsink0> Ice gathering state in session unique (peer unique) changed: Complete
0:00:02.919419000 52084 0x1361f3860 LOG webrtcsink net/webrtc/src/webrtcsink/imp.rs:2125:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<livekitwebrtcsink0> Ice connection state in session unique (peer unique) changed: Completed
^Chandling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
Waiting for EOS...
Got EOS from element "pipeline0".
EOS received - stopping pipeline...
Execution ended after 0:01:14.018880000
Setting pipeline to NULL ...
0:01:14.179480000 52084 0x13500d1e0 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:1417:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<livekitwebrtcsink0> unpreparing
0:01:14.179489000 52084 0x13500d1e0 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:854:gstrswebrtc::webrtcsink::imp::State::finalize_session: Ending session unique
0:01:14.179596000 52084 0x13500d1e0 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:1441:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<livekitwebrtcsink0> Waiting for codec discoveries to finish
0:01:14.179601000 52084 0x13500d1e0 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:1448:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<livekitwebrtcsink0> No codec discovery is running anymore
0:01:14.179605000 52084 0x13500d1e0 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:1459:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<livekitwebrtcsink0> Ending sessions
0:01:14.179623000 52084 0x13500d1e0 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:1463:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<livekitwebrtcsink0> All sessions have started finalizing
0:01:14.179625000 52084 0x13500d1e0 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:1466:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<livekitwebrtcsink0> Stopping signaller
0:01:14.193091000 52084 0x124f894c0 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:886:gstrswebrtc::webrtcsink::imp::State::finalize_session::{{closure}}: Session unique ended
0:01:14.198799000 52084 0x13500d1e0 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:1468:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<livekitwebrtcsink0> Stopped signaller
0:01:14.198805000 52084 0x13500d1e0 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:1479:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<livekitwebrtcsink0> All sessions are done finalizing
Freeing pipeline ...
Failure Case Logs
…/gst-plugins-rs on livekit-0.2 via 🐍 v3.9.6 via 🦀 v1.72.0 took 1m14s 11:45:26
$ GST_DEBUG=webrtcsink:6 GST_PLUGIN_PATH=$HOME/src/rust/gst-plugins-rs/target/release/ gst-launch-1.0 -e autovideosrc ! videoconvert ! video/x-raw ! queue ! livekitwebrtcsink video-caps='video/x-vp8' signaller::ws-url=wss://<project-id>.livekit.cloud signaller::api-key="<api-key>" signaller::secret-key="<secret-key>" signaller::room-name='<room-name>'
Setting pipeline to PAUSED ...
0:00:00.061074000 52342 0x15280d1e0 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:1402:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::prepare:<livekitwebrtcsink0> preparing
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.207893000 52342 0x15402c700 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:3035:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::sink_event:<livekitwebrtcsink0:video_0> Received caps event Caps { seqnum: Seqnum(68), running-time-offset: 0, structure: Some(GstEventCaps { caps: (GstCaps) video/x-raw, width=(int)1920, height=(int)1080, format=(string)UYVY, framerate=(fraction)30/1 }), caps: Caps(video/x-raw(memory:SystemMemory) { width: (gint) 1920, height: (gint) 1080, format: (gchararray) "UYVY", framerate: (GstFraction) 30/1 }) }
Redistribute latency...
0:00:00.410760000 52342 0x15273c490 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:2773:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<livekitwebrtcsink0> Running discovery pipeline for input caps video/x-raw, width=(int)1920, height=(int)1080, format=(string)UYVY, framerate=(fraction)30/1 and output caps ANY with codec Codec { name: "VP8", caps: Caps(video/x-vp8(memory:SystemMemory)), stream_type: StreamType(VIDEO), payload_type: Some(96), decoding_info: Some(DecodingInfo { has_decoder: true }), encoding_info: Some(EncodingInfo { encoder: ElementFactory { inner: TypedObjectRef { inner: 0x154041b30, type: GstElementFactory } }, payloader: ElementFactory { inner: TypedObjectRef { inner: 0x1528b0810, type: GstElementFactory } }, output_filter: None }) }
0:00:00.410769000 52342 0x15273c490 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:2779:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<livekitwebrtcsink0> Running discovery pipeline
0:00:00.421775000 52342 0x15273c490 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:3518:<gstrswebrtc::webrtcsink::imp::BaseWebRTCSink as glib::subclass::object::ObjectImpl>::signals::SIGNALS::{{closure}}::{{closure}}:<livekitwebrtcsink0> applying default configuration on encoder Element { inner: TypedObjectRef { inner: 0x1540f81e0, type: GstVP8Enc } }
0:00:00.431307000 52342 0x15273c490 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:2876:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}: Discovery pipeline got caps Caps(application/x-rtp(memory:SystemMemory) { media: (gchararray) "video", clock-rate: (gint) 90000, encoding-name: (gchararray) "VP8", payload: (gint) 96, ssrc: (guint) 2302272663, timestamp-offset: (guint) 986476869, seqnum-offset: (guint) 2635, a-framerate: (gchararray) "30", extmap-1: (gchararray) "http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01" })
0:00:00.431333000 52342 0x15273c490 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:2892:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::run_discovery_pipeline::{{closure}}:<livekitwebrtcsink0> Codec discovery pipeline for caps video/x-raw, width=(int)1920, height=(int)1080, format=(string)UYVY, framerate=(fraction)30/1 with codec Codec { name: "VP8", caps: Caps(video/x-vp8(memory:SystemMemory)), stream_type: StreamType(VIDEO), payload_type: Some(96), decoding_info: Some(DecodingInfo { has_decoder: true }), encoding_info: Some(EncodingInfo { encoder: ElementFactory { inner: TypedObjectRef { inner: 0x154041b30, type: GstElementFactory } }, payloader: ElementFactory { inner: TypedObjectRef { inner: 0x1528b0810, type: GstElementFactory } }, output_filter: None }) } succeeded: application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)VP8, payload=(int)96, extmap-1=(string)http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01;
0:00:00.582039000 52342 0x15273c490 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:1959:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session:<livekitwebrtcsink0> Adding session: unique for peer: unique
0:00:00.587942000 52342 0x15273c490 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:1357:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::request_webrtcbin_pad::{{closure}}:<livekitwebrtcsink0> Requesting WebRTC pad with caps application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)VP8, payload=(int)96, extmap-1=(string)http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01, ssrc=(uint)3869967529
0:00:00.588210000 52342 0x15273c490 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:1836:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::negotiate:<livekitwebrtcsink0> Negotiating for session unique
0:00:00.588215000 52342 0x15273c490 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:1859:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::negotiate: Creating offer for session unique
0:00:00.588403000 52342 0x15273c490 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:2265:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<session-pipeline-unique> Recalculating latency
0:00:00.588423000 52342 0x15273c490 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:2265:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<session-pipeline-unique> Recalculating latency
0:00:00.623328000 52342 0x15273c490 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:2265:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<session-pipeline-unique> Recalculating latency
0:00:00.624647000 52342 0x154108860 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:1862:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::negotiate::{{closure}}: Created offer for session unique
0:00:00.628268000 52342 0x154108860 LOG webrtcsink net/webrtc/src/webrtcsink/imp.rs:2162:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<livekitwebrtcsink0> Ice gathering state in session unique (peer unique) changed: Gathering
0:00:00.666294000 52342 0x154108860 WARN webrtcsink net/webrtc/src/webrtcsink/imp.rs:2039:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}::{{closure}}: rtprtxsend doesn't have a `stuffing-kbps` property, stuffing disabled
0:00:00.666570000 52342 0x154108860 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:2732:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::handle_sdp_answer::{{closure}}: received reply Ok(None)
0:00:00.666582000 52342 0x154108860 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:979:gstrswebrtc::webrtcsink::imp::Session::connect_input_stream:<livekitwebrtcsink0> Connecting input stream video_0 for consumer unique and media 0
0:00:00.666584000 52342 0x154108860 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:1000:gstrswebrtc::webrtcsink::imp::Session::connect_input_stream:<livekitwebrtcsink0> Picking codec from local offer
0:00:00.666604000 52342 0x15273c490 WARN webrtcsink net/webrtc/src/webrtcsink/imp.rs:2649:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::handle_ice: No consumer with ID unique
0:00:00.666613000 52342 0x15273c490 WARN webrtcsink net/webrtc/src/webrtcsink/imp.rs:2649:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::handle_ice: No consumer with ID unique
0:00:00.669372000 52342 0x154108860 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:3518:<gstrswebrtc::webrtcsink::imp::BaseWebRTCSink as glib::subclass::object::ObjectImpl>::signals::SIGNALS::{{closure}}::{{closure}}:<livekitwebrtcsink0> applying default configuration on encoder Element { inner: TypedObjectRef { inner: 0x142820170, type: GstVP8Enc } }
0:00:00.669442000 52342 0x15273c490 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:2265:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<session-pipeline-unique> Recalculating latency
0:00:00.682530000 52342 0x15273c490 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:2265:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<session-pipeline-unique> Recalculating latency
0:00:00.686488000 52342 0x15273c490 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:2265:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<session-pipeline-unique> Recalculating latency
0:00:02.703384000 52342 0x154108860 LOG webrtcsink net/webrtc/src/webrtcsink/imp.rs:2162:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<livekitwebrtcsink0> Ice gathering state in session unique (peer unique) changed: Complete
ERROR: from element /GstPipeline:pipeline0/GstLiveKitWebRTCSink:livekitwebrtcsink0: GStreamer encountered a general stream error.
Additional debug info:
net/webrtc/src/webrtcsink/imp.rs(1492): gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::connect_signaller::{{closure}}::{{closure}} (): /GstPipeline:pipeline0/GstLiveKitWebRTCSink:livekitwebrtcsink0:
Signalling error: Error: Server disconnected
Execution ended after 0:00:35.575249000
Setting pipeline to NULL ...
0:00:35.732706000 52342 0x15280d1e0 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:1417:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<livekitwebrtcsink0> unpreparing
0:00:35.732719000 52342 0x15280d1e0 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:854:gstrswebrtc::webrtcsink::imp::State::finalize_session: Ending session unique
0:00:35.732855000 52342 0x15280d1e0 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:1441:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<livekitwebrtcsink0> Waiting for codec discoveries to finish
0:00:35.732869000 52342 0x15280d1e0 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:1448:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<livekitwebrtcsink0> No codec discovery is running anymore
0:00:35.732875000 52342 0x15280d1e0 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:1459:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<livekitwebrtcsink0> Ending sessions
0:00:35.733189000 52342 0x15280d1e0 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:1463:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<livekitwebrtcsink0> All sessions have started finalizing
0:00:35.733195000 52342 0x15280d1e0 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:1466:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<livekitwebrtcsink0> Stopping signaller
0:00:35.733228000 52342 0x15280d1e0 INFO webrtcsink net/webrtc/src/webrtcsink/imp.rs:1468:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<livekitwebrtcsink0> Stopped signaller
0:00:35.746529000 52342 0x1538d7720 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:886:gstrswebrtc::webrtcsink::imp::State::finalize_session::{{closure}}: Session unique ended
0:00:35.746550000 52342 0x15280d1e0 DEBUG webrtcsink net/webrtc/src/webrtcsink/imp.rs:1479:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::unprepare:<livekitwebrtcsink0> All sessions are done finalizing
Freeing pipeline ...
Setup
- Operating System:: macOS 13.4.1
- Device: Compute
-
gst-plugins-rs Version: tested with 0.11, current
HEAD
, and branchlivekit-0.2
, all exhibited behavior - GStreamer Version: 1.22.5
- Command line: See first line of logs above
Steps to reproduce the bug
Other than the command above, I installed GStreamer via the project's published .dmg, then cloned the gst-plugin-rs
repo and built the various tested versions with cargo build --release -p gst-plugin-webrtc
, then pointed gstreamer to it via GST_PLUGIN_PATH=$HOME/src/rust/gst-plugins-rs/target/release/
when running pipelines.