V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
516310189i
V2EX  ›  问与答

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

  •  
  •   516310189i · 2020-10-20 22:41:22 +08:00 · 1117 次点击
    这是一个创建于 1255 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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 的老哥的指点

    3 条回复    2020-10-21 21:05:22 +08:00
    Lax
        1
    Lax  
       2020-10-21 00:49:39 +08:00
    iptables 第一行命令的空格位置不对吧
    Lax
        2
    Lax  
       2020-10-21 00:51:38 +08:00
    对端的 rtmp 服务器是怎么配置的,是不是地址没写全?
    516310189i
        3
    516310189i  
    OP
       2020-10-21 21:05:22 +08:00
    @Lax 感谢,应该是服务器的问题:)
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4086 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 05:23 · PVG 13:23 · LAX 22:23 · JFK 01:23
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.