linux - gstreamer tcpclientsink 连接被拒绝

标签 linux macos wifi raspberry-pi gstreamer

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

在树莓派 (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 ...

在苹果机上

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 本地主机上同时使用客户端和服务器工作正常。请让我知道我做错了什么。

最佳答案

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

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

关于linux - gstreamer tcpclientsink 连接被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23329043/

相关文章:

linux - Bash 确定最高变量和最低变量之间的差异

java - Apple Java 源代码可用

python - 在 Raspberry Pi 上使用 Python 连接到 wifi

没有 Bonjour 的 iOS 设备发现

Linux 用户名/etc/passwd 列表

Linux - 获取文件/目录列表和拥有它的用户名

python - 无法在 Python 3.x 中安装 paho-mqtt

macos - 无法在 NSPopover 中获取 Tab 键顺序

ios - 为什么可能需要为iOS或macOSbuild设置 “supported document types”?

wifi - 找出路由器和接收器之间的距离?