Changing volume of raw audio corrupts data

Nick_law nicholas at umantec.net
Thu Jan 21 09:42:20 UTC 2021


Hi all,

I am trying to use rawaudioparse to deinterleave 2ch raw audio and
interleave the first channel of the raw audio with 1ch of audiotstsrc.

I generate a raw audio file with:

gst-launch-1.0 interleave name=i \
audiotestsrc wave=2 freq=440 volume=0.5 name=Channel_config0  ! \
audioconvert ! audio/x-raw,format=S32BE ! queue ! i.sink_0 \
audiotestsrc wave=0 freq=100 volume=0.5 name=Channel_config1  ! \
audioconvert ! audio/x-raw,format=S32BE ! queue ! i.sink_1 \
i.src ! filesink location=rawsrc

When I only deinterleave the raw audio and interleave with audiotstsrc
without updating volumes it seems to work. 

gst-launch-1.0 interleave name=i filesrc location=rawsrc ! \
rawaudioparse sample-rate=48000 num-channels=2 format=pcm pcm-format=s32be !
\
deinterleave name=d0 d0.src_0 ! queue ! tee name=t1 \
audiotestsrc wave=0 freq=100 volume=0.5 ! tee name=t2 \
t1. ! queue ! i. \
t2. ! queue ! i. \
i. ! audio/x-raw,format=S32BE,channels=2 \
! filesink location=sink2

I can then view the audio in audacity by importing raw -> signed 32-bit pcm,
Big endian, 2 channels.

But as soon as I try update the volumes of the tees:

gst-launch-1.0 interleave name=i filesrc location=rawsrc ! \
rawaudioparse sample-rate=48000 num-channels=2 format=pcm pcm-format=s32be !
\
deinterleave name=d0 d0.src_0 ! queue ! tee name=t1 \
audiotestsrc wave=0 freq=100 volume=0.5 ! tee name=t2 \
t1. ! queue ! volume volume=2 ! i. \
t2. ! queue ! volume volume=2 ! i. \
i. ! audio/x-raw,format=S32BE,channels=2 \
! filesink location=sink2

I get:  
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0:
Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop ():
/GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0:
streaming stopped, reason not-negotiated (-4)

Any help would be greatly appreaciated.
Nick




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


More information about the gstreamer-devel mailing list