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

FFMPEG 如何推送单个/列表 视频到 DOUYU

  •  
  •   Ephzent · 2016-01-05 17:12:52 +08:00 · 2452 次点击
    这是一个创建于 3051 天前的主题,其中的信息可能已经有所发展或是发生改变。
    VPS 折腾了好久死活不行,求解
    作为答谢送一把 50G “梯子”
    12 条回复    2016-01-06 16:26:42 +08:00
    Mikewu
        1
    Mikewu  
       2016-01-05 21:53:57 +08:00
    单个:
    ffmpeg -re -i input_file -acodec copy -vcodec copy -f flv rtmp://douyutv.com/xxxx
    列表:
    1 、 ffmpeg -i concat:” input_file1|input_file2|input_file3 ” -acodec copy -vcodec copy -f flv rtmp://douyutv.com/xxxx
    2 、 ffmpeg -i concat list.txt -acodec copy -vcodec copy -f flv rtmp://douyutv.com/xxxx
    list.txt=>
    file '/path/to/file1'
    file '/path/to/file2'
    file '/path/to/file3'
    sgissb1
        2
    sgissb1  
       2016-01-05 23:43:50 +08:00
    @Mikewu 哥们你们说的推送,就是发布视频的意思是吧?我看着好象是发布视频啊
    Ephzent
        3
    Ephzent  
    OP
       2016-01-06 05:58:48 +08:00
    @sgissb1 1 楼没错,是我表达有问题
    Ephzent
        4
    Ephzent  
    OP
       2016-01-06 08:24:14 +08:00
    @Mikewu 没用额,不知道为什么

    Ephzent
        5
    Ephzent  
    OP
       2016-01-06 08:25:01 +08:00
    @Mikewu 虽然能运行,但是直播间并不能播放
    datou
        6
    datou  
       2016-01-06 08:59:22 +08:00
    @Ephzent rtmp 地址加上引号
    Ephzent
        7
    Ephzent  
    OP
       2016-01-06 09:24:43 +08:00
    @datou
    错误 1 : Cannot open connection tcp://send1a.douyutv.com:1935
    rtmp://send1a.douyutv.com/live/23xxx6rnyAHNVprP?wsSecret=38381b4cd7072834faxxx7d097697b&wsTime=568c6c6a: Connection timed out



    错误 2 : Server error: Failed to publish 238xxx6rnyAHNVprP?wsSecret=38381b4cd7072834fadd12b7d097697b&wsTime=568c6c6a
    rtmp://send1a.douyutv.com/live/xxxxxxrnyAHNVprP?wsSecret=38381b4cd7072834xxxb7d097697b&wsTime=568c6c6a: Operation not permitted

    难道是我服务器网络问题?
    Mikewu
        8
    Mikewu  
       2016-01-06 11:01:43 +08:00
    @Ephzent 建议你在 VPS 或者本地上编译 nginx 的 nginx-rtmp-module 模块用来调试推流,然后再推到斗鱼,我一年前用 DO 的 VPS 推过斗鱼,码率在 2000 以下不卡。
    datou
        9
    datou  
       2016-01-06 11:52:22 +08:00
    @Ephzent 换个推流服务器吧

    我前阵子试过 send3 那个服务器没问题
    Ephzent
        10
    Ephzent  
    OP
       2016-01-06 14:01:12 +08:00
    @Mikewu 如您所说,我自己搭了一台 rtmp 服务器,可以正常推送到此服务器,巴特就是推不上斗鱼的 Server error: Failed to publish
    @datou send1 或者 send3 神马的都是统一 CNAME 到一个 CDN 域名的
    datou
        11
    datou  
       2016-01-06 16:25:55 +08:00
    @Ephzent 你在斗鱼的网站上点了"开始直播"吗?
    Ephzent
        12
    Ephzent  
    OP
       2016-01-06 16:26:42 +08:00
    @datou 已经 OK 了,原来直播设置里有个推马流服务器切换,换成不限 IP 的就好了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   6057 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 06:32 · PVG 14:32 · LAX 23:32 · JFK 02:32
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.