WebRTCbin offer & OPUS options: minptime, useinbandfec

Tom Gilbert twcgilbert at gmail.com
Wed Apr 7 09:53:14 UTC 2021


How can I make sure the following options are added to the client offer SDP
generated by GStreamer webrtcbin (Android), please?

minptime=10;useinbandfec=1


Background:
===========
Pipeline generated for receive only case by parsing:
#define RECV_PIPELINE "webrtcbin name=recv bundle-policy=max-bundle
recv.src_0 ! queue ! rtpjitterbuffer do-lost=TRUE ! rtpopusdepay ! opusdec
use-inband-fec=TRUE plc=TRUE ! audioconvert ! audioresample ! volume
name=vol ! level message=TRUE ! openslessink stream-type=voice"

then adding a transceiver:
    GstCaps  *caps =
gst_caps_from_string("application/x-rtp,media=audio,encoding-name=OPUS,payload=111,clock-rate=48000");
    GstPromise *promise = gst_promise_new();
    g_signal_emit_by_name(webrtcbin, "add-transceiver",
            GST_WEBRTC_RTP_TRANSCEIVER_DIRECTION_RECVONLY, caps, promise);
    gst_promise_interrupt(promise);
    gst_promise_unref(promise);
    gst_caps_unref(caps);

Generates offer SDP:
    v=0
    o=- 574272700240657154 0 IN IP4 0.0.0.0
    s=-
    t=0 0
    a=ice-options:trickle
    a=group:BUNDLE audio0
    m=audio 9 UDP/TLS/RTP/SAVPF 111
    c=IN IP4 0.0.0.0
    a=setup:actpass
    a=ice-ufrag:blah
    a=ice-pwd:blah
    a=rtcp-mux
    a=rtcp-rsize
    a=recvonly
    a=rtpmap:111 OPUS/48000
    a=rtcp-fb:111 nack pli
    a=mid:audio0
    a=fingerprint:sha-256 blah

 When libwebrtc is used instead, the SDP includes:
    a=rtcp-fb:111 transport-cc
    a=fmtp:111 minptime=10;useinbandfec=1

I'm trying to optimise behaviour seen under lossy conditions; at the moment
my webrtcbin version seems to be suffering from more noticeable
interruptions than libwebrtc & has some additional latency. The OPUS
options seem like they might be a contributing factor...?

I see plenty of log lines like this:
 gst_audio_base_sink_get_alignment:<openslessink0> Unexpected discontinuity
in audio timestamps of -0:00:00.226541666, resyncing

Apologies: more than one question in here!

thanks very much for any insight
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210407/21f06c19/attachment.htm>


More information about the gstreamer-devel mailing list