我无法找到一个gst-launch调用来简单地播放一个opus文件到脉冲音频。有什么帮助吗?
我试过的东西
130 % file foo.opus
foo.opus: Ogg data, Opus audio, version 0.1, stereo, 44100 Hz (Input Sample Rate)
0 % gst-launch-1.0 filesrc location=foo.opus ! pulsesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstPulseSink:pulsesink0: The stream is in the wrong format.
1 % gst-launch-1.0 filesrc location=foo.opus ! opusparse ! pulsesink
WARNING: erroneous pipeline: could not link opusparse0 to pulsesink0
1 % gst-launch-1.0 filesrc location=foo.opus ! opusdec ! pulsesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc0: Internal data stream error.
# this runs, but only makes one burst of noise
0 % gst-launch-1.0 filesrc location=foo.opus ! opusparse ! opusdec ! pulsesink发布于 2022-01-12 02:03:29
下面是一个有用的例子。
gst-launch-1.0 filesrc location=foo.opus ! oggdemux ! opusparse ! opusdec ! alsasink我能够从这里的管道示例中把这些拼凑在一起
https://gstreamer.freedesktop.org/documentation/opus/opusdec.html?gi-language=c
和
https://gstreamer.freedesktop.org/documentation/opus/opusenc.html?gi-language=c
尽管在这些例子中没有opusparse。我不知道为什么我的文件需要opusparse,但是用opusenc创建的sine.ogg不需要它。或者解析和解码opus文件数据有什么区别.
https://stackoverflow.com/questions/70672729
复制相似问题