gstreamer tcpclientsink连接拒绝

时间:2014-04-27 21:10:59

标签: linux macos wifi raspberry-pi gstreamer

您好我正在尝试使用gstreamer-1.0将数据从linux box(Raspberry Pi)流式传输到Macbook pro。

在Raspberry-Pi(Linux)上

pi@raspberrypi:[~]$ gst-launch-1.0 filesrc location="video.h264" ! tcpclientsink host="192.168.1.140" port=5000
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstTCPClientSink:tcpclientsink0: Could not open resource for reading.
Additional debug info:
gsttcpclientsink.c(366): gst_tcp_client_sink_start (): /GstPipeline:pipeline0/GstTCPClientSink:tcpclientsink0:
Failed to connect to host '192.168.1.140:5000': Connection refused
Setting pipeline to NULL ...
Freeing pipeline ...

在Mac上

punits@punits-mac:rover $ gst-launch-1.0 -v tcpserversrc port=5000 ! fakesink
Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstTCPServerSrc:tcpserversrc0: current-port = 5000
Pipeline is PREROLLING ...

在raspberry-pi localhost上使用客户端和服务器都可以正常工作。请让我知道我做错了什么。

2 个答案:

答案 0 :(得分:0)

我记得在gstreamer0.10默认情况下,tcpserversrc只在localhost上侦听。 我想在gstreamer1.0中它可能是相同的。

尝试使用属性“host = xxx.xxx.xxx.xxx”来指定外部IP地址。

答案 1 :(得分:0)

我遇到了拒绝连接的两个主要原因:

  1. 如果未指定主机; tcpclientsink使用ipv6而不是ipv4。
  2. 服务器没有收听;这给出了“拒绝连接”错误。您必须先启动服务器!