<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le dim. 17 janv. 2021 02 h 15, nivanov <<a href="mailto:2centnik@gmail.com">2centnik@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thank you! Buffer-time was definitely the key here. However, I had to set the<br>
buffer-time to 20ms (20000) before I could get semi-acceptable results. And<br>
it's still just a little bit too much - it catches a good chunk of the echo,<br>
but I can still hear some parts. The size of the parts shrink down as the<br>
delay goes down, but for some reason, if I set the buffer-time to something<br>
less than 20000, my stream stops recording altogether. It doesn't crash, but<br>
it does not record any sound whatsoever:<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">The buffer-time must at least be twice the latency-time for things to work.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
gst-launch-1.0 \<br>
rtpbin name=rtpbin latency=100 \<br>
udpsrc port=50000 caps="application/x-rtp, media=audio, encoding-name=OPUS,<br>
clock-rate=48000" ! rtpbin.recv_rtp_sink_0 \<br>
udpsrc port=50001 caps="application/x-rtcp" ! rtpbin.recv_rtcp_sink_0 \<br>
rtpbin. ! rtpopusdepay ! queue ! opusdec ! audioresample !<br>
audio/x-raw,format=S16LE,layout=interleaved,rate=16000,channels=1 !<br>
webrtcechoprobe ! alsasink \<br>
alsasrc device=plughw:0,0 buffer-time=20000 !<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Here you configure the alsasrc, I was particularly aiming at alsasink in my comment. I realise it wasn't clear.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
audio/x-raw,format=S16LE,layout=interleaved,rate=16000,channels=1 !<br>
webrtcdsp noise-suppression-level=high echo-suppression-level=high ! volume<br>
volume=10 ! volume volume=3 ! \<br>
queue ! opusenc ! rtpopuspay ! udpsink host=127.0.0.1 port=8005<br>
<br>
Note that I increased the echo-suppresion-level to high and also put the<br>
volume amplification after the DSP - this allowed me to have the speaker at<br>
the maximum volume while maintaining acceptable results. Do you know</blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Any modifications to the stream (volume, resampling format conversion) may distort the signal and reduce echo cancellation efficiency. So volume after is just the right and logical thing to do.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> why</blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
buffer-time cannot be set below 20000</blockquote></div></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> I also tried enabling delay-</blockquote></div></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">agnosticccccccc,<br>
but that made things a lot worse - I think I'm better off leaving that flag<br>
off. Thank you for your help so far!</blockquote></div></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<br>
--<br>
Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank" rel="noreferrer">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div></div></div>