Gstreamer 尝试 rtmp 推流一直报错 rtmpsink0:无法打开资源写入

2020-10-20 22:41:22 +08:00
 516310189i

1.我在 linux 中尝试使用在 jetson tx2 上使用如下的命令进行 rtmp 推流:

gst-launch-1.0  videotestsrc ! videoconvert ! x264enc ! flvmux ! rtmpsink        location='rtmp://127.0.0.1/live live=1'

2.但是一直报错,如下:

设置暂停管道 ...
管道正在 PREROLLING ...
重新分配延迟时间...
管道被 PREROLLED ...
设置播放管道 ...
New clock: GstSystemClock
错误:来自组件 /GstPipeline:pipeline0/GstRTMPSink:rtmpsink0:无法打开资源写入。
额外的调试信息:
gstrtmpsink.c(245): gst_rtmp_sink_render (): /GstPipeline:pipeline0/GstRTMPSink:rtmpsink0:
Could not connect to RTMP stream "rtmp://127.0.0.1/live live=1" for writing
Execution ended after 0:00:00.000829338
设置暂停管道 ...
设置备用管道 ...
设置 NULL 管道 ...
释放管道资源 ...

3.是因为端口的原因吗,我已经使用 iptables 打开了默认 1935 端口,使用的命令如下:

iptables -A INPUT -ptcp --dport  1935-j ACCEPT
iptables-save

4.希望得到懂 gstreamer 的老哥的指点

1158 次点击
所在节点    问与答
3 条回复
Lax
2020-10-21 00:49:39 +08:00
iptables 第一行命令的空格位置不对吧
Lax
2020-10-21 00:51:38 +08:00
对端的 rtmp 服务器是怎么配置的,是不是地址没写全?
516310189i
2020-10-21 21:05:22 +08:00
@Lax 感谢,应该是服务器的问题:)

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/716883

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX