<div dir="ltr"><div>You're welcome. On the volume element, yes it's a multiplier where 1 is 100% (no change), but the range is 0-10. Every half step is ~6 dB, so volume=0.5 will drop the level 6 dB and volume=0.25 will drop the level 12 dB. A volume=2 will increase the level 6 dB, and volume=4 will increase the level 12 dB. On audiotestsrc, I believe a volume of 1 will already be peak volume.</div><div><br></div><div>On the sample rate, I can't say for sure because I don't know you're application, but you probably aren't going to want a non-standard rate of 48010. There are a few standard sample rates you'll see all the time in audio files, including 48000, 44100, and 22050. Maybe you're referring to the size of the audio buffers that audiotestsrc produces; for that, you can set the samplesperbuffer property on audiotestsrc.</div><div><br></div><div>--Chris<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jan 17, 2021 at 9:31 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">Thanks so much Chris!<br>
<br>
Ok I think I misunderstood what capsetter actually does. But what you said<br>
makes sense.<br>
<br>
- I only use wavenc as a quick test, actually writing to a filesink FIFO<br>
<br>
- Resample, OK I think if I set the rate correctly at the src creation then<br>
I won't need to resample (usually set to 48010 to allow enough fifo data).<br>
<br>
-Volume: Seriously? So the "volume" property of audiotestsrc is 0-1 but an<br>
external volume is a multiplier? <br>
<br>
-decodebin: I used decodebin generically but may remove it for audiotestsrc,<br>
although think I need it for filesrc ! wavparse. And will still be<br>
implementing a raw filesrc fifo in the future.<br>
<br>
-Audioconvert: May have been trigger happy in the attempt to get the right<br>
audio out.<br>
<br>
Thanks again,<br>
Nick<br>
<br>
<br>
<br>
Chris Wine wrote<br>
> I think you just have too many extra restrictions in your pipeline that<br>
> are<br>
> preventing things from running. You probably shouldn't be using<br>
> capssetter,<br>
> because that will just coerce the caps to be what you want, but if the<br>
> underlying data isn't in that format, you'll end up with a corrupted<br>
> output. A couple other little observations:<br>
> <br>
> - The wavenc element only uses little endian audio (S16LE).<br>
> - You don't necessarily need to run audioresample if you're audio is<br>
> already in the correct rate (I added rate=48000 to audiotestsrc below)<br>
> - The volume element is a multiplier on the current volume level... 0.5<br>
> will cut the volume in half, while 2.0 is double the volume.<br>
> - You shouldn't use decodebin, because your audio caps are already<br>
> audio/x-raw, and there is nothing to decode... it's all uncompressed audio<br>
> data.<br>
> - Your original command line had a lot of extra audioconvert elements, but<br>
> it's ok to have those because they'll just be a pass-through if there was<br>
> nothing to convert.<br>
> <br>
> Here, I made some tweaks to your command line:<br>
> <br>
> 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>
> <br>
> --Chris<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>