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

问题描述 投票:0回答:2

Initial Issue

我想使用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)Unencapsulate Opus比特流

gst-launch-1.0 filesrc location = testvector01.bit.opus! oggdemux! filesink location = 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的正确方法是什么?

Update

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错误。

问候,

gstreamer ogg opus
2个回答
0
投票

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

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


0
投票
appsrc is-live=true do-timestamp=true name=audiosrc ! opusparse ! oggmux ! filesink location=test.ogg

gstreamer 1.14.1工作正常

© www.soinside.com 2019 - 2024. All rights reserved.