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

时间:2018-02-06 12:35:29

标签: gstreamer ogg 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 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的正确方法是什么?

更新

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错误的情况下播放不稳定。

此致

2 个答案:

答案 0 :(得分:0)

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

  

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

答案 1 :(得分:0)

<body>
    <form onsubmit="results();" action="test1.html" method="get">
        What is your name?
        <input id="f1" type="text" name="name" required /><br />
        What is your Father Name?
        <input id="f2" type="text" name="fname" required />
        Gender:
        <select name="gender">
            <option id="m" value="Male" selected>Male</option>
            <option id="f" value="Female">Female</option>
            <option id="o" value="Others">Other</option>
        </select>
        Date of Birth*: <br />
        <input type="date" id="b1" name="bday" required><br /><br />
        <input id="submit" type="submit" />
    </form>
    <script src="./response.js"></script>
</body>

gstreamer 1.14.1正常工作