Encoding GStreamer流停止,原因错误(-5)

Encoding GStreamer流停止,原因错误(-5),encoding,gstreamer,decoding,gstreamer-1.0,Encoding,Gstreamer,Decoding,Gstreamer 1.0,每次我运行我的管道,它都会运行一段时间,然后最终崩溃,“流停止,原因错误(-5)。我试图调试错误,但实际上没有得到任何可能有用的具体信息。 我的Gstramer管道: 'gst-launch-1.0', '--gst-debug=*src*:5', '-vvv', 'rtpbin', 'name=rtpbin', 'rtp-profile=avpf', 'fdsrc', 'timeout=1000000', '!', 'queue', '!', 'image/x-portable-pixmap,

每次我运行我的管道,它都会运行一段时间,然后最终崩溃,“流停止,原因错误(-5)。我试图调试错误,但实际上没有得到任何可能有用的具体信息。 我的Gstramer管道:

'gst-launch-1.0',
'--gst-debug=*src*:5',
'-vvv',
'rtpbin', 'name=rtpbin', 'rtp-profile=avpf',
'fdsrc', 'timeout=1000000',
'!', 'queue',
'!', 'image/x-portable-pixmap,width=1280,height=720,framerate=30/1',
'!', 'pnmdec',
'!', 'videoconvert',
'!', 'x264enc', 'tune=zerolatency', 'speed-preset=1', 'dct8x8=true', 'quantizer=23', 'pass=qual',
'!', 'video/x-h264, profile=baseline',
'!', 'rtph264pay', 'ssrc=111110', 'pt=96',
'!', 'rtprtxqueue', 'max-size-time=2000', 'max-size-packets=0',
'!', 'rtpbin.send_rtp_sink_0',
'rtpbin.send_rtp_src_0',
'!', 'udpsink', 'bind-address=127.0.0.1', 'host=127.0.0.1', 'bind-port=5004', `port=${videoRtpPort}`,
'rtpbin.send_rtcp_src_0',
'!', 'udpsink', 'bind-address=127.0.0.1', 'host=127.0.0.1', `port=${videoRtcpPort}`, 'sync=false', 'async=false', 'udpsrc', 'port=5005',
'!', 'rtpbin.recv_rtcp_sink_0', 
错误:

0:00:00.383847433  8025 0x55cb237fe940 DEBUG                basesrc gstbasesrc.c:2460:gst_base_src_get_range:<fdsrc0> calling create offset 5821984 length 4096, time 0
0:00:00.401808796  8025 0x55cb237fe940 DEBUG                basesrc gstbasesrc.c:2315:gst_base_src_do_sync:<fdsrc0> no sync needed
0:00:00.401819755  8025 0x55cb237fe940 DEBUG                basesrc gstbasesrc.c:2524:gst_base_src_get_range:<fdsrc0> buffer ok
0:00:00.401824818  8025 0x55cb237fe940 INFO                 basesrc gstbasesrc.c:2860:gst_base_src_loop:<fdsrc0> pausing after gst_pad_push() = error
0:00:00.401828989  8025 0x55cb237fe940 DEBUG                basesrc gstbasesrc.c:2903:gst_base_src_loop:<fdsrc0> pausing task, reason error
0:00:00.401834372  8025 0x55cb237fe940 WARN                 basesrc gstbasesrc.c:2950:gst_base_src_loop:<fdsrc0> error: Internal data stream error.
0:00:00.401837214  8025 0x55cb237fe940 WARN                 basesrc gstbasesrc.c:2950:gst_base_src_loop:<fdsrc0> error: streaming stopped, reason error (-5)
但没有pnmdec的管道运行良好。对此有何想法

还有一件有趣的事: 我注意到管道在以下事件后崩溃:

GST_SCHEDULING gstpad.c:4329:gst_pad_chain_data_unchecked:<pnmdec0:sink>[00m called chainfunction &gst_video_decoder_chain with buffer 0x7f97c8310d80, returned error
GST_调度gstpad.c:4329:GST_pad_chain_data_unchecked:[00m调用chainfunction&GST_video_解码器_chain带缓冲区0x7f97c8310d80,返回错误

我试着用谷歌搜索,但什么也没找到。

一种可能是你的
x264enc
(使用软件编码)一段时间后无法跟上进度,开始落后。请尝试从头开始重建管道:只有在上一个配置经过正确测试且未显示任何问题后,才能添加新元素。您将准确地找到导致问题的元素,然后我们将能够帮助您。管道太复杂,无法按照我的说明进行调试s、 @karlphillip我已经编辑了我的问题并添加了一个新的简单管道。你是对的,调试的最好方法是简化管道。那么关于pnmdec问题有什么想法吗?可能是在
pnmdec
之前配置的属性吗?我的意思是,像这样简单的东西在你的系统上也能工作吗?
gst-launch-1.0 filesrclocation=test.pnm!pnmdec!videoconvert!autovideosink
如果有效,请将属性添加到此管道,看看它是否中断。@karlphillip好的,无论是否使用属性,它都可以正常工作。pnmdec内部似乎有一种缓冲区,它没有时间处理一大块流idk。这意味着管道崩溃当pnmdec解码来自fdsrc的流时。我认为队列应该有帮助,但似乎没有
'gst-launch-1.0',
'fdsrc', 'fd=0',
'!', 'queue',
'!', 'image/x-portable-pixmap,width=1280,height=720,framerate=20/1',
'!', 'pnmdec',
'!', 'fakesink', 'dump=true',
GST_SCHEDULING gstpad.c:4329:gst_pad_chain_data_unchecked:<pnmdec0:sink>[00m called chainfunction &gst_video_decoder_chain with buffer 0x7f97c8310d80, returned error