3

我正在尝试在 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 替换osxaudiosrcautoaudiosrc,有人知道是什么问题吗?

谢谢

4

3 回答 3

7

您可能缺少gst-ffmpeg插件。我这么说是因为我遇到了一个类似的问题

您可以使用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 的其他包。

祝你好运!

于 2011-01-11T21:37:23.273 回答
1

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 编辑您的方式,直到您弄清楚如何绕过它。

于 2010-11-10T14:47:05.990 回答
0

此错误已在 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
于 2015-04-02T14:01:44.467 回答