【发布时间】:2015-04-15 16:19:53
【问题描述】:
我正在尝试从直接输出 h264 的 Logitech c920 流式传输视频。发送端是 Raspberry Pi,接收端是 Windows 7 PC。使用 udp 可以在 Gstreamer 中完美运行:
发件人:
gst-launch-1.0 -v v4l2src device=/dev/video0 ! \
video/x-h264,width=1280,height=720,framerate=30/1 ! h264parse ! rtph264pay \
pt=127 config-interval=4 ! udpsink host=$myip port=$myport
接收者:
gst-launch-1.0 -e -v udpsrc port=5001 ! ^
application/x-rtp, payload=96 ! ^
rtpjitterbuffer ! ^
rtph264depay ! ^
avdec_h264 ! ^
autovideosink sync=false text-overlay=false
但是使用 tcp 这不起作用:
发件人
gst-launch-1.0 -v v4l2src device=/dev/video0 ! \
video/x-h264,width=960,height=720,framerate=5/1 ! h264parse ! rtph264pay pt=96 config-interval=1 \
! gdppay ! tcpserversink host=$myip port=$myport
接收者:
gst-launch-1.0 -e -v tcpclientsrc host="172.17.166.255" port=5001 ! ^
application/x-gdp ! gdpdepay ! rtpjitterbuffer ! ^
rtph264depay ! ^
avdec_h264 ! ^
autovideosink sync=false text-overlay=false
我在接收方收到以下错误:
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 raspberry-pi gstreamer h.264