Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
netham45 committed Sep 19, 2024
1 parent 178dfb0 commit 6bb92ff
Show file tree
Hide file tree
Showing 18 changed files with 598 additions and 280 deletions.
76 changes: 68 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### What is ScreamRouter

ScreamRouter is a versatile audio routing and management system with a Python frontend/configuration layer and a C++ backend, designed for network audio streaming. It supports Scream and RTP audio sources, along with Scream receivers and web-based MP3 streamers.
ScreamRouter is a versatile audio routing and management system with a Python frontend/configuration layer and C++ backend, designed for network audio streaming. It supports Scream and RTP audio sources, along with Scream receivers and web-based MP3 streamers.

### Key Features of ScreamRouter

Expand All @@ -16,7 +16,7 @@ ScreamRouter is a versatile audio routing and management system with a Python fr
* Volume control at every level: Source, Route, Sink, and Group

#### Audio Processing and Playback
* Custom mixer/equalizer/channel layout processor for minimal latency
* Custom mixer/equalizer/channel layout processor for minimal latency, implemented in both Python and C++
* Adjustable equalization for any sink, route, source, or group
* MP3 stream exposure for browser-based listening of all sinks
* URL playback capability for sinks or sink groups
Expand All @@ -29,8 +29,10 @@ ScreamRouter is a versatile audio routing and management system with a Python fr

#### System Management
* Automatic YAML saving on setting changes
* Flexible plugin system for easy addition of new sources
* Flexible plugin system for easy addition of new sources and functionalities
* API and web interface for media control commands to containers
* Advanced configuration management and solving system
* Comprehensive logging system

#### Sources
* RTP/Linux Source
Expand All @@ -50,7 +52,6 @@ ScreamRouter is a versatile audio routing and management system with a Python fr
* Android Receiver
* Python Scream Receiver


## Use Cases

### Comprehensive Whole-House Audio Systems
Expand Down Expand Up @@ -100,7 +101,7 @@ Utilize built-in equalization tools to optimize audio output, particularly benef
- Details on the custom mixer/equalizer/channel layout processor

* [Configuration](Readme/configuration.md)
- Description of ScreamRouter's routing configuration
- Description of ScreamRouter's routing configuration and configuration management system

### Senders

