【发布时间】: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 错误。
问候,
【问题讨论】: