Mixing silence suppressed RTP into a continuous stream

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

Mixing silence suppressed RTP into a continuous stream

Joakim Koskela
Hi,

I'm having problems mixing an RTP stream with something else (testing with an
mp3 file), as the RTP does silence suppression (sending packets only when
noise is actually made). It seems that mixing is done only when *all* sound
sources have data to contribute, leading to a chunky output.

What I would like to have is a continuous output stream into which sound is
mixed from different sources as it becomes available. Seems like a really
basic thing, but I somehow couldn't find anything using the search terms I
thought relevant.

Any help is appreciated, even just tips on what to look at more closely (the
adder or the sources) or keywords to search for. The pipeline i'm using is:

filesrc location=file.mp3 ! decodebin ! audioconvert  ! audioresample !
audio/x-raw-int,channels=1,rate=8000 ! adder name=mixer \
udpsrc port=%s caps="application/x-rtp,media=(string)audio,clock-
rate=(int)8000,encoding-name=(string)PCMA" ! gstrtpbin ! rtppcmadepay !
alawdec ! audioconvert ! audioresample ! audio/x-raw-int,channels=1,rate=8000
! mixer. \
mixer. ! audioconvert  ! audioresample ! audio/x-raw-int,channels=1,rate=8000
! alawenc ! rtppcmapay ! udpsink host=127.0.0.1 port=8000

br, j

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Mixing silence suppressed RTP into a continuous stream

Marco Ballesio
Hi,

On Fri, Nov 26, 2010 at 1:45 PM, Joakim Koskela <[hidden email]> wrote:
> Hi,
>
> I'm having problems mixing an RTP stream with something else (testing with an
> mp3 file), as the RTP does silence suppression (sending packets only when
> noise is actually made). It seems that mixing is done only when *all* sound
> sources have data to contribute, leading to a chunky output.

it's possible as you don't have any CNG elements in your pipeline.
I've been hacking for a while on it but, unfortunately, there's
nothing really presentable so far. Shame on me :( .

>
> What I would like to have is a continuous output stream into which sound is
> mixed from different sources as it becomes available. Seems like a really
> basic thing, but I somehow couldn't find anything using the search terms I
> thought relevant.

Actually, there's no support for comfort noise in GStreamer. You may
find something in Farsight, but when I last checked it there was
nothing really working. Since I've not tried again for a while maybe
the thing has evolved in the meanwhile.

>
> Any help is appreciated, even just tips on what to look at more closely (the
> adder or the sources) or keywords to search for.

I'm loosely working on the CNG element which may help you with this.
Maybe it'll be possible to completely prototype it during winter
vacations.

Regards

> The pipeline i'm using is:
>
> filesrc location=file.mp3 ! decodebin ! audioconvert  ! audioresample !
> audio/x-raw-int,channels=1,rate=8000 ! adder name=mixer \
> udpsrc port=%s caps="application/x-rtp,media=(string)audio,clock-
> rate=(int)8000,encoding-name=(string)PCMA" ! gstrtpbin ! rtppcmadepay !
> alawdec ! audioconvert ! audioresample ! audio/x-raw-int,channels=1,rate=8000
> ! mixer. \
> mixer. ! audioconvert  ! audioresample ! audio/x-raw-int,channels=1,rate=8000
> ! alawenc ! rtppcmapay ! udpsink host=127.0.0.1 port=8000
>
> br, j
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Mixing silence suppressed RTP into a continuous stream

Olivier Crête-2
In reply to this post by Joakim Koskela
On Fri, 2010-11-26 at 13:45 +0200, Joakim Koskela wrote:
> I'm having problems mixing an RTP stream with something else (testing with an
> mp3 file), as the RTP does silence suppression (sending packets only when
> noise is actually made). It seems that mixing is done only when *all* sound
> sources have data to contribute, leading to a chunky output.
...
> filesrc location=file.mp3 ! decodebin ! audioconvert  ! audioresample !
> audio/x-raw-int,channels=1,rate=8000 ! adder name=mixer \
> udpsrc port=%s caps="application/x-rtp,media=(string)audio,clock-
> rate=(int)8000,encoding-name=(string)PCMA" ! gstrtpbin ! rtppcmadepay !
> alawdec ! audioconvert ! audioresample ! audio/x-raw-int,channels=1,rate=8000
> ! mixer. \
> mixer. ! audioconvert  ! audioresample ! audio/x-raw-int,channels=1,rate=8000
> ! alawenc ! rtppcmapay ! udpsink host=127.0.0.1 port=8000

Replace "adder" with "liveadder" which was written to deal with
discontinuous streams. Be aware that liveadder adds some (configurable)
latency to your pipeline.

--
Olivier Crête
[hidden email]
Collabora Ltd

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

signature.asc (205 bytes) Download Attachment