Fix DAB+ audio sample rate issues using ffmpeg resampling#419
Fix DAB+ audio sample rate issues using ffmpeg resampling#419dom-robinson wants to merge 7 commits intojketterl:developfrom
Conversation
…l#419) - owrx/dab/dablin.py: pipe dablin output through ffmpeg to resample to 48kHz - docker/scripts/install-dependencies.sh: add sox to static packages - Dockerfile.hotfix: optional hotfix image with dablin from source + ffmpeg/sox Upstream PR: jketterl#419
…nput fix - Default: dablin -w so ffmpeg reads rate and channels from WAV header; all DAB+ services (24/32/48 kHz, mono/stereo) play at correct speed. - Fallback: OPENWEBRX_DAB_USE_WAV=0 uses PCM path with OPENWEBRX_DAB_INPUT_RATE (24000|32000|48000). - Fix: treat dablin output as stereo (-ac 2); mono caused consistently slow playback. - Optional OPENWEBRX_DAB_CAPTURE_RAW=1 for raw PCM capture (PCM path). - README-FORK.md: document env vars and behaviour.
|
Improvement (tested on dom-robinson/openwebrx
Changes are in dom-robinson/openwebrx branch |
- waterfall_add: call add_canvas() before canvas_context check so first canvas is created and waterfall can start - Keep defensive null checks for divlog, scale_setup, init_canvas_container, networkSpeedMeasurement, add_canvas (for missing DOM)
|
Sorry, but I'm not merging this in its current state, for multiple reasons. First of all, what's with all the frontend changes? You're not explaining any of them, they should not be necessary for this. Second, the dependency management is all over the place. You're installing And lastly, |
|
Fair enough. Sox was left over from an initial experiment. Front end tweaks were simply smoothing behaviour. csdr wasn't working. But I admit this was a feature hack in. Perhaps put it down to a feature request to fix the sample rate support. |
Hi folks - I was frustrated at the inabilyt to listen to 32k (and other non-48kHz DAB stations (the majority of DAB+ stations).
I fixed my local system and figure i would share the solution as a PR incase it is of wider value.
Description
This PR addresses an issue where DAB+ audio streams with sample rates other than 48kHz (common with 32kHz DAB+ broadcasts) would play at the incorrect speed ("chipmunk effect") in the web client, as OpenWebRX expects a consistent 48kHz input.
Changes
Pipeline Update (owrx/dab/dablin.py): Modified the dablin command execution to pipe its output through ffmpeg. This forces an explicit resample to 48kHz (f32le) before passing the data to the OpenWebRX audio chain.
Dependencies (docker/scripts/install-dependencies.sh): Added sox to the dependency list (useful for audio debugging/transcoding) and relies on ffmpeg for the runtime pipeline (which is typically available or easily added).
Evaluation
Verified on a Docker deployment (Raspberry Pi / ARM64). Stations that previously played with speed artifacts now play correctly.
Related Issues
Fixes audio synchronization for non-48kHz DAB stations.