<div dir="ltr"><div>I think you just have too many extra restrictions in your pipeline that are preventing things from running. You probably shouldn't be using capssetter, because that will just coerce the caps to be what you want, but if the underlying data isn't in that format, you'll end up with a corrupted output. A couple other little observations:</div><div><br></div><div>- The wavenc element only uses little endian audio (S16LE).</div><div>- You don't necessarily need to run audioresample if you're audio is already in the correct rate (I added rate=48000 to audiotestsrc below)</div><div>- The volume element is a multiplier on the current volume level... 0.5 will cut the volume in half, while 2.0 is double the volume.</div><div>- You shouldn't use decodebin, because your audio caps are already audio/x-raw, and there is nothing to decode... it's all uncompressed audio data.</div><div>- Your original command line had a lot of extra audioconvert elements, but it's ok to have those because they'll just be a pass-through if there was nothing to convert.<br></div><div><br></div><div>Here, I made some tweaks to your command line:</div><div><br></div><div>gst-launch-1.0 interleave name=i \<br>  audiotestsrc num-buffers=100 wave=0 freq=100 volume=0.4 ! \<br>    audio/x-raw,format=S16LE,channels=1,rate=48000 ! tee name=t1 \<br>  audiotestsrc num-buffers=100 wave=2 freq=100 volume=0.4 ! \<br>    audio/x-raw,format=S16LE,channels=1,rate=48000 ! tee name=t2 \<br>  t1. ! queue ! volume volume=1 ! i. \<br>  t2. ! queue ! volume volume=0.5 ! i. \<br>  t1. ! queue ! volume volume=0.8 ! i. \<br>  t2. ! queue ! volume volume=0.7 ! i. \<br>  i. ! audio/x-raw,format=S16LE,channels=4 \<br>    ! audioconvert ! wavenc ! filesink location=test.wav <br></div><div><br></div><div>--Chris<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 14, 2021 at 11:48 PM Nick_law <<a href="mailto:nicholas@umantec.net">nicholas@umantec.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Is it possible to update the volume of a tee src?<br>
<br>
for example <br>
<br>
gst-launch-1.0 interleave name=i <br>
audiotestsrc wave=0 freq=100 volume=0.4 ! decodebin ! audioconvert ! <br>
"audio/x-raw,format=S16BE,channels=1" ! tee name=t1 <br>
audiotestsrc wave=2 freq=100 volume=0.4 ! decodebin ! audioconvert ! <br>
"audio/x-raw,format=S16BE,channels=1" ! tee name=t2 <br>
t1. ! queue ! i.   //make volume 1 here<br>
t2. ! queue ! i.   //make volume 0.5 here<br>
t1. ! queue ! i.   //make volume 0.8 here<br>
t2. ! queue ! i.   //make volume 0.7 here<br>
i.src ! <br>
capssetter<br>
caps="audio/x-raw,format=S16BE,channels=4,channel-mask=(bitmask)0xf" <br>
! audioconvert ! audioresample ! wavenc ! filesink location=test.wav <br>
<br>
I tried <br>
<br>
gst-launch-1.0 interleave name=i <br>
audiotestsrc wave=0 freq=100 volume=0.4 ! decodebin ! audioconvert ! <br>
"audio/x-raw,format=S16BE,channels=1" ! tee name=t1 <br>
audiotestsrc wave=2 freq=100 volume=0.4 ! decodebin ! audioconvert ! <br>
"audio/x-raw,format=S16BE,channels=1" ! tee name=t2 <br>
t1. ! queue ! audioconvert ! volume volume=1 ! i.   //make volume 1 here<br>
t2. ! queue ! audioconvert ! volume volume=0.5 ! i.   //make volume 0.5 here<br>
t1. ! queue ! audioconvert ! volume volume=0.8 ! i.   //make volume 0.8 here<br>
t2. ! queue ! audioconvert ! volume volume=0.7 ! i.   //make volume 0.7 here<br>
i.src ! <br>
capssetter<br>
caps="audio/x-raw,format=S16BE,channels=4,channel-mask=(bitmask)0xf" <br>
! audioconvert ! audioresample ! wavenc ! filesink location=test.wav <br>
<br>
which runs but corrupts the audio, I think the audio convert is resetting<br>
the caps?<br>
<br>
Future use would be to give the new volume a name so that it can be updated<br>
dynamically with <br>
gst_parse_launch() and gst_bin_get_by_name()<br>
<br>
thanks in advance for the help.<br>
<br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div>