Update volume of individual tee

Nick_law nicholas at umantec.net
Fri Jan 15 07:48:51 UTC 2021


Is it possible to update the volume of a tee src?

for example 

gst-launch-1.0 interleave name=i 
audiotestsrc wave=0 freq=100 volume=0.4 ! decodebin ! audioconvert ! 
"audio/x-raw,format=S16BE,channels=1" ! tee name=t1 
audiotestsrc wave=2 freq=100 volume=0.4 ! decodebin ! audioconvert ! 
"audio/x-raw,format=S16BE,channels=1" ! tee name=t2 
t1. ! queue ! i.   //make volume 1 here
t2. ! queue ! i.   //make volume 0.5 here
t1. ! queue ! i.   //make volume 0.8 here
t2. ! queue ! i.   //make volume 0.7 here
i.src ! 
capssetter
caps="audio/x-raw,format=S16BE,channels=4,channel-mask=(bitmask)0xf" 
! audioconvert ! audioresample ! wavenc ! filesink location=test.wav 

I tried 

gst-launch-1.0 interleave name=i 
audiotestsrc wave=0 freq=100 volume=0.4 ! decodebin ! audioconvert ! 
"audio/x-raw,format=S16BE,channels=1" ! tee name=t1 
audiotestsrc wave=2 freq=100 volume=0.4 ! decodebin ! audioconvert ! 
"audio/x-raw,format=S16BE,channels=1" ! tee name=t2 
t1. ! queue ! audioconvert ! volume volume=1 ! i.   //make volume 1 here
t2. ! queue ! audioconvert ! volume volume=0.5 ! i.   //make volume 0.5 here
t1. ! queue ! audioconvert ! volume volume=0.8 ! i.   //make volume 0.8 here
t2. ! queue ! audioconvert ! volume volume=0.7 ! i.   //make volume 0.7 here
i.src ! 
capssetter
caps="audio/x-raw,format=S16BE,channels=4,channel-mask=(bitmask)0xf" 
! audioconvert ! audioresample ! wavenc ! filesink location=test.wav 

which runs but corrupts the audio, I think the audio convert is resetting
the caps?

Future use would be to give the new volume a name so that it can be updated
dynamically with 
gst_parse_launch() and gst_bin_get_by_name()

thanks in advance for the help.





--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list