2016-05-17 62 views
0

我试图交织4个音频通道成一个音频文件交织4个音频通道进入vorbisenc或opusenc GStreamer的

我已经设法成功地将其保存为WAV与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 

但是当我将它保存为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 

渠道得到彻底搞砸了,当我播放的文件,或者看看它的勇气。

我也使用

channel-positions=GST_AUDIO_CHANNEL_POSITION_REAR_LEFT 

channel-mask=(bitmask)0x4 

对于这样每个通道试图>

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 

同样的问题

作为如何解决这个任何建议? 我不仅限于vorbis,事实上我也有与opusenc类似的问题。

谢谢。

Mar

回答

0

所以,我懂了工作,

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 

有两个问题 1.帽需要在48kHz的

设置为交错 2. vorbisenc比特率无法与4个通道裸