Gstreamer-通过tcp从Logitech c920传输h264视频

Gstreamer-通过tcp从Logitech c920传输h264视频,tcp,raspberry-pi,gstreamer,h.264,Tcp,Raspberry Pi,Gstreamer,H.264,我试图从罗技c920直接输出h264的视频流。发送端是Raspberry Pi,接收端是Windows 7 PC。在Gstreamer中使用udp可以完美地工作: 发件人: v4l2src device=/dev/video0 ! video/x-h264,width=320,height=90,framerate=10/1 ! tcpserversink host=192.168.0.4 port=5000 gst-launch-1.0-v4l2src设备=/dev/video0\ 视频/x

我试图从罗技c920直接输出h264的视频流。发送端是Raspberry Pi,接收端是Windows 7 PC。在Gstreamer中使用udp可以完美地工作:

发件人:

v4l2src device=/dev/video0 ! video/x-h264,width=320,height=90,framerate=10/1 !
tcpserversink host=192.168.0.4 port=5000
gst-launch-1.0-v4l2src设备=/dev/video0\ 视频/x-h264,宽度=1280,高度=720,帧速率=30/1!h264parse!RTPH264支付\ pt=127配置间隔=4!udpsink主机=$myip端口=$myport 接收人:

tcpclientsrc  host=192.168.0.4 port=5000 !
h264parse   ! avdec_h264  ! 
autovideosink sync=true
gst-launch-1.0-e-v udpsrc端口=5001^ 应用程序/x-rtp,有效载荷=96^ rtpjitterbuffer^ rtph264depay^ avdec_h264^ 自动视频接收器同步=错误文本覆盖=错误 但是,使用tcp时,这不起作用:

寄件人

gst-launch-1.0-v4l2src设备=/dev/video0\ 视频/x-h264,宽度=960,高度=720,帧速率=5/1!h264parse!rtph264pay pt=96配置间隔=1\ ! 格德佩!tcpserversink主机=$myip端口=$myport 接收人:

tcpclientsrc  host=192.168.0.4 port=5000 !
h264parse   ! avdec_h264  ! 
autovideosink sync=true
gst-launch-1.0-e-v tcpclientsrc主机=172.17.166.255端口=5001^ 应用程序/x-gdp!gdpdepay!rtpjitterbuffer^ rtph264depay^ avdec_h264^ 自动视频接收器同步=错误文本覆盖=错误 我在接收端得到以下错误:

ERROR: from element /GstPipeline:pipeline0/GstGDPDepay:gdpdepay0: Could not decode stream.
Additional debug info:
gstgdpdepay.c(443): gst_gdp_depay_chain ():     
/GstPipeline:pipeline0/GstGDPDepay:gdpdepay0:
could not create event from GDP packet
EOS on shutdown enabled -- waiting for EOS after Error

有趣的是:如果我在启动发送方之前启动接收端,我会在视频流中断之前获得几秒钟的视频流。我怀疑这可能是gdppay-gdpdepay的问题,但我不确定

以下内容适用于通过TCP传输h264:

发件人:

v4l2src device=/dev/video0 ! video/x-h264,width=320,height=90,framerate=10/1 !
tcpserversink host=192.168.0.4 port=5000
接收人:

tcpclientsrc  host=192.168.0.4 port=5000 !
h264parse   ! avdec_h264  ! 
autovideosink sync=true
显然,h264可以在不使用gdppay/depay的情况下通过tcp传输