Audio 如何使用gst启动播放原始音频文件?

Audio 如何使用gst启动播放原始音频文件?,audio,alsa,pcm,gstreamer,Audio,Alsa,Pcm,Gstreamer,我用的是gst-launch-0.10 我使用以下命令从mp3文件创建了一个pcm文件(至少,我想我已经创建了): gst-launch-0.10 filesrc location=my-sound.mp3 ! mad ! audioresample ! audioconvert ! 'audio/x-raw-int, rate=8000, channels=1, endianness=4321, width=16, depth=16, signed=true' ! filesink locat

我用的是gst-launch-0.10

我使用以下命令从mp3文件创建了一个pcm文件(至少,我想我已经创建了):

gst-launch-0.10 filesrc location=my-sound.mp3 ! mad ! audioresample ! audioconvert ! 'audio/x-raw-int, rate=8000, channels=1, endianness=4321, width=16, depth=16, signed=true' ! filesink location=out.raw
我现在有一个out.raw文件

为了测试是否一切正常,我想重放一遍。 我试过(除其他外):

但我每次都会犯这样的错误:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstCapsFilter:capsfilter0: Filter caps do not completely specify the output format
Additional debug info:
gstcapsfilter.c(393): gst_capsfilter_prepare_buf (): /GstPipeline:pipeline0/GstCapsFilter:capsfilter0:
Output caps are unfixed: EMPTY
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

“筛选器上限未完全指定输出格式”?这里缺少什么?

好吧,在
alsasink
之前添加
audioconvert
过滤器使它工作起来。根据gst inspect,指定的音频格式与alsa兼容。所以我想这是声卡的问题,
audioconvert
以某种方式将数据转换成我的声卡可以处理的东西。只是猜测而已

我还删除了
可以激活pull=true
选项。此选项激活时的音质非常差。我想知道为什么

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstCapsFilter:capsfilter0: Filter caps do not completely specify the output format
Additional debug info:
gstcapsfilter.c(393): gst_capsfilter_prepare_buf (): /GstPipeline:pipeline0/GstCapsFilter:capsfilter0:
Output caps are unfixed: EMPTY
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...