Update volume of individual tee

Nick_law nicholas at umantec.net
Mon Jan 18 05:31:19 UTC 2021


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/


More information about the gstreamer-devel mailing list