【问题标题】:Gstreamer Mac OS X udpsink errorGstreamer Mac OS X udpsink 错误
【发布时间】:2021-08-13 13:45:29
【问题描述】:

我正在尝试在 Mac OS X 中流式传输音频,但我不断收到此错误:

gst-launch osxaudiosrc ! audioresample ! audioconvert ! alawenc ! rtppcmapay ! udpsink port=10001 host=192.168.2.10

Setting pipeline to PAUSED …
ERROR: Pipeline doesn’t want to pause.
ERROR: from element /GstPipeline:pipeline0/GstUDPSink:udpsink0: Could not get/set settings from/on resource.
Additional debug info:
gstmultiudpsink.c(804): gst_multiudpsink_configure_client (): /GstPipeline:pipeline0/GstUDPSink:udpsink0:
Could not set TTL socket option (22): Invalid argument
Setting pipeline to NULL …
Freeing pipeline …

这在 Windows 中有效,将 osxaudiosrc 替换为 autoaudiosrc,有人知道这是什么问题吗?

谢谢

【问题讨论】:

标签: macos gstreamer


【解决方案1】:

您可能缺少 gst-ffmpeg 插件。我这么说是因为I'd encoutered a similiar problem

您可以使用Homebrew(首选)或MacPorts 安装它。

自制命令:brew install gst-ffmpeg

我还建议安装其他软件包。此命令将安装 GStreamer 及其所有软件包:brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-ffmpeg

使用brew search gst 搜索您可能需要的有关 GStreamer 的其他包。

祝你好运!

【讨论】:

    【解决方案2】:

    udpsink/multiudpsink 代码中存在与启用 IPV6 的系统和套接字创建相关的错误。

    如果您使用 C 编写管道,您可以通过手动创建要使用的套接字并将其用于接收器来绕过此问题。

    my_sink = gst_element_make_from_uri(GST_URI_SINK, "udp://233.34.28.1:31337", NULL);
    int my_tx_socket;
    my_tx_socket = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)
    g_object_set(G_OBJECT(my_sink), “sockfd”, my_tx_socket, NULL);
    

    如果您只是打算使用 gst-launch 来使用它,恐怕您将不得不通过 multiudpsink.c 编辑您的方式,直到您弄清楚如何绕过它。

    【讨论】:

      【解决方案3】:

      此错误已在 GStreamer-1.0 中修复,因此请安装(例如 port install gstreamer1-gst-plugins-good)并运行 - 确保使用 v1 管道:

      gst-launch-1.0 osxaudiosrc ! audioresample ! audioconvert ! alawenc ! rtppcmapay ! udpsink port=10001 host=192.168.2.10
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2013-02-12
        • 2014-10-17
        • 2016-11-23
        • 2015-11-03
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多