interleaving 4 channels of audio into vorbisenc or opusenc

Mar Gonzalez Franco margon at microsoft.com
Tue May 17 23:41:07 UTC 2016


Hi,
I'm trying to interleave 4 channels of audio into one audio file
I have managed to successfully save them into wav with wavenc

gst-launch-1.0 interleave name=i filesrc location=FourMICS_RR_long.wav ! decodebin ! audioconvert !  audio/x-raw,format=(string)F32LE  ! queue ! i.sink_0 filesrc location=FourMICS_CR_long.wav ! decodebin ! audioconvert !  audio/x-raw,format=(string)F32LE ! queue ! i.sink_1 filesrc location=FourMICS_CL_long.wav ! decodebin  ! audioconvert ! audio/x-raw,format=(string)F32LE  ! queue ! i.sink_2 filesrc location=FourMICS_LL_long.wav ! decodebin  ! audioconvert !  audio/x-raw,format=(string)F32LE ! queue ! i.sink_3 i.src ! queue ! audio/x-raw,rate=48000,channels=4,format=F32LE,layout=interleaved ! queue ! wavenc ! queue ! filesink location=out2.wav


but when I save it as vorbisenc oggmux
gst-launch-1.0 interleave name=i filesrc location=FourMICS_RR_long.wav ! decodebin ! audioconvert !  audio/x-raw,format=(string)F32LE  ! queue ! i.sink_0 filesrc location=FourMICS_CR_long.wav ! decodebin ! audioconvert !  audio/x-raw,format=(string)F32LE ! queue ! i.sink_1 filesrc location=FourMICS_CL_long.wav ! decodebin  ! audioconvert ! audio/x-raw,format=(string)F32LE  ! queue ! i.sink_2 filesrc location=FourMICS_LL_long.wav ! decodebin  ! audioconvert !  audio/x-raw,format=(string)F32LE ! queue ! i.sink_3 i.src ! queue ! audio/x-raw,rate=48000,channels=4,format=F32LE,layout=interleaved ! queue ! wavenc ! queue ! wavparse ! audioconvert  ! audio/x-raw,rate=48000,channels=4,format=F32LE,layout=interleaved !  vorbisenc !  oggmux ! filesink location=out2.ogg

the channels get completely messed up when I play the file, or look at it in audacity.

I have also tried using
channel-positions=GST_AUDIO_CHANNEL_POSITION_REAR_LEFT
channel-mask=(bitmask)0x4
for each channel like this>

gst-launch-1.0 interleave name=i filesrc location=FourMICS_RR_long.wav ! decodebin ! audioconvert !  audio/x-raw,format=(string)F32LE,channel-position=GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT,channel-mask=(bitmask)0x1   ! queue ! i. filesrc location=FourMICS_CR_long.wav ! decodebin ! audioconvert !  audio/x-raw,format=(string)F32LE,channels=(int)1,channel-position=GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,channel-mask=(bitmask)0x2  ! queue ! i. filesrc location=FourMICS_CL_long.wav ! decodebin  ! audioconvert ! audio/x-raw,format=(string)F32LE,channels=(int)1,channel-position=GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,channel-mask=(bitmask)0x3  ! queue ! i. filesrc location=FourMICS_LL_long.wav ! decodebin  ! audioconvert !  audio/x-raw,format=(string)F32LE,channels=(int)1,channel-position=GST_AUDIO_CHANNEL_POSITION_REAR_LEFT,channel-mask=(bitmask)0x4 ! queue ! i. i.src ! queue ! audio/x-raw,rate=48000,channels=4,format=F32LE,layout=interleaved ! queue ! wavenc ! queue ! wavparse ! audioconvert  ! audio/x-raw,rate=48000,channels=4,format=F32LE,layout=interleaved !  vorbisenc !  oggmux ! filesink location=out2.ogg

Same problem

Any suggestion as of how to solve this?
I am not restricted only to vorbis, in fact I have similar issues also with opusenc.

Thanks.

Mar


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160517/2b042785/attachment.html>


More information about the gstreamer-devel mailing list