Scripts to help automate my cursed streaming setup
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Izaya 963a7365c3 import 4 months ago
client import 4 months ago
server import 4 months ago
README.md import 4 months ago

README.md

stream-scripts

This is a set of scripts to help automate my cursed streaming setup. It's divided into two parts:

  • The "client" side, ie my desktop. This part spews video and audio minimally compressed over the LAN to the server side.
  • The "server" side, which does all the heavy lifting to reduce the load on my desktop.

Requiremens

  • ffmpeg
  • pulseaudio
  • bash
  • Lua (optional)

Client side.

Included are two scripts, recordscreen.sh, and paremap.lua.

recordscreen.sh is fairly self-explanatory, it records the screen, pulls audio from pulseaudio, and spews it over the LAN. Doesn't take any arguments, but you'll need to modify it for your needs if you're going to use it yourself.

paremap.lua is less obvious. I listen to music when I stream games, and I want to be able to keep that separate for any actual recordings, for both legal reasons potential future technical reasons. This script will automatically shift over any matching applications to the third, not-included part of the client setup, detailed below.

In order to keep game audio (or whatever else) separate from the rest of my system, I'm using the pulseaudio module-combine-sink module, which just creates a secondary sink that also outputs to my speakers/headphones, but can be recorded from separately. To set one up, use load-module module-combine-sink in your default.pa.

Server side.

record.sh is a straightforward recording program that won't waste tonnes of space. It takes input over the LAN and records it to disk, with all the audio streams intact. Takes the prefix as an argument, so it can label the file.

stream.sh is more ... interesting. It does everything that record.sh does, but also spews the video and one audio track to a stream URL of your choice. Takes the file prefix, and a stream URL, as arguments.