mix two audio streams

Vivia Nikolaidou n.vivia at gmail.com
Mon Aug 14 12:47:50 UTC 2017


Hi,

Try with audiomixer start-time-selection=1 and see if that fixes your issue.

Otherwise, see if there are any buffers going into your sink:

gst-launch-1.0 -v udpsrc port=5001 ! [more stuff here] ! audiomixer
name=mix start-time-selection=1 ! fakesink silent=false

Compare with the timestamps of the buffers from the working pipeline.

On 14 August 2017 at 10:16, Farzan Shojaee <shojaee at partodadeh.com> wrote:
> Hi
> Yea, I have enabled the verbose mode and the negotiated caps seems to be ok, but nothing heard, these are the negotiated caps :
>
> Setting pipeline to PAUSED ...
> Pipeline is live and does not need PREROLL ...
> /GstPipeline:pipeline0/GstUDPSrc:udpsrc0.GstPad:src: caps = "application/x-rtp\,\ media\=\(string\)audio\,\ payload\=\(int\)0\,\ clock-rate\=\(int\)8000"
> /GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = "application/x-rtp\,\ media\=\(string\)audio\,\ payload\=\(int\)0\,\ clock-rate\=\(int\)8000"
> /GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = "application/x-rtp\,\ media\=\(string\)audio\,\ payload\=\(int\)0\,\ clock-rate\=\(int\)8000"
> /GstPipeline:pipeline0/GstRtpPcmuDepay:rtppcmudepay0.GstPad:src: caps = "audio/x-mulaw\,\ channels\=\(int\)1\,\ rate\=\(int\)8000"
> /GstPipeline:pipeline0/GstMuLawDec:mulawdec0.GstPad:sink: caps = "audio/x-mulaw\,\ channels\=\(int\)1\,\ rate\=\(int\)8000"
> /GstPipeline:pipeline0/GstRtpPcmuDepay:rtppcmudepay0.GstPad:sink: caps = "application/x-rtp\,\ media\=\(string\)audio\,\ payload\=\(int\)0\,\ clock-rate\=\(int\)8000"
> /GstPipeline:pipeline0/GstUDPSrc:udpsrc1.GstPad:src: caps = "application/x-rtp\,\ media\=\(string\)audio\,\ payload\=\(int\)0\,\ clock-rate\=\(int\)8000"
> Setting pipeline to PLAYING ...
> /GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = "application/x-rtp\,\ media\=\(string\)audio\,\ payload\=\(int\)0\,\ clock-rate\=\(int\)8000"
> /GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = "application/x-rtp\,\ media\=\(string\)audio\,\ payload\=\(int\)0\,\ clock-rate\=\(int\)8000"
> /GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = "application/x-rtp\,\ media\=\(string\)audio\,\ payload\=\(int\)0\,\ clock-rate\=\(int\)8000"
> New clock: GstSystemClock
> /GstPipeline:pipeline0/GstMuLawDec:mulawdec0.GstPad:src: caps = "audio/x-raw\,\ format\=\(string\)S16LE\,\ layout\=\(string\)interleaved\,\ rate\=\(int\)8000\,\ channels\=\(int\)1"
> /GstPipeline:pipeline0/GstAudioMixer:mix.GstAudioMixerPad:sink_0: caps = "audio/x-raw\,\ format\=\(string\)S16LE\,\ layout\=\(string\)interleaved\,\ rate\=\(int\)8000\,\ channels\=\(int\)1"
>
> I have checked the audiomixer as alone, by the following format :
> gst-launch-1.0 audiotestsrc freq=100 ! audiomixer name=mix ! audioconvert ! alsasink audiotestsrc freq=500 ! mix.
>
> Its ok and two mixed audio heard from headphone.
>
> And when try to receive one audio stream by using the following format, everything is ok so :
> gst-launch-1.0 -v udpsrc port=5001 caps="application/x-rtp" ! queue ! rtppcmudepay ! mulawdec ! audioconvert ! alsasink device=hw:0,0
>
> I really don't know how can I debug the issue and why it's not working, even I changed the command format to the following but still no audio heard :
>
> gst-launch-1.0 -v udpsrc port=5001 caps="application/x-rtp" ! queue ! rtppcmudepay ! mulawdec ! audiomixer name=mix ! alsasink device=hw:0,0 udpsrc port=5002 caps="application/x-rtp" ! queue ! rtppcmudepay ! mulawdec ! mix.
>
> Thanks for your response.
>
> -----Original Message-----
> From: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] On Behalf Of Baby Octopus
> Sent: Thursday, August 10, 2017 4:57 PM
> To: gstreamer-devel at lists.freedesktop.org
> Subject: Re: mix two audio streams
>
> Can you enable verbose mode (-v) and see what caps are negotiated?
> Also, check which device you are writing into when you use alsasink.
> Add 'level' element right before alsasink to see if the audio is actually silent or has valid samples(You need enable -m to see the message posted by
> level)
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/mix-two-audio-streams-tp4684132p4684144.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list