Live stream from your PS4 to a local computer running an RTMP server by intercepting the twitch.tv stream.
Requirements
- DD-WRT enabled Router (or router with iptables compatibility)
- nix Envirment
- nginx with the nginx-rtmp-module
#!/bin/sh | |
# Bandwidth flow controller. Should decrease overall latency. | |
: <<'EOF' | |
Copyright (C) February 30, 2006, Andrew Domaszek | |
(MIT License) | |
Update history: | |
May 30, 2014 - add internal flow limit |
Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:
Considerations to take when live streaming:
The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:
Set the buffer size (-bufsize:v
) equal to the target bitrate (-b:v
). You want to ensure that you're encoding in CBR mode.
Set up the encoders as shown:
#!/bin/bash | |
# Diego García Gonzalez (diegargon) diego@envigo.net | |
# v1.0 | |
### BEGIN INIT INFO | |
# Provides: myQoS | |
# Required-Start: networking, myFirewall | |
# Required-Stop: | |
# Should-Start: | |
# Should-Stop: | |
# Default-Start: 2 3 4 5 |
# All the commands have been tested on a Xubuntu 22.04 | |
# First we update our machine | |
sudo apt update | |
sudo apt upgrade | |
# We install the Nginx server | |
sudo apt install nginx | |
# We test and enable the firewall if it is disabled | |
sudo ufw status |
ffmpeg -re -i INPUT -c:v libx264 -c:a aac -preset slower -f dash ARBITRARY_NAME.mpd |