Expand Down Expand Up @@ -165,8 +166,11 @@ Utilize built-in equalization tools to optimize audio output, particularly benef
* [Swagger Documentation](https://netham45.org/wp-content/uploads/screamrouter-docs/)
- Swagger Docs for ScreamRouter API

* [API Structure](Readme/api.md)
- Overview of the API structure and available endpoints

* [Plugins System](Readme/plugins.md)
- Documentation on the flexible plugin system for adding new sources
- Documentation on the flexible plugin system for adding new sources and functionalities

* [Source Command Receiver](Readme/command_receiver.md)
- Information about the command receiver module for remote control
Expand All @@ -182,9 +186,65 @@ ScreamRouter is aiming to be accessible to those with visual impairments. To thi

If you encounter any issues affecting accessibility please file an issue on Github.


## Example Devices

### ESP32S3 Portable Receiver

![Portable ESP32S3 Scream Receiver](/images/esp32s3_receiver.jpg)
![Portable ESP32S3 Scream Receiver](/images/esp32s3_receiver.jpg)

## Technical Details

### Audio Processing Capabilities

ScreamRouter supports various audio formats and processing capabilities:

- Input formats: Scream, RTP
- Output formats: PCM, MP3
- Sample rates: Configurable, typically 44.1kHz, 48kHz
- Bit depths: 16-bit, 24-bit, 32-bit LPCM
- Channel layouts: Stereo, 5.1 surround, 7.1 surround (configurable)
- Equalization: 18-band equalizer for each sink, route, source, or group

### Backend Implementation

ScreamRouter uses a hybrid backend approach:

- Python: Used for high-level logic, configuration management, and some audio processing tasks
- C/C++: Implemented for performance-critical audio processing tasks, ensuring low latency

### Configuration Management

The configuration management system includes:

- YAML-based configuration files
- Automatic saving of configuration changes
- Configuration solver for resolving complex routing scenarios

### Logging System

ScreamRouter includes a comprehensive logging system for debugging and monitoring:

- Configurable log levels
- Separate logs for different components (audio processing, network, plugins, etc.)
- Rotation of log files to manage disk usage

### Network Communication

- TCP manager for handling network communications
- Support for multicast and unicast audio streaming

### Plugin System

The flexible plugin system allows for easy extension of ScreamRouter's capabilities:

- Support for adding new audio sources
- Custom audio processing plugins
- Integration with external services and devices

Current plugins include:
- play_url: Allows playing audio from arbitrary URLs
- play_url_multiple: Enables playing multiple URLs simultaneously

Developers can create new plugins to extend functionality further.

For more detailed technical information, please refer to the source code and individual documentation files in the project repository.
12 changes: 8 additions & 4 deletions Readme/chrome-app-manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,25 @@

## Overview

![ScreamRouter Chrome App](/images/ChromeAppView.png)
ScreamRouter, a versatile audio routing and management system, can run as a Progressive Web App (PWA). This feature enhances the user experience by allowing quick access to key functions through app shortcuts, and allowing the application to run as its own app on Android or in its own window on PC.

ScreamRouter can run as a Progressive Web App (PWA). This feature enhances the user experience by allowing quick access to key functions through app shortcuts, and allowing the application to run as it's own app on Android or in it's own window on PC.
![ScreamRouter Chrome App](../images/ChromeAppView.png)

For more information about ScreamRouter and its features, please refer to the [main README](../README.md).

## Usage

To use the ScreamRouter Chrome App, you can install it from Chrome's menu. ![Chrome menu install Windows](/images/ChromeAppInstall.png)
To use the ScreamRouter Chrome App, you can install it from Chrome's menu.

![Chrome menu install Windows](../images/ChromeAppInstall.png)

It is also available for Chrome on Android.

<img src="../images/ChromeAndroidInstall.jpg" alt="Chrome menu install Android" width="30%">

## App Shortcuts

![Chrome shortcuts](/images/ChromeShortcuts.png)
![Chrome shortcuts](../images/ChromeShortcuts.png)

* Shortcuts are only available on Desktop

Expand Down
40 changes: 26 additions & 14 deletions Readme/command_receiver.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
## Media Controls
# ScreamRouter Media Controls

ScreamRouter provides remote media control functionality, allowing users to send commands to audio sources for a seamless listening experience.
## Overview

ScreamRouter, a versatile audio routing and management system, provides remote media control functionality. This feature allows users to send commands to audio sources for a seamless listening experience, enhancing the overall usability of the system.

## Supported Commands

ScreamRouter supports the following media control commands:

### Supported Commands
These commands are transmitted as UDP packets to the audio sources:
- Next Track: 'n'
- Previous Track: 'p'
- Play/Pause: 'P'

### Technical Details
- Port: Commands are sent to port 9999 on the configured VNC server
- Protocol: UDP
- Packet Content: Single character representing the command
These commands are transmitted as UDP packets to the audio sources.

## Technical Details

- **Port**: Commands are sent to port 9999 on the configured VNC server
- **Protocol**: UDP
- **Packet Content**: Single character representing the command

## User Interface Integration

Media control buttons are visible and accessible in the ScreamRouter user interface, provided that a VNC host is configured. This allows users to control their media playback directly from the ScreamRouter interface.

If a source with VNC is selected in the UI, the system's global media controls will control that source's media playback. This feature is also integrated with the Chrome App shortcuts, providing quick access to media controls when ScreamRouter is installed as a Progressive Web App (PWA).

### User Interface Integration
Media control buttons will be visible and accessible in the ScreamRouter user interface, provided that a VNC host is configured. This allows users to control their media playback directly from the ScreamRouter interface, enhancing the overall user experience. If a source with VNC is selected in the UI the system's global media controls will control that source's media playback.
## Implementation Scripts

### Bash script
### Bash Script (for Linux systems)

```bash
#!/bin/bash
Expand Down Expand Up @@ -45,11 +57,11 @@ do
done
```

### Powershell Script
### PowerShell Script (for Windows systems)

* [See repo with installer to run on login](https://github.com/netham45/win-scream-hotkey-receiver)
For a complete solution with an installer to run on login, see the [win-scream-hotkey-receiver repository](https://github.com/netham45/win-scream-hotkey-receiver).

```Powershell
```powershell
$ShowWindowAsync = Add-Type -MemberDefinition '[DllImport("user32.dll")] public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);' -name Win32ShowWindowAsync -namespace Win32Functions -PassThru
$KeybdEvent = Add-Type -MemberDefinition '[DllImport("user32.dll")] public static extern void keybd_event(byte bVk, byte bScan, uint dwFlags, int dwExtraInfo);' -name Win32KeybdEvent -namespace Win32Functions -PassThru
Expand Down
11 changes: 8 additions & 3 deletions Readme/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Key properties:
- Name
- IP address (for individual sources)
- Volume
- Equalizer settings
- Equalizer settings (18-band)
- Delay

## Sinks
Expand All @@ -31,9 +31,10 @@ Key properties:
- Name
- IP address and port (for individual sinks)
- Volume
- Equalizer settings
- Equalizer settings (18-band)
- Delay
- Audio format settings (bit depth, sample rate, channels)
- Supported sample rates: 44100, 48000, 88200, 96000, and 192000 Hz

## Routes

Expand All @@ -42,7 +43,7 @@ Routes define connections between sources and sinks. A route specifies:
- A source (individual or group)
- A sink (individual or group)
- Volume adjustment
- Equalizer adjustment
- Equalizer adjustment (18-band)
- Delay adjustment

## Interaction
Expand All @@ -60,3 +61,7 @@ This allows for flexible configuration:
- Adjustments can be applied at the route, group, or individual level

The ConfigurationManager class uses this solved configuration to set up and manage the actual audio controllers and routing.

## Configuration File

ScreamRouter uses a YAML-based configuration file to store all settings. The system automatically saves changes to this file whenever configuration updates are made, ensuring that your setup is always up-to-date and persistent across restarts.
20 changes: 15 additions & 5 deletions Readme/debian-screamrouter.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
# Debian ScreamRouter Installation Guid
# Debian ScreamRouter Installation Guide

This guide provides step-by-step instructions for installing ScreamRouter on a Debian-based system.
This guide provides step-by-step instructions for installing ScreamRouter on a Debian-based system. ScreamRouter is a versatile audio routing and management system designed for network audio streaming.

* Docker is recommended.
## System Requirements

- Debian-based Linux distribution
- Root or sudo access to your system

Note: While this guide is for a direct installation, Docker is recommended for easier setup and management.

## Prerequisites

Ensure you have root or sudo access to your Debian system.

## Installation Steps


1. Update the package sources and install required dependencies:

Run the following command to update the package sources and install necessary packages:
Expand Down Expand Up @@ -47,7 +51,7 @@ Ensure you have root or sudo access to your Debian system.
./build.sh
```

5. Generate a certifcate for HTTPS:
5. Generate a certificate for HTTPS:

Or provide your own in the cert/ folder

Expand All @@ -65,3 +69,9 @@ Ensure you have root or sudo access to your Debian system.
cd ~/screamrouter
./screamrouter.py
```

## Accessing ScreamRouter

After installation, you can access the ScreamRouter web interface by opening a web browser and navigating to `https://localhost` (or replace `localhost` with your server's IP address if accessing from another device). Make sure to accept the self-signed certificate warning if you generated your own certificate.

For more information on using ScreamRouter and its features, please refer to the [main README](../README.md) and other documentation files in the Readme directory.
56 changes: 51 additions & 5 deletions Readme/docker-screamrouter.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,70 @@
# ScreamRouter Docker

There is a basic Docker container to build and run ScreamRouter available.
ScreamRouter can be run in a Docker container, which provides an isolated and consistent environment for the application. This method is recommended for easier setup and management, especially for users who are familiar with Docker.

## Prerequisites

- Docker installed on your system
- Basic knowledge of Docker commands

## Building the Docker Image
## Docker Image

The ScreamRouter Docker image is based on Debian and includes all necessary dependencies and components to run ScreamRouter. The Docker container scripts are located in a separate repository: [screamrouter-docker](https://github.com/netham45/screamrouter-docker/).

The Docker Container scripts are located in the [screamrouter-docker](https://github.com/netham45/screamrouter-docker/) repository.
## Building the Docker Image

To build the ScreamRouter Docker image, run:
To build the ScreamRouter Docker image, navigate to the screamrouter-docker repository and run:

```bash
./build.sh
```

To run the ScreamRouter Docker image, run:
This script will build the Docker image with the latest version of ScreamRouter.

## Running the Docker Container

To run the ScreamRouter Docker container, use:

```bash
./run.sh
```

This script will start the ScreamRouter container, mapping the necessary ports and volumes.

## Accessing ScreamRouter

After the container is running, you can access the ScreamRouter web interface by opening a web browser and navigating to `https://localhost` (or replace `localhost` with your server's IP address if accessing from another device). You may need to accept the self-signed certificate warning.

## Persisting Configuration

The run script maps a volume to persist ScreamRouter's configuration. By default, this is mapped to `./config` in the directory where you run the script. This ensures that your settings are saved even if the container is stopped or restarted.

## Stopping and Restarting the Container

To stop the ScreamRouter container, you can use:

```bash
docker stop screamrouter
```

To restart the container:

```bash
docker start screamrouter
```

Or, you can use the `run.sh` script again, which will stop any existing container and start a new one.

## Updating ScreamRouter

To update to the latest version of ScreamRouter, you'll need to rebuild the Docker image. Stop the current container, then run the build and run scripts again:

```bash
docker stop screamrouter
./build.sh
./run.sh
```

This will create a new image with the latest ScreamRouter code and start a new container.

For more information on using ScreamRouter and its features, please refer to the [main README](../README.md) and other documentation files in the Readme directory.
Loading

0 comments on commit 6bb92ff

Please sign in to comment.