无法使用标准 gstreamer 命令播放 WAV 文件

无法使用标准 gstreamer 命令播放 WAV 文件

我可以毫无问题地播放 mp3 文件,在我的应用程序中播放来自 appsrc 的 PCM 数据也运行良好,但是我在播放音频使用 gstreamer 命令的文件:

$ gst-launch-0.10 filesrc location=sound.wav ! wavparse ! audioconvert ! alsasink

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstWavParse:wavparse0: Internal data flow error.
Additional debug info:
gstwavparse.c(2046): gst_wavparse_loop (): /GstPipeline:pipeline0/GstWavParse:wavparse0:
streaming task paused, reason not-linked (-1)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

答案1

你已经安装了 gstreamer goog 插件吗?

apt-get install gstreamer0.10-plugins-good

然后尝试转换 WAV:

gst-launch-0.10 filesrc location=path_of_input_wav_file ! wavparse ! filesink location=path_of_output_file

相关内容