GStreamer opusdec:尝试解码Opus比特流失败

创刊号

我想使用gstreamer插件opusdec解码Opus比特流 。 最终目的是用appsrc和appsink作为输入/输出在其周围制作胶水,以解码来自RTP数据包有效载荷的20 ms Opus数据包并提供PCM样本。

备注:我不能使用gstreamer rtpopusdepay

以下管道工作:

gst-launch-1.0 filesrc location = testvector01.bit.opus! oggdemux! opusdec! fakesink

在我的最终申请中,我不期望OGG包含数据,所以我做了以下工作:

1)Desencapsulate Opus比特流

gst-launch-1.0 filesrc location = testvector01.bit.opus! oggdemux! filesink位置= testvector01.bit.demux

这样可行。 接着:

2)解码Opus比特流

gst-launch-1.0 filesrc location = testvector01.bit.demux! opusdec! fakesink

我有以下错误:

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstFileSrc:filesrc0:
streaming task paused, reason error (-5)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ..

输入文件

testvector01.bit.opus从Opus测试向量:https://people.xiph.org/~greg/opus_testvectors/

我的问题是:什么是正确的方式来使用gstreamer插件opusec没有运输容器?

更新

Gstreamer版本1.2.4

建议我试着在filesrc之后添加opusparse并得到以下错误。

Pipeline is PREROLLING ...

(gst-launch-1.0:5147): GStreamer-WARNING **:
gstpad.c:4555:store_sticky_event:<opusparse0:src> Sticky event
misordering, got 'caps' before 'stream-start'

(gst-launch-1.0:5147): GStreamer-WARNING **:
gstpad.c:4555:store_sticky_event:<opusdec0:sink> Sticky event
misordering, got 'caps' before 'stream-start' Pipeline is PREROLLED
... Setting pipeline to PLAYING ... New clock: GstAudioSinkClock
ERROR: from element /GstPipeline:pipeline0/GstOpusDec:opusdec0:
Decoding error: -4 Additional debug info: gstopusdec.c(460):
opus_dec_chain_parse_data ():
/GstPipeline:pipeline0/GstOpusDec:opusdec0 Execution ended after
0:00:00.063372478 Setting pipeline to PAUSED ... Setting pipeline to
READY ... Setting pipeline to NULL ... Freeing pipeline ...

GStreamer 1.8.1

以下管道

gst-launch-1.0 filesrc location = testvector01.bit.demux! opusparse! opusdec! audioconvert! alsasink

这里暂停:

将管道设置为PAUSED ...管道正在PREROLLING ...

Gstreamer 1.13.1

gst-launch-1.0 filesrc location = testvector01.bit.demux! opusparse! opusdec! alsasink

播放只会产生短暂的音频毛刺,而不会引发gstreamer错误。

gst-launch-1.0 filesrc location = testvector01.bit.opus! oggdemux! opusparse! opusdec! alsasink

播放不连贯而没有引发gstreamer错误。

问候,


您需要在它们之间有一个解析器(opusparse),因为opusdec不知道它是什么格式,请尝试以下管道:

gst-launch-1.0 filesrc location = testvector01.bit.demux! opusparse! opusdec! fakesink dump = true

链接地址: http://www.djcxy.com/p/43931.html

上一篇: GStreamer opusdec: Try decode Opus bitstream failed

下一篇: Encoding a audio file using ffenc