[教程] 无需HDMI采集卡,PS4直播功能破解,支持录制
-
阅读次数: 更新时间:2014/9/23
已经成功破解PS4直播功能,可以摆脱ustream和twitch的限制,在第三方平台下直接播放,录制游戏视频也可以通过网络直接录制
斗鱼下测试 http://www.douyu.tv/PS4
教程
linux
我的搭建环境是在raspberry pi上,应该用虚拟机也可以
PS4固件1.7后关闭了live.twitch.tv的DNS解析,需要使用静态路由方法来对live.twitch.tv和irc.twitch.tv做本地路由,具体教程根据自己路由器来解决
接下来是关键一步,搭建RTMP转发服务器,我这里用到的是nginx + nginx-rtmp-module插件,需要自行编译安装(官方教程)
我是树莓派环境,和官方有点区别,下面是命令- sudo apt-get install build-essential libpcre3 libpcre3-dev libssl-dev
- wget http://nginx.org/download/nginx-1.5.2.tar.gz
- git clone git://github.com/arut/nginx-rtmp-module.git
- tar -zxvf nginx-1.5.2.tar.gz
- cd nginx-1.5.2
- ./configure --with-http_ssl_module --add-module=../nginx-rtmp-module
- make
- sudo make install
然后配置nginx.conf文件,我这里默认路径实在/usr/local/nginx/conf/nginx.conf下面
添加代码如下- events {
- worker_connections 1024;
- }
- rtmp {
- server {
- listen 1935;
- chunk_size 131072;
- max_message 256M;
- application app {
- live on;
- record off;
- meta copy;
- push rtmp://send.douyu.tv/live/[STREAMKEY];
- #上面是斗鱼直播地址 [STREAMKEY]改成你的直播码
- }
- }
- }
- #! /bin/sh
- ### BEGIN INIT INFO
- # Provides: nginx
- # Required-Start: $all
- # Required-Stop: $all
- # Default-Start: 2 3 4 5
- # Default-Stop: 0 1 6
- # Short-Description: starts the nginx web server
- # Description: starts nginx using start-stop-daemon
- ### END INIT INFO
- PATH=/opt/bin:/opt/sbin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
- DAEMON=/usr/local/nginx/sbin/nginx
- NAME=nginx
- DESC=nginx
- test -x $DAEMON || exit 0
- # Include nginx defaults if available
- if [ -f /etc/default/nginx ] ; then
- . /etc/default/nginx
- fi
- set -e
- case "$1" in
- start)
- echo -n "Starting $DESC: "
- start-stop-daemon --start --quiet --pidfile /usr/local/nginx/logs/nginx.pid \
- --exec $DAEMON -- $DAEMON_OPTS
- echo "$NAME."
- ;;
- stop)
- echo -n "Stopping $DESC: "
- start-stop-daemon --stop --quiet --pidfile /usr/local/nginx/logs/nginx.pid \
- --exec $DAEMON
- echo "$NAME."
- ;;
- restart|force-reload)
- echo -n "Restarting $DESC: "
- start-stop-daemon --stop --quiet --pidfile \
- /usr/local/nginx/logs/nginx.pid --exec $DAEMON
- sleep 1
- start-stop-daemon --start --quiet --pidfile \
- /usr/local/nginx/logs/nginx.pid --exec $DAEMON -- $DAEMON_OPTS
- echo "$NAME."
- ;;
- reload)
- echo -n "Reloading $DESC configuration: "
- start-stop-daemon --stop --signal HUP --quiet --pidfile /usr/local/nginx/logs/nginx.pid \
- --exec $DAEMON
- echo "$NAME."
- ;;
- *)
- N=/etc/init.d/$NAME
- echo "Usage: $N {start|stop|restart|force-reload}" >&2
- exit 1
- ;;
- esac
- exit 0
以上操作完成后直接在PS4中手动选择DNS主机,选择共享,twitch直播就可以RTMP视频流转发到自己想要的直播平台上了
Windows教程https://www.gamehome.tv/Article/ps4/news/201409/30815.shtml
录制视频nginx.conf配置- worker_processes 1;
- events {
- worker_connections 1024;
- }
- rtmp {
- server {
- listen 1935;
- chunk_size 8192;
- max_message 512M;
- application app {
- live on;
- record all; #录制内容
- record_max_size 1024M ; #录制最大容量
- record_path ps4; #录制路径,windows下相对于nginx.exe的位置路径
- meta copy;
- }
- }
- }
- sudo apt-get install build-essential libpcre3 libpcre3-dev libssl-dev