README.md 3.33 KB
Newer Older
1
2
3
4
5
6
7
8
# AURA Engine

This piece of Software is part of 'AURA - AUtomated RAdio'. 

AURA Engine does:
 * requesting the programme from an external Source
 * switches the soundserver at the correct time to a given source for a specific show 
 * records what is broadcasted
9
10
 * streams to an icecast server
 * plays to lineout
11
12
13
14
15
16
17

## Installation

### Software

#### Operating System

18
Any linux system with ALSA, pulseaudio or Jack2 support should work. It is tested and coded on a **debian stretch**
19
20
21
22
23
24

#### Packages

On a debian machine:

```bash
25
26
27
sudo apt install \
    git \
    python3 python3-pip \
28
    redis-server \
29
    liquidsoap liquidsoap-plugin-alsa liquidsoap-plugin-flac liquidsoap-plugin-icecast liquidsoap-plugin-pulseaudio \
30
31
    mariadb-server libmariadbclient-dev \
    quelcom
32
33
```

34

35
36
#### Python Packages

Gottfried Gaisbauer's avatar
Gottfried Gaisbauer committed
37
```bash
38
sudo pip3 install \
39
40
41
    Flask Flask-SQLAlchemy \
    mysqlclient redis simplejson \
    mutagen validators
42
43
```

44
#### Grab the code
45

46
```bash
47
git clone https://gitlab.servus.at/autoradio/engine
48
```
49

50
#### Set up a database
51

52
53
##### Command line way 

Gottfried Gaisbauer's avatar
Gottfried Gaisbauer committed
54
```bash
55
56
mysql -u root -p

Gottfried Gaisbauer's avatar
Gottfried Gaisbauer committed
57
58
59
CREATE DATABASE aura_engine CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;  
CREATE USER 'aura'@'localhost' IDENTIFIED BY 'secure-password';  
GRANT ALL PRIVILEGES ON aura_engine.* TO 'aura'@'localhost';  
Gottfried Gaisbauer's avatar
Gottfried Gaisbauer committed
60
```
61

62
63
64
65
##### phpmyadmin / adminer way

Log into your phpmyadmin or adminer with correct privileges and create a database and a user for the aura engine.

Gottfried Gaisbauer's avatar
Gottfried Gaisbauer committed
66
#### Files and Folders
67

68
* Create the audio folder defined in your aura.ini
Gottfried Gaisbauer's avatar
Gottfried Gaisbauer committed
69
70

```bash
71
72
mkdir /var/audio
mkdir /etc/aura
73
74
cp {where you cloned the repo}/configuration/engine.ini /etc/aura/engine.ini
edit engine.ini to your needs
Gottfried Gaisbauer's avatar
Gottfried Gaisbauer committed
75
```
76

77
* Edit settings in aura.ini. Take your time for that.
78

79
80
#### aura.py

81
It is the server which is connected to the external programme source (e.g. aura steering and tank), to liquidsoap and is listening for redis pubsub messages. This precious little server is telling liquidsoap what to play and when.
82
83
84

#### Guru

85
The commandline tool for interacting with the server. Also provides the communication from Liquidsoap to the python (Command-)Server.
86
87
88

#### Liquidsoap

89
90
91
92
93
94
The heart of AURA Engine. It uses the built in mixer, to switch between different sources.

#### Find Help

LiquidSoap Reference: http://savonet.sourceforge.net/doc-svn/reference.html
Python3.5 Reference: https://docs.python.org/3.5/ 
95
96
97

### Hardware

98
#### Soundcard
Gottfried Gaisbauer's avatar
newline    
Gottfried Gaisbauer committed
99

100
AURA Engine ist tested with a ASUS Xonar DGX and a Roland Duo-Capture Ex. Both work well with jack and pulseaudio. For good experience with ALSA, you may need better hardware.
101

102
#### Hard/Soft
Gottfried Gaisbauer's avatar
newline    
Gottfried Gaisbauer committed
103
104

When you use ALSA, you will have to play around with ALSA settings. In the folder ./modules/liquidsoap is a scipt called alsa_settings_tester.liq. You can start it with 'liquidsoap -v --debug alsa_settings_tester.liq'. Changing and playing with settings can help you to find correct ALSA settings. 
105
106
107

### Recordings

108
You can configure up to five recorders. You find the settings in the main config file engine.ini. You can choose between different output formats.
109
110
111

### Streams

112
You can configure up to five streams. You find the settings in the engine.ini. You can choose between different streaming formats.
113
114
115

If you experience 'hangs' on the stream
 * reduce the quality or
116
 * install the realtime kernel with
117
118
119
120
   ```bash
   apt install linux-image-rt-amd64
   reboot
   ```
121
122
   or
 * invest in better hardware