I have a GStreamer pipeline that receives an udp/rtp stream and outputs it to four soundcard channels, e.g. alsasinks:
gst-launch-1.0 udpsrc name=m_udpsrc multicast-group=239.255.255.245 auto-multicast=true port=5551 timeout=30000000000 caps="application/x-rtp, media=(string)audio, clock-rate=(int)8000, encoding-name=(string)G722, payload=(int)9" ! rtpg722depay name=m_depay ! avdec_g722 name=m_dec ! audioconvert ! tee name=m_t m_t. ! queue name=m_queue_1 ! volume volume=0.66 name=m_volume_ch1 ! alsasink name=ch1 device=card1_out0 sync=false async=true m_t. ! queue name=m_queue_2 ! volume volume=0.66 name=m_volume_ch2 ! alsasink name=ch2 device=card1_out1 sync=false async=true m_t. ! queue name=m_queue_3 ! volume volume=0.66 name=m_volume_ch3 ! alsasink name=ch3 device=card2_out0 sync=false async=true m_t. ! queue name=m_queue_4 ! volume volume=0.66 name=m_volume_ch4 ! alsasink name=ch4 device=card2_out1 sync=false async=true
Is there a plugin with which I can dynamically enable/disable or mute/unmute one of the four channels (alsasinks) individually?
Since i have four alssinks the possible amount of gstreamer pipeline combinations is 1..16. But its very inefficient and time consuming to always teardown and setup a new pipeline once i have to switch channels or to another combination of channels.
Based on @florian-zwoch comments, using the volume
plugin with the mute
property does the job.