Gstreamer audio mixer issue

Guillaume Cartier gucartier at gmail.com
Tue Jan 5 14:37:25 UTC 2021


Hi dananjaya, we are also using GStreamer for a project that involves
mixing multiple live sources together.

For us, the audiomixer would very often generate what we called "gritches"
that upon looking at the output in Audacity were revealed to be small
silence gaps in the output. Reading the source code and playing with it has
led to the gst_aggregator_pad_has_space function that has a test that I
believe is incorrect (in all humbleness being fairly new to GStreamer) :

if (self->priv->latency == 0)
  return FALSE;

I think this test should only apply in the non-live case, but in any case
the good news is that by setting latency to any value in our audiomixer
element (even 1), this has solved most of our problems.

PS: You could also replace audiomixer with liveadder which is a subclass of
audiomixer that by default sets latency to 30ms.

On Tue, Jan 5, 2021 at 6:51 AM dananjaya <pulzappcheck890 at gmail.com> wrote:

> Hi,
> I am trying the below pipeline to capture 2 1080p usb video streams while
> previewing, with 2 usb audio sources mixed together.
>
> The issue is, the audio mixed and captured is containing lots of artifacts
> such as click sounds. How can I resolve this issue.
>
> gst-launch-1.0 -e mp4mux name=mux ! filesink location=feed1mp1080HS.mp4
> v4l2src device=/dev/video1 ! tee name=t1 t1. ! queue ! video/x-raw,
> width=1920, height=1080, framerate=30/1 ! nvvidconv ! queue ! nvv4l2h264enc
> maxperf-enable=1 bitrate=4000000 profile=4 ! queue ! h264parse ! queue !
> mux.video_0 audiomixer name=mixer ! audioconvert ! voaacenc ! aacparse !
> mux.audio_0 pulsesrc
> device="alsa_input.usb-VXIS_Inc_ezcap_U3_capture-02.analog-stereo" ! queue
> !
> audio/x-raw,width=16,depth=16,rate=44100,channel=1 ! queue ! mixer.sink_0
> pulsesrc
>
> device="alsa_input.usb-C-Media_Electronics_Inc._USB_Advanced_Audio_Device-00.analog-stereo"
> ! queue ! audio/x-raw,width=16,depth=16,rate=44100,channel=1 ! queue !
> mixer.sink_1 t1. ! queue ! video/x-raw, width=1920, height=1080,
> framerate=30/1 !  nvvidconv ! queue !
> "video/x-raw(memory:NVMM),width=959,height=540,framerate=30/1,format=NV12"
> !
> queue ! nvoverlaysink overlay-x=0 overlay-y=270 overlay-w=959 overlay-h=540
> overlay=1 v4l2src device=/dev/video2 ! tee name=t2 t2. ! queue !
> video/x-raw, width=1920, height=1080, framerate=30/1 ! nvvidconv ! queue !
> nvv4l2h264enc maxperf-enable=1 bitrate=4000000 profile=4 ! queue !
> h264parse
> ! queue ! mp4mux ! filesink location=feed2mp1080HS.mp4 t2. ! queue !
> video/x-raw, width=1920, height=1080, framerate=30/1 ! nvvidconv ! queue !
> "video/x-raw(memory:NVMM),width=960,height=540,framerate=30/1,format=NV12"
> !
> queue ! nvoverlaysink overlay-x=960 overlay-y=270 overlay-w=960
> overlay-h=540 overlay=2
>
> Thanks in advance
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20210105/6f97a073/attachment.htm>


More information about the gstreamer-devel mailing list