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 _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On Di, 2016-05-17 at 23:41 +0000, Mar Gonzalez Franco wrote:
> 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 > > [...] > 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. Can you check what the caps after interleave are, and also if audioconvert after interleave is doing channel remixing, and if so between which channel masks / numbers? -- Sebastian Dröge, Centricular Ltd · http://www.centricular.com _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel signature.asc (968 bytes) Download Attachment |
In reply to this post by Mar Gonzalez Franco
Thanks Sebastian,
I was able to solve this.
This is the working pipeline,
gst-launch-1.0 interleave name=i filesrc location=FourMICS_RR_long.wav ! decodebin ! audioconvert ! audioresample ! audio/x-raw,rate=24000,format=F32LE ! queue ! i.sink_0
filesrc location=FourMICS_CR_long.wav ! decodebin ! audioconvert ! audioresample ! audio/x-raw,channels=(int)1,rate=24000,format=F32LE ! queue ! i.sink_1
filesrc location=FourMICS_CL_long.wav ! decodebin ! audioconvert ! audioresample ! audio/x-raw,channels=(int)1,rate=24000,format=F32LE ! queue ! i.sink_2
filesrc location=FourMICS_LL_long.wav ! decodebin ! audioconvert ! audioresample ! audio/x-raw,channels=(int)1,rate=24000,format=F32LE ! queue ! i.sink_3
i.src ! capssetter caps=audio/x-raw,channels=4,channel-mask=(bitmask)0x33 ! audioconvert ! audioresample ! vorbisenc ! oggmux ! filesink location=out2.ogg
There were two issues
1. the caps need to be set specifically to the interleave
2. vorbisenc bitrate could not bare with 4 channels at 48khz
Message: 6
Date: Wed, 18 May 2016 15:45:42 +0300 From: Sebastian Dröge <[hidden email]> To: Discussion of the development of and with GStreamer <[hidden email]> Subject: Re: interleaving 4 channels of audio into vorbisenc or opusenc Message-ID: <[hidden email]> Content-Type: text/plain; charset="utf-8" On Di, 2016-05-17 at 23:41 +0000, Mar Gonzalez Franco wrote: > 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 > > [...] > 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. (channel-position is not a valid caps field and will just be ignored) Can you check what the caps after interleave are, and also if audioconvert after interleave is doing channel remixing, and if so between which channel masks / numbers? -- Sebastian Dröge, Centricular Ltd · _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |