webrtcdsp and webrtcechoprobe on Windows
Nicolas Dufresne
nicolas at ndufresne.ca
Thu Jun 18 13:02:14 UTC 2020
Le mer. 17 juin 2020 16 h 30, Attila <kocsisa01 at gmail.com> a écrit :
> Hi,
>
> I've been trying to create a pipeline for a voice chat application and
> would
> like to include echo cancellation.
>
> Since the example local loop pipeline does not work on Windows 10 (at least
> not on the computers I tried), I came up with this:
>
> wasapisrc low-latency=true ! queue max-size-time=400000000 ! audioconvert !
> audio/x-raw, format=S16LE ! webrtcdsp ! webrtcechoprobe ! audioconvert !
> wasapisink
>
> This seems to work but it is very fragile. Depending on the PC, I have to
> vary to queue size otherwise it will either not do any cancellation or if
> the queue is too small, it will not produce any sound at all. What can I do
>
The queue in this example should not be strictly needed, since you control
the source buffer-time. Be aware that while webrtcdsp performs with up to
400ms delay, it won't perform consistently in these conditions. The default
playback buffer-time in GStreamer is 200ms on the sink, you should reduce
that to 2-3 time the latency-time.
Another detail that helps letting webrtcdsp perform better is to avoid
adding elements between your source and the DSP element. The queue in this
case likely adds jitter and lower the speed of sync convergence. That's
also why real-time integration inside system audio daemon always performs
better. Though, after some tweaks, I did managed to get results as
consistent as chrome and Firefox.
to fix that (I know that this is a test loop only, but I'm hoping that
> understanding the problem here will help me with my actual problem).
>
> For my actual pipeline, I have not been able to make echo-cancellation work
> at all - the sound goes through and I get a very strong echo that does not
> die down at all.
>
> wasapisrc low-latency=true ! queue max-size-time=400000000 ! audioconvert
> ! audio/x-raw, format=S16LE !
The DSP performs better in float, if that is an option on your platform.
webrtcdsp^
> ! opusenc audio-type=2048 bitrate=24000 inband-fec=true
> packet-loss-percentage=5 ! rtpopuspay ^
> ! udpsink host=$FARENDIP port=7480 async=FALSE ^
> udpsrc port=7480 caps="application/x-rtp, ssrc=(uint)1537893241,
> payload=(int)96, channels=1, clock-rate=48000" ^
> ! rtpjitterbuffer latency=10 ! rtpopusdepay ! opusdec plc=true
> use-inband-fec=true ! webrtcechoprobe ^
> ! audioconvert ! autoaudiosink
>
> Any ideas/help would be appreciated.
>
I think replacing the autoaudiosink with wasapi and appropriate real-time
configuration should help, I haven't tested much on Windows, as all my work
happens on Linux.
> Regards,
> Attila
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200618/0f287717/attachment.htm>
More information about the gstreamer-devel
mailing list