516310189i
V2EX  ›  问与答

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

  •  
  •   516310189i · Oct 20, 2020 · 1947 views
    This topic created in 2040 days ago, the information mentioned may be changed or developed.

    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 replies    2020-10-21 21:05:22 +08:00
    Lax
        1
    Lax  
       Oct 21, 2020
    iptables 第一行命令的空格位置不对吧
    Lax
        2
    Lax  
       Oct 21, 2020
    对端的 rtmp 服务器是怎么配置的,是不是地址没写全?
    516310189i
        3
    516310189i  
    OP
       Oct 21, 2020
    @Lax 感谢,应该是服务器的问题:)
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2842 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 01:46 · PVG 09:46 · LAX 18:46 · JFK 21:46
    ♥ Do have faith in what you're doing.