我正在尝试v4l2src
使用 GStreamer 通过 UDP 流式传输。发送部分(显然)没问题,但接收部分缺少一些东西。
这些是实际的行:
发送:
gst-launch-0.10 -v gstrtpbin name=rtpbin v4l2src device=/dev/video0 ! 'video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)15/1' ! rtpvrawpay ! rtpbin.send_rtp_sink_0 rtpbin.send_rtp_src_0 ! multiudpsink clients="127.0.0.1:9996" rtpbin.send_rtcp_src_0 ! multiudpsink clients="127.0.0.1:9997" sync=false async=false udpsrc port=10000 ! rtpbin.recv_rtcp_sink_0
收到:
gst-launch-0.10 -v gstrtpbin name=rtpbin udpsrc caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)RAW, sampling=(string)YUV, depth=(string)8, width=(string)320, height=(string)120, colorimetry=(string)SMPTE240M" port=9996 ! rtpbin.recv_rtp_sink_0 rtpbin. ! rtpvrawdepay ! video/x-raw-yuv,framerate=15/1 ! xvimagesink udpsrc port=9997 ! rtpbin.recv_rtcp_sink_0 rtpbin.send_rtcp_src_0 ! multiudpsink clients="127.0.0.1:10000" sync=false async=false
我错过了什么?
问候
编辑:
一些帽子不见了,所以我添加了它们,现在接收器没有崩溃,只是空转而没有显示任何东西。
发送:
gst-launch-0.10 -v gstrtpbin name=rtpbin v4l2src device=/dev/video0 ! 'video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)15/1' ! rtpvrawpay ! rtpbin.send_rtp_sink_0 rtpbin.send_rtp_src_0 ! multiudpsink clients="127.0.0.1:9996" rtpbin.send_rtcp_src_0 ! multiudpsink clients="127.0.0.1:9997" sync=false async=false udpsrc port=10000 ! rtpbin.recv_rtcp_sink_0
收到:
gst-launch-0.10 -v gstrtpbin name=rtpbin udpsrc caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)RAW, sampling=(string)YCbCr-4:2:0, depth=(string)8, width=(string)320, height=(string)240, colorimetry=(string)SMPTE240M, ssrc=(uint)956768427, payload=(int)96, clock-base=(uint)1415613946, seqnum-base=(uint)35008" port=9996 ! rtpbin.recv_rtp_sink_0 rtpbin. ! rtpvrawdepay ! video/x-raw-yuv,framerate=15/1 ! xvimagesink udpsrc port=9997 ! rtpbin.recv_rtcp_sink_0 rtpbin.send_rtcp_src_0 ! multiudpsink clients="127.0.0.1:10000" sync=false async=false