How to configure webrtc echo cancellation in Windows 10?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to configure webrtc echo cancellation in Windows 10?

Maksim Danilov
Good afternoon. I'm trying to make echo cancellation in this pipeline:
gst-launch-1.0.exe rtpsession name=s udpsrc port=8078
caps="application/x-rtp, media=audio, clock-rate=8000, encoding-name=PCMU,
payload=0" ! s.recv_rtp_sink s.recv_rtp_src ! rtpjitterbuffer latency=100 !
rtppcmudepay ! mulawdec ! audioresample ! audioconvert ! audio/x-raw,
rate=48000, format=S16LE ! webrtcechoprobe ! audioconvert ! wasapisink
buffer-time=30000 wasapisrc ! audioresample ! audioconvert ! audio/x-raw,
rate=48000, format=S16LE ! webrtcdsp ! audioresample ! audioconvert !
mulawenc ! rtppcmupay ! s.send_rtp_sink s.send_rtp_src ! udpsink
host=10.8.0.218 port=30012
Everyting is good, but echo cancel is not working at all. I read multiple
mailing list, however can't make through.
Can someone help me? Do you how some research on how to configure latency
and buffer-time?



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to configure webrtc echo cancellation in Windows 10?

Nicolas Dufresne-5
Le lundi 22 mars 2021 à 04:21 -0500, Maksim Danilov a écrit :
> Good afternoon. I'm trying to make echo cancellation in this pipeline:
> gst-launch-1.0.exe rtpsession name=s udpsrc port=8078
> caps="application/x-rtp, media=audio, clock-rate=8000, encoding-name=PCMU,
> payload=0" ! s.recv_rtp_sink s.recv_rtp_src ! rtpjitterbuffer latency=100 !
> rtppcmudepay ! mulawdec ! audioresample ! audioconvert ! audio/x-raw,
> rate=48000, format=S16LE ! webrtcechoprobe ! audioconvert ! wasapisink

I'm not a windows expert, but perhaps you should set "low-latency" property on
both src/sink in order to ensure you have reliable latency,

> buffer-time=30000 wasapisrc ! audioresample ! audioconvert ! audio/x-raw,
> rate=48000, format=S16LE ! webrtcdsp ! audioresample ! audioconvert !

Assuming you capture/playback latency (ignoring network latency) is under 400ms,
you may want to give a try to delay-agnostic mode.

> mulawenc ! rtppcmupay ! s.send_rtp_sink s.send_rtp_src ! udpsink
> host=10.8.0.218 port=30012
> Everyting is good, but echo cancel is not working at all. I read multiple
> mailing list, however can't make through.
> Can someone help me? Do you how some research on how to configure latency
> and buffer-time?
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to configure webrtc echo cancellation in Windows 10?

Maksim Danilov
Thanks for the answer. I gave up on configuring AEC over rtp and came up with
simple example that look like:
wasapisrc ! audioconvert ! audio/x-raw, format=S16LE, rate=48000 !
audioconvert ! webrtcdsp ! webrtcechoprobe ! audioconvert ! wasapisink.
It gives no result (in linux everything work as expected).
I tried you suggestion with low-latency mode, however got messages with
'invalid latency add some queues to the pipeline'. Even if I add queue to
pipeline. I can't hear my self at all.
That pipeline gives the same result: wasapisrc low-latency=true ! <queue> !
wasapisink low-latency=true.
So I think the problem is in plugin. Probably it add some additional latency
in implementation, cause it doesn't act like real time.
I inspected the code of plugin and it looks like a very fast implementation
of api under Windows. Moreover it can't even capture specific caps of
src/sink and uses shared format F32LE (maybe it is resampling and converting
audio in core and we get some latency through).



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to configure webrtc echo cancellation in Windows 10?

Nicolas Dufresne-5
Le mercredi 24 mars 2021 à 01:49 -0500, Maksim Danilov a écrit :

> Thanks for the answer. I gave up on configuring AEC over rtp and came up with
> simple example that look like:
> wasapisrc ! audioconvert ! audio/x-raw, format=S16LE, rate=48000 !
> audioconvert ! webrtcdsp ! webrtcechoprobe ! audioconvert ! wasapisink.
> It gives no result (in linux everything work as expected).
> I tried you suggestion with low-latency mode, however got messages with
> 'invalid latency add some queues to the pipeline'. Even if I add queue to
> pipeline. I can't hear my self at all.
> That pipeline gives the same result: wasapisrc low-latency=true ! <queue> !
> wasapisink low-latency=true.
> So I think the problem is in plugin. Probably it add some additional latency
> in implementation, cause it doesn't act like real time.
> I inspected the code of plugin and it looks like a very fast implementation
> of api under Windows. Moreover it can't even capture specific caps of
> src/sink and uses shared format F32LE (maybe it is resampling and converting
> audio in core and we get some latency through).

I'm clueless at this point. Perhaps Nirbheek can help here ?

>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel