gpt4 book ai didi

audio - gst-launch无法与alsasink device = hw:2一起播放

转载 作者:行者123 更新时间:2023-12-03 00:40:28 25 4
gpt4 key购买 nike

使用以下工作正常

gst-launch-0.10 filesrc location=temp.wav ! wavparse ! audioconvert ! alsasink device=hw:0

一样
gst-launch-1.0 filesrc location=temp.wav ! wavparse ! audioconvert ! alsasink device=hw:0

当我使用hw:2时,如果播放器正在使用它,则会出现设备繁忙错误,否则会出现内部数据流错误。

如果启用调试
GST_DEBUG=2

我得到以下
         alsa pcm_hw.c:1693:_snd_pcm_hw_open: alsalib error: Invalid value for card
basetransform gstbasetransform.c:1414:gst_base_transform_setcaps:<audioconvert0> transform could not transform audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)2, channel-mask=(bitmask)0x0000000000000003, rate=(int)44100 in anything we support
basetransform gstbasetransform.c:1414:gst_base_transform_setcaps:<audioconvert0> transform could not transform audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)2, channel-mask=(bitmask)0x0000000000000003, rate=(int)44100 in anything we support
basetransform gstbasetransform.c:1414:gst_base_transform_setcaps:<audioconvert0> transform could not transform audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)2, channel-mask=(bitmask)0x0000000000000003, rate=(int)44100 in anything we support
basetransform gstbasetransform.c:1414:gst_base_transform_setcaps:<audioconvert0> transform could not transform audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)2, channel-mask=(bitmask)0x0000000000000003, rate=(int)44100 in anything we support
wavparse gstwavparse.c:2249:gst_wavparse_loop:<wavparse0> error: Internal data flow error.
wavparse gstwavparse.c:2249:gst_wavparse_loop:<wavparse0> error: streaming task paused, reason not-negotiated (-4)
basetransform gstbasetransform.c:1414:gst_base_transform_setcaps:<audioconvert0> transform could not transform audio/x-raw, format=(string)S16LE, layout=(string)interleaved, channels=(int)2, channel-mask=(bitmask)0x0000000000000003, rate=(int)44100 in anything we support
ERROR: from element /GstPipeline:pipeline0/GstWavParse:wavparse0: Internal data flow error.

我确实从以下两个方面听到声音
gst123 -a alsa=hw:2 temp.wav
aplay -D hw:2 temp.wav

我是否错过了一些其他关于gst-launch的论点?

任何帮助将非常感激!

最佳答案

在写问题时,我找到了答案,但我认为我会继续提出该问题,以防其他人遇到同样的问题。确实有一个遗漏的论点... audioresample。

gst-launch-1.0 filesrc location=temp.wav ! wavparse ! audioconvert ! audioresample ! alsasink device=hw:2

关于audio - gst-launch无法与alsasink device = hw:2一起播放,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34978060/

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