【问题标题】:GStreamer opusdec: Try decode Opus bitstream failedGStreamer opusdec:尝试解码 Opus 比特流失败
【发布时间】:2018-07-16 12:41:16
【问题描述】:

初始问题

我想使用 gstreamer 插件 opusdec 来解码 Opus 比特流。最终目的是使用appsrc 和appsink 作为输入/输出来围绕它进行粘合,解码来自RTP 数据包有效负载的20 ms Opus 数据包并提供PCM 样本。

备注:我无法使用 gstreamer rtpopusdepay

以下管道有效:

gst-launch-1.0 文件rc location=testvector01.bit.opus !奥格德多克斯! 作品!假水槽

在我的最终申请中,我没有预料到 OGG 包含数据,所以我做了以下操作:

1) 解封装 Opus 比特流

gst-launch-1.0 文件rc location=testvector01.bit.opus !奥格德多克斯! 文件接收器位置 = testvector01.bit.demux

这行得通。然后:

2) 解码 Opus 比特流

gst-launch-1.0 文件rc location=testvector01.bit.demux !作品! 假水槽

我有以下错误:

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 位置 = testvector01.bit.demux !难看! 作品!音频转换!下水道

在这里停下来:

将管道设置为 PAUSED ... 管道正在预滚动 ...

Gstreamer 1.13.1

gst-launch-1.0 filesrc 位置 = testvector01.bit.demux !难看! 作品!下水道

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

gst-launch-1.0 filesrc 位置 = testvector01.bit.opus !奥格德多克斯!难看! 作品!下水道

播放断断续续,但没有引发 gstreamer 错误。

问候,

【问题讨论】:

    标签: gstreamer ogg opus


    【解决方案1】:

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

    gst-launch-1.0 文件rc location=testvector01.bit.demux !难看! 作品! fakesink dump=true

    【讨论】:

    • 我确实在解复用的 ogg 文件上尝试过,效果很好,你能附上你的文件吗?您还使用什么版本的 gstreamer(在 1.8.3 上测试)?看来您需要更新 gstreamer!
    • 如上所述,我使用 1.2.4 和 1.8.1 进行了测试。两者都失败了(不同的 wya)。 opusparse 似乎至少在 1.2.4 上是错误的。查找对此线程的引用:gstreamer-bugs.narkive.com/4bOQI7bM/…
    • 在运行 gstreamer 版本 1.8.3 的 ubuntu 16.0.4 上测试了 testvector01.bit.opus,完美运行!
    • 不幸的是,你是对的 Prabhakar Lad。升级到 1.13.1 就可以了。
    • 我也尝试升级 libopus、opusparse 并单独操作,但没有成功。如果有人有线索,将受到欢迎。
    【解决方案2】:
    appsrc is-live=true do-timestamp=true name=audiosrc ! opusparse ! oggmux ! filesink location=test.ogg
    

    gstreamer 1.14.1 工作正常

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-10-06
      • 1970-01-01
      • 2015-12-12
      • 1970-01-01
      • 2023-04-01
      相关资源
      最近更新 更多