Update volume of individual tee

Chris Wine chriswine at gmail.com
Mon Jan 18 07:17:19 UTC 2021


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.

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.

--Chris

On Sun, Jan 17, 2021 at 9:31 PM Nick_law <nicholas at umantec.net> wrote:

> Thanks so much Chris!
>
> Ok I think I misunderstood what capsetter actually does. But what you said
> makes sense.
>
> - I only use wavenc as a quick test, actually writing to a filesink FIFO
>
> - Resample, OK I think if I set the rate correctly at the src creation then
> I won't need to resample (usually set to 48010 to allow enough fifo data).
>
> -Volume: Seriously? So the "volume" property of audiotestsrc is 0-1 but an
> external volume is a multiplier?
>
> -decodebin: I used decodebin generically but may remove it for
> audiotestsrc,
> although think I need it for filesrc ! wavparse. And will still be
> implementing a raw filesrc fifo in the future.
>
> -Audioconvert: May have been trigger happy in the attempt to get the right
> audio out.
>
> Thanks again,
> Nick
>
>
>
> Chris Wine wrote
> > 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:
> >
> > - The wavenc element only uses little endian audio (S16LE).
> > - 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)
> > - 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.
> > - 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.
> > - 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.
> >
> > Here, I made some tweaks to your command line:
> >
> > gst-launch-1.0 interleave name=i \
> >   audiotestsrc num-buffers=100 wave=0 freq=100 volume=0.4 ! \
> >     audio/x-raw,format=S16LE,channels=1,rate=48000 ! tee name=t1 \
> >   audiotestsrc num-buffers=100 wave=2 freq=100 volume=0.4 ! \
> >     audio/x-raw,format=S16LE,channels=1,rate=48000 ! tee name=t2 \
> >   t1. ! queue ! volume volume=1 ! i. \
> >   t2. ! queue ! volume volume=0.5 ! i. \
> >   t1. ! queue ! volume volume=0.8 ! i. \
> >   t2. ! queue ! volume volume=0.7 ! i. \
> >   i. ! audio/x-raw,format=S16LE,channels=4 \
> >     ! audioconvert ! wavenc ! filesink location=test.wav
> >
> > --Chris
>
>
>
>
>
> --
> 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/20210117/7fc4068f/attachment-0001.htm>


More information about the gstreamer-devel mailing list