【问题标题】:GStreamer TCP streaming from Raspberry Pi to AndroidGStreamer TCP 从 Raspberry Pi 流式传输到 Android
【发布时间】:2016-06-13 12:32:24
【问题描述】:

我正在尝试使用 gstreamer 和 netcat 将 h264 视频从树莓派相机流式传输到 Android 设备。 我目前可以使用以下方法从树莓派流式传输视频:

//ON RASPBERRY
raspivid -t 0 -hf -n -h 480 -w 640 -fps 15 -o - | nc -l -p 5001

并使用在窗口中接收流

gst-launch-1.0 tcpclientsrc host=192.168.0.14 port=5001 ! queue2 max-size-buffers=1 ! decodebin ! autovideosink sync=false

这很好用。

然后我尝试使用 Gstreamer 示例文件夹中的简单 C 应用程序在 Windows 中接收流。这也很有效。

现在我的目标是使用 gstreamer 库在 android 设备上接收流。我能够编译和运行包含的 5 个教程,但我无法正确修改教程 3 以使其接收流。 我正在以这种方式创建管道:

 data->pipeline = gst_parse_launch("tcpclientsrc host=192.168.2.205 port=5001 ! queue2 max-size-buffers=1 ! decodebin ! autovideosink sync=false", &error); 

但它返回以下错误:

从元素 tcpclientsrc1 收到错误:无法打开资源进行读取

感谢您的帮助

【问题讨论】:

  • 在黑暗中拍摄:也许其他应用程序使用了端口?你试过其他端口吗
  • 感谢您的建议,但没有解决问题

标签: android raspberry-pi gstreamer


【解决方案1】:

我只是忘记在 manifest.xml 中添加 Internet 权限。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-08-05
    • 2015-10-28
    • 1970-01-01
    • 2018-01-28
    • 2016-01-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多