问答

汇集网友智慧,解决技术难题

21ic问答首页 - 想用gstreamer 改变音频格式播放到alsa声卡总是失败

单片机 嵌入式 DSP MUC

想用gstreamer 改变音频格式播放到alsa声卡总是失败

岳佳佳2025-02-24
我的目标,想把一个raw data音频文件,将浮点型32位转化为S16_LE格式,但是总是出错,deepseek来来回回就那么试,人已经麻了,求各位大佬帮助

这是我的命令
gst-launch-1.0 filesrc location=/data/7_1.pcm ! capsfilter caps=audio/x-raw,
format=F32LE,rate=48000,channels=8,layout=interleaved,channel-mask=0x0000007f,en
dianness=1 ! audioconvert ! capsfilter caps=audio/x-raw,format=S16LE,rate=48000,
channels=8,layout=interleaved,channel-mask=0x0000007f,endianness=1 ! alsasink de
vice=hw:0,1

下面是日志输出:
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:
../plugins/elements/gstcapsfilter.c(453): 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 ...
回答 +关注 0
29人浏览 0人回答问题 分享 举报
0 个回答

您需要登录后才可以回复 登录 | 注册