Gstreamer:内部数据流错误:H264到Mjpeg到TCP

Gstreamer:内部数据流错误:H264到Mjpeg到TCP,tcp,gstreamer,h.264,pipeline,mjpeg,Tcp,Gstreamer,H.264,Pipeline,Mjpeg,我想拍摄一段h264视频,解码,在mjpeg中重新编码,然后通过tcp传输 为此,我使用了一个视频caputre,它通过Gstreamer提供h264输出视频,Gstreamer使用tcp进行解码、重新编码和传输: raspivid -n -t 0 -b 7000000 -fps 25 -o - | \ gst-launch-1.0 fdsrc ! video/x-h264,framerate=25/1,stream-format=byte-stream ! decodebin ! videor

我想拍摄一段h264视频,解码,在mjpeg中重新编码,然后通过tcp传输

为此,我使用了一个视频caputre,它通过Gstreamer提供h264输出视频,Gstreamer使用tcp进行解码、重新编码和传输:

raspivid -n -t 0 -b 7000000 -fps 25 -o - | \
gst-launch-1.0 fdsrc ! video/x-h264,framerate=25/1,stream-format=byte-stream ! decodebin ! videorate ! video/x-raw,framerate=10/1 ! \
videoconvert ! jpegenc ! tcpserversink host=192.168.24.5 port=5000 &
要接收,我使用:

gst-launch-1.0 tcpclientsrc host=192.168.24.5 port=5000 ! jpegdec ! autovideosink
在我的tcp服务器上,我的CPU工作在90%,我没有错误。我们可以认为没关系,但是

在我的tcp客户端上出现以下错误:

ERROR: from element /GstPipeline:pipeline0/GstTCPClientSrc:tcpclientsrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstTCPClientSrc:tcpclientsrc0:
streaming task paused, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.

你知道我的管道为什么断了吗?

尝试在视频接收器之前添加视频转换了吗

另外,您应该为tcp源指定上限,因为第二条管道至少需要知道帧速率。我会这样做:

gst-launch-1.0 tcpclientsrc host=192.168.24.5 port=5000 ! image/jpeg, framerate=25/1 ! jpegparse ! jpegdec ! queue ! videoconvert ! autovideosink
如果这仍然不起作用,那么来自接收管道的GST_DEBUG=6日志应该有助于查明问题