mirror of
https://github.com/jketterl/openwebrx.git
synced 2026-02-28 18:44:26 +01:00
Fix DAB audio pipeline using ffmpeg for resampling
This commit is contained in:
parent
640c5b0b3e
commit
d9fb221f34
30
Dockerfile.hotfix
Normal file
30
Dockerfile.hotfix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# Stage 1: Build dablin from source
|
||||
FROM debian:bookworm-slim AS builder
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git cmake make g++ \
|
||||
pkg-config libncurses-dev libsdl2-dev \
|
||||
libfaad-dev libmpg123-dev libfftw3-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN git clone https://github.com/Opendigitalradio/dablin.git /src/dablin
|
||||
WORKDIR /src/dablin
|
||||
RUN mkdir build && cd build && cmake .. && make
|
||||
|
||||
# Stage 2: Final image (based on openwebrx base to ensure compatibility or full?)
|
||||
# Using jketterl/openwebrx:latest as base
|
||||
FROM jketterl/openwebrx:latest
|
||||
|
||||
# Install sox and runtime deps for dablin
|
||||
# libfaad2 is required. libmpg123-0 is likely required for new dablin.
|
||||
RUN apt-get update && apt-get install -y sox ffmpeg libfaad2 libmpg123-0 libsdl2-2.0-0 && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy new dablin binary
|
||||
COPY --from=builder /src/dablin/build/src/dablin /usr/local/bin/dablin
|
||||
|
||||
# Patch files
|
||||
COPY owrx/dab/dablin.py /opt/openwebrx/owrx/dab/dablin.py
|
||||
COPY csdr/chain/dablin.py /opt/openwebrx/csdr/chain/dablin.py
|
||||
|
||||
# Bytecode compile
|
||||
RUN python3 -m py_compile /opt/openwebrx/owrx/dab/dablin.py /opt/openwebrx/csdr/chain/dablin.py
|
||||
|
|
@ -21,7 +21,7 @@ function cmakebuild() {
|
|||
|
||||
cd /tmp
|
||||
|
||||
STATIC_PACKAGES="libfftw3-single3 libfftw3-double3 python3 python3-setuptools python3-paho-mqtt netcat-openbsd libsndfile1 liblapack3 libusb-1.0-0 libqt5core5a libreadline8 libgfortran5 libgomp1 libasound2 libudev1 ca-certificates libpulse0 libfaad2 libopus0 libboost-program-options1.74.0 libboost-log1.74.0 libcurl4 libncurses6 libliquid1 libconfig++9v5"
|
||||
STATIC_PACKAGES="libfftw3-single3 libfftw3-double3 python3 python3-setuptools python3-paho-mqtt netcat-openbsd libsndfile1 liblapack3 libusb-1.0-0 libqt5core5a libreadline8 libgfortran5 libgomp1 libasound2 libudev1 ca-certificates libpulse0 libfaad2 libopus0 libboost-program-options1.74.0 libboost-log1.74.0 libcurl4 libncurses6 libliquid1 libconfig++9v5 sox"
|
||||
BUILD_PACKAGES="wget git libsndfile1-dev libfftw3-dev cmake make gcc g++ liblapack-dev texinfo gfortran libusb-1.0-0-dev qtbase5-dev qtmultimedia5-dev qttools5-dev libqt5serialport5-dev qttools5-dev-tools asciidoctor asciidoc libasound2-dev libudev-dev libhamlib-dev patch xsltproc qt5-qmake libfaad-dev libopus-dev libboost-dev libboost-program-options-dev libboost-log-dev libboost-regex-dev libpulse-dev libcurl4-openssl-dev libncurses-dev xz-utils libliquid-dev libconfig++-dev autoconf automake"
|
||||
apt-get update
|
||||
apt-get -y install auto-apt-proxy
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class DablinModule(ExecModule):
|
|||
)
|
||||
|
||||
def _buildArgs(self):
|
||||
return ["dablin", "-p", "-s", "{:#06x}".format(self.serviceId)]
|
||||
return ["bash", "-c", "dablin -u -s {:#06x} | ffmpeg -v error -i pipe:0 -f f32le -ar 48000 -ac 2 pipe:1".format(self.serviceId)]
|
||||
|
||||
def setDabServiceId(self, serviceId: int) -> None:
|
||||
self.serviceId = serviceId
|
||||
|
|
|
|||
Loading…
Reference in a new issue