[gst-devel] Mixing silence suppressed RTP into a continuous stream

Olivier Crête olivier.crete at collabora.co.uk
Fri Nov 26 17:03:07 CET 2010


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
olivier.crete at collabora.co.uk
Collabora Ltd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20101126/38bcad61/attachment.pgp>


More information about the gstreamer-devel mailing list