Gstreamer echo canceller udpsrc and udpsink

Nicolas Dufresne nicolas at ndufresne.ca
Thu Sep 14 18:08:58 UTC 2017


Le jeudi 14 septembre 2017 à 16:34 +0530, Shrikant Lahase a écrit :
> I am getting confused where to keep element "webrtcprobe" &
> "webrtcechoprobe" . i tried but not getting result.
> Can you please tell me exact location in my commands:
> 
> Recording & udpsinkcommand:
> "gst-launch-1.0 -v alsasrc ! audioresample ! audioconvert ! audio/x-
> raw, format=S16LE, layout=interleaved, rate=8000, channels=2 ! 
> udpsink host=192.168.1.139  port=5001"
> 
>  Receive & playback command:
> "gst-launch-1.0 -v --gst-debug-level=4  udpsrc port=5003 !  audio/x-
> raw, layout=interleaved, rate=8000, format=S16LE, channels=2 !
> audioconvert ! autoaudiosink" 

GStreamer AEC only works if the probe is in the same process and same
pipeline (sharing the same clock). Also, AEC rely on having proper
timestamp, which udpsrc alone won't give you. I suggest using RTP for
keeping track of time information. As mention in the other thread, a
corrected pipeline could be:

gst-launch-1.0 \
  alsasrc ! audioresample ! audioconvert ! audio/x-raw,rate=16000,channels=1 \
    ! webrtcdsp ! audioconvert ! rtpL16pay \
    ! udpsink host=127.0.0.1 port=5006 async=FALSE \
  udpsrc port=5006 caps="application/x-rtp,channels=1,clock-rate=16000" \
    ! rtpjitterbuffer latency=10 ! rtpL16depay ! audioconvert \
    ! webrtcechoprobe ! audioconvert ! audioresample ! alsasink

regards,
Nicolas

> 
> 
> Thanks,
> Shrikant
> 
> On Thu, Sep 14, 2017 at 4:28 PM, Shrikant Lahase <shrikant at neotechind
> ia.com> wrote:
> > Is GStreamer  1.12 version is necessary for echo cancellation?
> > 
> > On Thu, Sep 14, 2017 at 9:49 AM, Shrikant Lahase <shrikant at neotechi
> > ndia.com> wrote:
> > > Thanks for your reply.
> > > 
> > > For using "webrtcdsp" & "webrtcprobe" which plugin needs to
> > > install?
> > > There is one more option I read on google "webrtcechoprobe"  
> > > What is difference between  "webrtcprobe" & "webrtcechoprobe" 
> > > 
> > > What is attached signature.asc file?
> > > 
> > > 
> > > On Wed, Sep 13, 2017 at 11:27 PM, Nicolas Dufresne <nicolas at ndufr
> > > esne.ca> wrote:
> > > > Le mercredi 13 septembre 2017 à 22:36 +0530, Shrikant Lahase a
> > > > écrit :
> > > > > Hi
> > > > 
> > > > Welcome to the mailings list.
> > > > 
> > > > >
> > > > > I need to implement echo canceller in my audio application.
> > > > > I am sending audio alsasrc to remote mobile android app from
> > > > my hardware.
> > > > > The command is as follows:
> > > > >
> > > > > Sending and receive combined in single command:
> > > > >
> > > > > "gst-launch-1.0 -v alsasrc ! audioresample ! audioconvert !
> > > > audio/x-
> > > > > raw, format=S16LE, layout=interleaved, rate=8000, channels=2,
> > > > > endianness=4321, width=16, depth=16, signed=true ! udpsink
> > > > host=$1
> > > > > port=5001 & gst-launch-1.0 -v --gst-debug-level=4  udpsrc
> > > > port=5003 !
> > > > > audio/x-raw, layout=interleaved, rate=8000, format=S16LE,
> > > > channels=2,
> > > > > endianness=4321, width=16, depth=16, signed=true !
> > > > audioconvert !
> > > > > autoaudiosink"
> > > > >
> > > > 
> > > > This was very recently asked on the list,
> > > > 
> > > > http://gstreamer-devel.966125.n4.nabble.com/Webrtc-plugin-for-A
> > > > EC-support-td4684580.html
> > > > 
> > > > In this thread, I give a example pipeline for testing in
> > > > loopback the
> > > > AEC. Note that you are using 0.10 syntax in your pipeline.
> > > > 
> > > >   audio/x-raw, layout=interleaved, rate=8000, format=S16LE,
> > > > channels=2,endianness=4321, width=16, depth=16, signed=true
> > > > 
> > > > Is in fact:
> > > >   audio/x-
> > > > raw,layout=interleaved,rate=8000,format=S16LE,channels=2
> > > > 
> > > > depth,width,signed,endianess have no meaning in 1.0 and may
> > > > lead to
> > > > negotiation error. The in-gstreamer echo canceller works by
> > > > placing
> > > > webrtcprobe close to your load speaker playback element, and
> > > > placing
> > > > webrtcdsp filter close to your recording element.
> > > > 
> > > > Note that you'll always get better result due to timing
> > > > precision with
> > > > using AEC in Pulse Audio rather then in Gst.
> > > > 
> > > > >
> > > > > But right now I am doing push to talk to avoid echo and noise
> > > > on the hardware side.
> > > > >
> > > > > Please tell me how to implement AEC in GStreamer.....
> > > > >
> > > > >
> > > > > Thanks,
> > > > > Shrikant
> > > > > _______________________________________________
> > > > > gstreamer-devel mailing list
> > > > > gstreamer-devel at lists.freedesktop.org
> > > > > https://lists.freedesktop.org/mailman/listinfo/gstreamer-deve
> > > > l
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170914/8a7bdfc9/attachment.sig>


More information about the gstreamer-devel mailing list