我正在使用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文件。
为了测试是否一切正常,我想回放一下。我尝试了这个(在其他方面):
gst-launch-0.10 filesrc location=out.raw ! capsfilter caps="audio/x-raw-int, rate=8000, channels=1, endianness=4321, width=16, depth=16, signed=true" ! alsasink can-activate-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 ..."Filter caps没有完全指定输出格式“?这里缺少什么?
发布于 2015-03-26 19:44:38
好吧,在alsasink之前添加audioconvert过滤器使其工作。根据gst-inspect的说法,指定的音频格式与alsa兼容。所以我猜是声卡出了问题,audioconvert以某种方式将数据转换成了我的声卡可以处理的数据。只是猜测而已。
我还删除了can-activate-pull=true选项。激活此选项后的音质非常差。我想知道为什么。
https://stackoverflow.com/questions/29276078
复制相似问题