gpt4 book ai didi

audio - gstreamer 多 channel 大于 8 个 channel

转载 作者:行者123 更新时间:2023-12-03 01:18:52 25 4
gpt4 key购买 nike

下午好,到目前为止,我一直在使用 gstreamer 流式传输 8 channel 音频,没有任何问题。
我大胆地生成 8 个单声道并导出一个 wav 文件。

最近有人要求我支持 16 个 channel ,但我惊讶地发现不支持 16 个 channel (或 8 个以上的 channel )。用于流式传输使用的 wav 文件的命令行 gstreamer 命令如下所示:

GST_DEBUG=3 gst-launch-1.0 filesrc location=~/Desktop/8ch_16_test_diagwav.wav ! decodebin ! audioconvert ! audioresample ! audioconvert ! audio/x-raw,format=S16BE,rate=48000,channels=16 ! filesink location=/tmp/filesink0

使用 16 channel 文件运行时出现以下错误:
Setting pipeline to PAUSED ...
0:00:00.041995106 3534 0x55b0024a4e10 WARN basesrc gstbasesrc.c:3583:gst_base_src_start_complete:<filesrc0> pad not activated yet
Pipeline is PREROLLING ...
0:00:00.046842761 3534 0x7f833806ec00 FIXME default gstutils.c:3981:gst_pad_create_stream_id_internal:<wavparse0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.091236225 3534 0x7f833806ec00 WARN audio-resampler audio-resampler.c:274:convert_taps_gint16_c: can't find exact taps
0:00:00.091319797 3534 0x7f833806ec00 WARN audioconvert gstaudioconvert.c:654:gst_audio_convert_fixate_channels:<audioconvert1> invalid or unexpected channel-positions
0:00:00.091329274 3534 0x7f833806ec00 ERROR audioconvert gstaudioconvert.c:668:gst_audio_convert_fixate_channels:<audioconvert1> Have no default layout for 16 channels
0:00:00.091339971 3534 0x7f833806ec00 ERROR audio-info audio-info.c:304:gst_audio_info_from_caps: no channel-mask property given
0:00:00.091344101 3534 0x7f833806ec00 ERROR audioconvert gstaudioconvert.c:778:gst_audio_convert_set_caps:<audioconvert1> invalid output caps
0:00:00.091356433 3534 0x7f833806ec00 WARN basetransform gstbasetransform.c:1362:gst_base_transform_setcaps:<audioconvert1> FAILED to configure incaps audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)8, channel-mask=(bitmask)0x0000000000000c3f, rate=(int)48000 and outcaps audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(string)S16BE, channels=(int)16
0:00:00.091398546 3534 0x7f833806ec00 WARN audioconvert gstaudioconvert.c:654:gst_audio_convert_fixate_channels:<audioconvert1> invalid or unexpected channel-positions
0:00:00.091404430 3534 0x7f833806ec00 ERROR audioconvert gstaudioconvert.c:668:gst_audio_convert_fixate_channels:<audioconvert1> Have no default layout for 16 channels
0:00:00.091411526 3534 0x7f833806ec00 ERROR audio-info audio-info.c:304:gst_audio_info_from_caps: no channel-mask property given
0:00:00.091415084 3534 0x7f833806ec00 ERROR audioconvert gstaudioconvert.c:778:gst_audio_convert_set_caps:<audioconvert1> invalid output caps
0:00:00.091423006 3534 0x7f833806ec00 WARN basetransform gstbasetransform.c:1362:gst_base_transform_setcaps:<audioconvert1> FAILED to configure incaps audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)8, channel-mask=(bitmask)0x0000000000000c3f, rate=(int)48000 and outcaps audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(string)S16BE, channels=(int)16
0:00:00.091461862 3534 0x7f833806ec00 WARN audioconvert gstaudioconvert.c:654:gst_audio_convert_fixate_channels:<audioconvert1> invalid or unexpected channel-positions
0:00:00.091467389 3534 0x7f833806ec00 ERROR audioconvert gstaudioconvert.c:668:gst_audio_convert_fixate_channels:<audioconvert1> Have no default layout for 16 channels
0:00:00.091473940 3534 0x7f833806ec00 ERROR audio-info audio-info.c:304:gst_audio_info_from_caps: no channel-mask property given
0:00:00.091477330 3534 0x7f833806ec00 ERROR audioconvert gstaudioconvert.c:778:gst_audio_convert_set_caps:<audioconvert1> invalid output caps
0:00:00.091484711 3534 0x7f833806ec00 WARN basetransform gstbasetransform.c:1362:gst_base_transform_setcaps:<audioconvert1> FAILED to configure incaps audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)8, channel-mask=(bitmask)0x0000000000000c3f, rate=(int)48000 and outcaps audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(string)S16BE, channels=(int)16
0:00:00.091521324 3534 0x7f833806ec00 WARN audioconvert gstaudioconvert.c:654:gst_audio_convert_fixate_channels:<audioconvert1> invalid or unexpected channel-positions
0:00:00.091526722 3534 0x7f833806ec00 ERROR audioconvert gstaudioconvert.c:668:gst_audio_convert_fixate_channels:<audioconvert1> Have no default layout for 16 channels
0:00:00.091533191 3534 0x7f833806ec00 ERROR audio-info audio-info.c:304:gst_audio_info_from_caps: no channel-mask property given
0:00:00.091536562 3534 0x7f833806ec00 ERROR audioconvert gstaudioconvert.c:778:gst_audio_convert_set_caps:<audioconvert1> invalid output caps
0:00:00.091543448 3534 0x7f833806ec00 WARN basetransform gstbasetransform.c:1362:gst_base_transform_setcaps:<audioconvert1> FAILED to configure incaps audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)8, channel-mask=(bitmask)0x0000000000000c3f, rate=(int)48000 and outcaps audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(string)S16BE, channels=(int)16
0:00:00.091554349 3534 0x7f833806ec00 WARN wavparse gstwavparse.c:2293:gst_wavparse_loop:<wavparse0> error: Internal data stream error.
0:00:00.091558663 3534 0x7f833806ec00 WARN wavparse gstwavparse.c:2293:gst_wavparse_loop:<wavparse0> error: streaming stopped, reason not-negotiated (-4)
ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstWavParse:wavparse0: Internal data stream error.
Additional debug info:
gstwavparse.c(2293): gst_wavparse_loop (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstWavParse:wavparse0:
streaming stopped, reason not-negotiated (-4)
0:00:00.091614021 3534 0x7f833806ec00 WARN audioconvert gstaudioconvert.c:654:gst_audio_convert_fixate_channels:<audioconvert1> invalid or unexpected channel-positions
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
0:00:00.091619464 3534 0x7f833806ec00 ERROR audioconvert gstaudioconvert.c:668:gst_audio_convert_fixate_channels:<audioconvert1> Have no default layout for 16 channels
0:00:00.091662384 3534 0x7f833806ec00 ERROR audio-info audio-info.c:304:gst_audio_info_from_caps: no channel-mask property given
0:00:00.091681343 3534 0x7f833806ec00 ERROR audioconvert gstaudioconvert.c:778:gst_audio_convert_set_caps:<audioconvert1> invalid output caps
0:00:00.091701845 3534 0x7f833806ec00 WARN basetransform gstbasetransform.c:1362:gst_base_transform_setcaps:<audioconvert1> FAILED to configure incaps audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)8, channel-mask=(bitmask)0x0000000000000c3f, rate=(int)48000 and outcaps audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(string)S16BE, channels=(int)16
0:00:00.091767321 3534 0x7f833806ec00 WARN audioconvert gstaudioconvert.c:654:gst_audio_convert_fixate_channels:<audioconvert1> invalid or unexpected channel-positions
0:00:00.091773142 3534 0x7f833806ec00 ERROR audioconvert gstaudioconvert.c:668:gst_audio_convert_fixate_channels:<audioconvert1> Have no default layout for 16 channels
0:00:00.091779617 3534 0x7f833806ec00 ERROR audio-info audio-info.c:304:gst_audio_info_from_caps: no channel-mask property given
0:00:00.091797568 3534 0x7f833806ec00 ERROR audioconvert gstaudioconvert.c:778:gst_audio_convert_set_caps:<audioconvert1> invalid output caps
0:00:00.091805352 3534 0x7f833806ec00 WARN basetransform gstbasetransform.c:1362:gst_base_transform_setcaps:<audioconvert1> FAILED to configure incaps audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)8, channel-mask=(bitmask)0x0000000000000c3f, rate=(int)48000 and outcaps audio/x-raw, layout=(string)interleaved, rate=(int)48000, format=(string)S16BE, channels=(int)16
Freeing pipeline ...


当使用 8channel 文件和 channel =8 以及从同一个 audacity 项目生成的 wav 文件时,一切都很好。

现在测试
linux
gst-launch-1.0 version 1.14.4
GStreamer 1.14.4

是否根本不可能从命令行使用 gstreamer 流式传输 16ch wav 文件?我曾尝试查看各种标志,例如交错、 channel 位置等,但没有足够的经验来临时知道可能需要什么。

任何帮助或链接都会受到重视。

最佳答案

也许在 Audacity 方面出了点问题?

下面为我​​创建了一个 16 channel 的 .wav 文件:

gst-launch-1.0 audiotestsrc is-live=true ! \
audio/x-raw,format=S16BE,rate=48000,channels=16 ! \
audioresample ! audioconvert ! wavenc ! filesink location=x.wav

ff探针:
Input #0, wav, from 'x.wav':
Duration: 00:23:18.06, bitrate: 24 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, 16 channels, s16, 12288 kb/s

该文件在 gst-play-1.0 x.wav 上也能正常播放。 .这一切都在 GStreamer 1.16.2 上。

关于audio - gstreamer 多 channel 大于 8 个 channel ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61728296/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com