Compare commits
3 Commits
6324f82789
...
b3a5dbb626
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3a5dbb626 | ||
|
|
44684ed020 | ||
|
|
5ff1d6273f |
14
Dockerfile
14
Dockerfile
@@ -26,9 +26,7 @@ RUN apt-get update && \
|
||||
libportaudio2 \
|
||||
libpulse-dev \
|
||||
apulse \
|
||||
ffmpeg \
|
||||
liquidsoap \
|
||||
supervisor
|
||||
ffmpeg
|
||||
|
||||
# Clone the boatbod op25 repository
|
||||
RUN git clone -b gr310 https://github.com/boatbod/op25 /op25
|
||||
@@ -39,9 +37,6 @@ WORKDIR /op25
|
||||
# Run the install script to set up op25
|
||||
RUN ./install.sh -f
|
||||
|
||||
# Update the liquid file
|
||||
COPY op25.liq /op25/op25.liq
|
||||
|
||||
# Install Python dependencies
|
||||
COPY requirements.txt /tmp/requirements.txt
|
||||
RUN pip3 install --no-cache-dir -r /tmp/requirements.txt
|
||||
@@ -71,8 +66,5 @@ COPY ./app/internal/opus /app/internal/opus
|
||||
# Copy the rest of the directory contents into the container at /app
|
||||
COPY ./app /app
|
||||
|
||||
# Add Supervisord configuration
|
||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
|
||||
# Modify the ENTRYPOINT to run Supervisord
|
||||
ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|
||||
# Run the node script
|
||||
ENTRYPOINT ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8001", "--reload"]
|
||||
15
op25-liq.service
Normal file
15
op25-liq.service
Normal file
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=op25-liq
|
||||
After=syslog.target network.target nss-lookup.target network-online.target
|
||||
Requires=network-online.target
|
||||
|
||||
[Service]
|
||||
User=1000
|
||||
Group=1000
|
||||
WorkingDirectory=/op25/op25/gr-op25_repeater/apps
|
||||
ExecStart=/usr/bin/liquidsoap op25.liq
|
||||
RestartSec=5
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
54
op25.liq
54
op25.liq
@@ -1,54 +0,0 @@
|
||||
#!/usr/bin/liquidsoap
|
||||
|
||||
# Example liquidsoap streaming from op25 to icecast
|
||||
# (c) 2019-2021 gnorbury@bondcar.com, wllmbecks@gmail.com
|
||||
#
|
||||
|
||||
set("log.stdout", true)
|
||||
set("log.file", false)
|
||||
set("log.level", 1)
|
||||
|
||||
# Make the native sample rate compatible with op25
|
||||
set("frame.audio.samplerate", 8000)
|
||||
|
||||
input = mksafe(input.external(buffer=0.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -x 1.5 -s"))
|
||||
# Consider increasing the buffer value on slow systems such as RPi3. e.g. buffer=0.25
|
||||
# Longer buffer results in less choppy audio but at the expense of increased latency.
|
||||
|
||||
|
||||
# OPTIONAL AUDIO SIGNAL PROCESSING BLOCKS
|
||||
# Uncomment to enable
|
||||
#
|
||||
# High pass filter
|
||||
#input = filter.iir.butterworth.high(frequency = 200.0, order = 4, input)
|
||||
|
||||
# Low pass filter
|
||||
#input = filter.iir.butterworth.low(frequency = 3250.0, order = 4, input)
|
||||
|
||||
# Compression
|
||||
input = compress(input, attack = 2.0, gain = 0.0, knee = 13.0, ratio = 2.0, release = 12.3, threshold = -18.0)
|
||||
|
||||
# Normalization
|
||||
input = normalize(input, gain_max = 6.0, gain_min = -6.0, target = -16.0, threshold = -65.0)
|
||||
|
||||
|
||||
# LOCAL AUDIO OUTPUT
|
||||
# Uncomment the appropriate line below to enable local sound
|
||||
#
|
||||
# Default audio subsystem
|
||||
#out (input)
|
||||
#
|
||||
# PulseAudio
|
||||
#output.pulseaudio(input)
|
||||
#
|
||||
# ALSA
|
||||
#output.alsa(input)
|
||||
|
||||
|
||||
|
||||
# ICECAST STREAMING
|
||||
# Uncomment to enable output to an icecast server
|
||||
# Change the "host", "password", and "mount" strings appropriately first!
|
||||
# For metadata to work properly, the host address given here MUST MATCH the address in op25's meta.json file
|
||||
#
|
||||
output.icecast(%mp3(bitrate=16, samplerate=22050, stereo=false), description="op25", genre="Public Safety", url="", fallible=false, host="localhost", port=8000, mount="mountpoint", password="hackme", mean(input))
|
||||
@@ -1,20 +0,0 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
|
||||
[program:op25-liq]
|
||||
command=/usr/bin/liquidsoap /op25/op25.liq
|
||||
directory=/op25
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stderr_logfile=/var/log/supervisor/op25-liq.err.log
|
||||
stdout_logfile=/var/log/supervisor/op25-liq.out.log
|
||||
user=root
|
||||
|
||||
[program:drb-client-discord]
|
||||
command=uvicorn main:app --host 0.0.0.0 --port 8001 --reload
|
||||
directory=/app
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stderr_logfile=/var/log/supervisor/main_app.err.log
|
||||
stdout_logfile=/var/log/supervisor/main_app.out.log
|
||||
user=root
|
||||
Reference in New Issue
Block a user