2023-10-10 02:56:02 +02:00
|
|
|
# pulseaudio-tcp - Redirect PulseAudio to and from Remote Computer
|
2023-10-08 22:09:08 +02:00
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
|
|
|
### Dependencies
|
|
|
|
|
|
|
|
* jq
|
|
|
|
* Audio subsystem:
|
|
|
|
- PulseAudio or
|
2023-10-10 03:08:05 +02:00
|
|
|
- Pipewire with PulseAudio compatibility (`pipewire-pulse`).
|
|
|
|
- On the local host `pactl` must be of version 16 or later (required for option `--format json`).
|
2023-10-08 22:09:08 +02:00
|
|
|
|
2023-10-10 03:08:05 +02:00
|
|
|
### Requirements to Local and Remote Host
|
2023-10-08 22:09:08 +02:00
|
|
|
|
|
|
|
* pulseaudio-tcp should be installed on a computer running PulseAudio or Pipewire with PulseAudio compatibility.
|
2023-10-10 03:08:05 +02:00
|
|
|
- This computer is in the following referred to as the "local host".
|
|
|
|
* The local host should use use a remote computer for playback.
|
|
|
|
- The remote computer is referred to as the "remote host".
|
|
|
|
- This mode of operation is referred to as "outbound" audio.
|
2023-10-10 02:56:02 +02:00
|
|
|
* The local host should receive audio from the remote host for recording.
|
2023-10-10 03:08:05 +02:00
|
|
|
- This mode of operation is referred to as "inbound" audio.
|
|
|
|
* The IP address of the remote host and the name of a user running a PulseAudio/Pipewire session there should be known.
|
|
|
|
* The remote host should allow login by the remote user with SSH.
|
2023-10-08 22:09:08 +02:00
|
|
|
|
|
|
|
### SSH to User Session on Remote Host
|
|
|
|
|
2023-10-10 03:08:05 +02:00
|
|
|
The user on the local host should have password-less SSH to the user on the remote host (required for encryption with SSH port forwarding):
|
2023-10-08 22:09:08 +02:00
|
|
|
|
|
|
|
```shell
|
2023-10-10 03:08:05 +02:00
|
|
|
ssh-copy-id $remote_user@$remote_ip
|
2023-10-08 22:09:08 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
```shell
|
|
|
|
git clone https://tk-sls.de/git/tk-sls.de/pulseaudio-tcp.git
|
|
|
|
cd pulseaudio-tcp
|
|
|
|
sudo make install
|
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2023-10-10 02:56:02 +02:00
|
|
|
### Setup Procedure
|
2023-10-08 22:09:08 +02:00
|
|
|
|
2023-10-10 03:08:05 +02:00
|
|
|
A user on local host running the PulseAudio/Pipewire session, execute:
|
2023-10-08 22:09:08 +02:00
|
|
|
|
|
|
|
```shell
|
|
|
|
pulseadio-tcp setup
|
|
|
|
```
|
|
|
|
|
2023-10-10 02:56:02 +02:00
|
|
|
The following questions will be asked:
|
|
|
|
|
|
|
|
* IP address of remote host.
|
|
|
|
* Name of user on remote host running PulseAudio/Pipewire.
|
|
|
|
* Enable inbound audio.
|
|
|
|
* Enable outbound audio.
|
|
|
|
|
|
|
|
### Configuration File
|
|
|
|
|
|
|
|
The setup procedure writes a configuration file `$HOME/.config/pulseaudio-tcp/config.inc.sh`:
|
|
|
|
|
|
|
|
```
|
|
|
|
remote_ip="192.168.1.166"
|
|
|
|
remote_user="remoteuser"
|
|
|
|
inbound=true
|
|
|
|
outbound=true
|
|
|
|
```
|
|
|
|
|
|
|
|
### Starting the Service
|
2023-10-08 22:09:08 +02:00
|
|
|
|
2023-10-10 03:08:05 +02:00
|
|
|
A user on local host running the PulseAudio/Pipewire session, execute:
|
|
|
|
|
2023-10-08 22:09:08 +02:00
|
|
|
```shell
|
|
|
|
pulseadio-tcp start
|
|
|
|
```
|
|
|
|
|
2023-10-10 02:56:02 +02:00
|
|
|
### Stopping the Service
|
2023-10-08 22:09:08 +02:00
|
|
|
|
2023-10-10 03:08:05 +02:00
|
|
|
A user on local host running the PulseAudio/Pipewire session, execute:
|
|
|
|
|
2023-10-08 22:09:08 +02:00
|
|
|
```shell
|
|
|
|
pulseadio-tcp stop
|
|
|
|
```
|
|
|
|
|
2023-10-10 02:56:02 +02:00
|
|
|
### Checking if the Service is running
|
2023-10-08 22:09:08 +02:00
|
|
|
|
2023-10-10 03:08:05 +02:00
|
|
|
A user on local host running the PulseAudio/Pipewire session, execute:
|
|
|
|
|
2023-10-08 22:09:08 +02:00
|
|
|
```shell
|
|
|
|
pulseadio-tcp status
|
|
|
|
```
|
|
|
|
|
|
|
|
## Author and Copyright
|
|
|
|
|
2023-10-08 22:17:33 +02:00
|
|
|
© 2023 Tilman Kranz <t.kranz@tk-sls.de>
|
2023-10-08 22:09:08 +02:00
|
|
|
|
2023-10-08 22:17:33 +02:00
|
|
|
Please see the file LICENSE for terms and conditions of use and distribution.
|