stream.sh/README.md
2021-06-22 20:32:41 +02:00

62 lines
1.5 KiB
Markdown

# stream.sh
A quick-and-dirty solution for streaming audio over TCP/IP between
Linux computers with ALSA (and pulseaudio).
# usage
The architecture consists of a server (Computer With Speakers) and
a client (Computer With Crappier Speakers But We Have Media On It).
The script is self-contained, so you can distribute the same version
to client and server computers.
On the server, run
```
./stream.sh server 1337
```
... and then, on the client, run
```
./stream.sh set
./stream.sh client 10.21.37.1 1337
```
This is enough to get you started, you should start hearing audio
from your local applications on the remote computer. By default,
stream.sh uses WAVE in a RIFF container - this provides a high
quality, low-latency solution. In case your network isn't fast
enough to support raw audio data, you can specify a codec and
bitrate:
```
./stream.sh client 10.21.37.1 1337 libopus 64
```
If you're insane enough to use pulseaudio on a daily basis,
you can use `paprefs` to enable RTP Multicast (don't forget
to check the "fixed port" checkbox) - it should work out of
the box.
# debugging
stream.sh has a built-in benchmarking functionality that tries to
guess the correct timings for your hardware. If this is inaccurate
and you hear pops, or the audio drops off completely every ~60s,
you may want to run
```
./stream.sh benchmark ffmpeg
```
and modify the delay variable in the `USER-CONFIGURABLE VARIABLES`
section of stream.sh
# building
```
./pack.sh > stream.sh
```