Created
July 26, 2017 17:35
-
-
Save npk48/037b4b72368ef2218262155b913b25cc to your computer and use it in GitHub Desktop.
ps4无采集卡原生推送bilibili直播
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ps4原生支持推送twitch直播 要转发b站 实现思路非常简单 | |
| 1. 修改路由器劫持流到本地 | |
| 2. 推送流到b站 | |
| 第一步可以通过两种方法实现 | |
| 1. 路由器iptable修改 | |
| 熟悉dd-wrt或者open-wrt的都很好操作,推送端口为1935, 只要把所有twitch的ip段导向到本地就行了 | |
| 把1.1.1.109改成你本地的rtmp服务器ip就行(路由器或者pc) | |
| iptables -t nat -A PREROUTING -d 103.53.48.0/23 -p tcp --dport 1935 -j DNAT --to-destination 1.1.1.109:1935 | |
| iptables -t nat -A POSTROUTING -j MASQUERADE | |
| iptables -t nat -A PREROUTING -d 185.42.204.0/22 -p tcp --dport 1935 -j DNAT --to-destination 1.1.1.109:1935 | |
| iptables -t nat -A POSTROUTING -j MASQUERADE | |
| iptables -t nat -A PREROUTING -d 192.108.239.0/24 -p tcp --dport 1935 -j DNAT --to-destination 1.1.1.109:1935 | |
| iptables -t nat -A POSTROUTING -j MASQUERADE | |
| iptables -t nat -A PREROUTING -d 192.16.64.0/21 -p tcp --dport 1935 -j DNAT --to-destination 1.1.1.109:1935 | |
| iptables -t nat -A POSTROUTING -j MASQUERADE | |
| iptables -t nat -A PREROUTING -d 199.9.248.0/21 -p tcp --dport 1935 -j DNAT --to-destination 1.1.1.109:1935 | |
| iptables -t nat -A POSTROUTING -j MASQUERADE | |
| iptables -t nat -A PREROUTING -d 23.160.0.0/24 -p tcp --dport 1935 -j DNAT --to-destination 1.1.1.109:1935 | |
| iptables -t nat -A POSTROUTING -j MASQUERADE | |
| iptables -t nat -A PREROUTING -d 45.113.128.0/22 -p tcp --dport 1935 -j DNAT --to-destination 1.1.1.109:1935 | |
| iptables -t nat -A POSTROUTING -j MASQUERADE | |
| iptables -t nat -A PREROUTING -d 52.223.192.0/20 -p tcp --dport 1935 -j DNAT --to-destination 1.1.1.109:1935 | |
| iptables -t nat -A POSTROUTING -j MASQUERADE | |
| iptables -t nat -A PREROUTING -d 52.223.208.0/21 -p tcp --dport 1935 -j DNAT --to-destination 1.1.1.109:1935 | |
| iptables -t nat -A POSTROUTING -j MASQUERADE | |
| iptables -t nat -A PREROUTING -d 52.223.224.0/20 -p tcp --dport 1935 -j DNAT --to-destination 1.1.1.109:1935 | |
| iptables -t nat -A POSTROUTING -j MASQUERADE | |
| iptables -t nat -A PREROUTING -d 52.223.240.0/20 -p tcp --dport 1935 -j DNAT --to-destination 1.1.1.109:1935 | |
| iptables -t nat -A POSTROUTING -j MASQUERADE | |
| 2. 修改ps4 网关为本地pc, 本地pc虚拟机跑debian路由 (百度贴吧ps4无采集卡直播有教程,不推荐,太麻烦) | |
| 第二步取决于用户需求有两种方法,但都需要架设一个本地的nginx rtmp服务器(http://nginx.org/en/download.html) | |
| 1. obs使用video插件填入本地nginx rtmp服务器地址捕捉后转发,优点是可以自己添加overlay | |
| 2.直接配置nginx转发,优点是可以全部打包到路由器 不需要开pc就能一键直播 | |
| nginx服务器的配置比较简单 (nginx.conf) | |
| events { | |
| worker_connections 768; | |
| # multi_accept on; | |
| } | |
| rtmp { | |
| server { | |
| listen 1935; | |
| application app { | |
| live on; | |
| record off; | |
| push rtmp://txy.live-send.acg.tv/live-txy/?streamname=你的b站串流key; | |
| } | |
| } | |
| } |
楼主,还在吗,我想知道梅林路由器可不可以这样设置,具体操作需要怎么样,我好懵啊有懂的老哥可以加我qq交流一下吗729072688
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
你好,请问这些 twithc ip 是怎么获取的,我使用 nslookup 没有你这么全
更新后续:
先前用的是这个,不能转发
之后用你给的 ip 成功转发,在 rtmp 统计里看到地址应该是,live-sel.twitch.tv,是棒子的服务器
不知道为什么国行机器+港服为什么会选择韩国 twitch
总之很感谢