Gstreamer Mac OS X udpsink 错误

发布于 2024-09-30 17:33:21 字数 691 浏览 2 评论 0 原文

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

谢谢

I’m trying to stream audio in Mac OS X but I keep getting this error:

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 …

This works in Windows replacing osxaudiosrc with autoaudiosrc, anyone know what's the problem?

thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

贩梦商人 2024-10-07 17:33:21

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

您可以使用 Homebrew (首选)或 MacPorts

Homebrew 命令: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 的其他软件包。

祝你好运!

You might be missing the gst-ffmpeg plugin. I'm saying this because I'd encoutered a similiar problem.

You can install it using Homebrew (preferred) or MacPorts.

Homebrew command: brew install gst-ffmpeg

I would also suggest installing the other packages. This command will install GStreamer and all it's packages: brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-ffmpeg.

Use brew search gst to search for other packages that you might need concerning GStreamer.

Good luck!

雅心素梦 2024-10-07 17:33:21

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

There is a bug in the udpsink/multiudpsink code related to IPV6 enabled systems and socket creation.

If you are coding up your pipeline in C you can bypass this by manually creating the socket to use and using that for the sink like so.

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);

If you were just going to use it using gst-launch I'm afraid that you will have to edit your way through multiudpsink.c until you figure out how to bypass thus.

开始看清了 2024-10-07 17:33:21

此错误已在 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

This bug has been fixed in GStreamer-1.0 so install (e.g. port install gstreamer1-gst-plugins-good) and run - making sure you use the v1 pipeline:

gst-launch-1.0 osxaudiosrc ! audioresample ! audioconvert ! alawenc ! rtppcmapay ! udpsink port=10001 host=192.168.2.10
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文