From 02cb9c751a4850898c3bf925345c8828830b3c34 Mon Sep 17 00:00:00 2001 From: Smittix Date: Tue, 6 Jan 2026 20:53:54 +0000 Subject: [PATCH] Fix audio dependency to use ffmpeg instead of sox MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Listening Post actually uses ffmpeg for audio encoding, not sox. Updated all documentation, setup scripts, and code to reflect this: - Removed unused find_sox() function from listening_post.py - Simplified tools endpoint to only check for ffmpeg - Updated CHANGELOG, README, HARDWARE.md, Dockerfile - Fixed setup.sh to check for ffmpeg - Updated frontend warnings to mention ffmpeg 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- CHANGELOG.md | 8 ++++---- Dockerfile | 3 +-- README.md | 4 ++-- docs/HARDWARE.md | 6 +++--- routes/listening_post.py | 9 +-------- setup.sh | 18 +++++++----------- templates/adsb_dashboard.html | 4 ++-- templates/index.html | 8 ++++---- 8 files changed, 24 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 65034b7..f6fe950 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,13 +7,13 @@ All notable changes to INTERCEPT will be documented in this file. ### Added - **Listening Post Mode** - New frequency scanner with automatic signal detection - Scans frequency ranges and stops on detected signals - - Real-time audio monitoring with sox integration + - Real-time audio monitoring with ffmpeg integration - Skip button to continue scanning after signal detection - Configurable dwell time, squelch, and step size - Preset frequency bands (FM broadcast, Air band, Marine, etc.) - Activity log of detected signals - **Aircraft Dashboard Improvements** - - Dependency warning when rtl_fm or sox not installed + - Dependency warning when rtl_fm or ffmpeg not installed - Auto-restart audio when switching frequencies - Fixed toolbar overflow with custom frequency input - **Device Correlation** - Match WiFi and Bluetooth devices by manufacturer @@ -29,10 +29,10 @@ All notable changes to INTERCEPT will be documented in this file. - **Setup Script Rewrite** - Full macOS support with Homebrew auto-installation - Improved Debian/Ubuntu package detection - - Added sox to tool checks + - Added ffmpeg to tool checks - Better error messages with platform-specific install commands - **Dockerfile Updated** - - Added sox and libsox-fmt-all for Listening Post audio + - Added ffmpeg for Listening Post audio encoding - Added dump1090 with fallback for different package names ### Fixed diff --git a/Dockerfile b/Dockerfile index 4a22cd6..d702409 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,8 +20,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ # Pager decoder multimon-ng \ # Audio tools for Listening Post - sox \ - libsox-fmt-all \ + ffmpeg \ # WiFi tools (aircrack-ng suite) aircrack-ng \ iw \ diff --git a/README.md b/README.md index d28fa3f..01fae60 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ **2. Install dependencies:** ```bash # Required -brew install python@3.11 librtlsdr multimon-ng rtl_433 sox +brew install python@3.11 librtlsdr multimon-ng rtl_433 ffmpeg # For ADS-B aircraft tracking brew install dump1090-mutability @@ -66,7 +66,7 @@ sudo apt update sudo apt install -y python3 python3-pip python3-venv git # Required SDR tools -sudo apt install -y rtl-sdr multimon-ng rtl-433 sox +sudo apt install -y rtl-sdr multimon-ng rtl-433 ffmpeg # For ADS-B aircraft tracking (package name varies) sudo apt install -y dump1090-mutability # or dump1090-fa diff --git a/docs/HARDWARE.md b/docs/HARDWARE.md index 11eec27..f67a572 100644 --- a/docs/HARDWARE.md +++ b/docs/HARDWARE.md @@ -21,7 +21,7 @@ INTERCEPT automatically detects connected devices. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # Core tools (required) -brew install python@3.11 librtlsdr multimon-ng rtl_433 sox +brew install python@3.11 librtlsdr multimon-ng rtl_433 ffmpeg # ADS-B aircraft tracking brew install dump1090-mutability @@ -44,7 +44,7 @@ sudo apt update # Core tools (required) sudo apt install -y python3 python3-pip python3-venv -sudo apt install -y rtl-sdr multimon-ng rtl-433 sox +sudo apt install -y rtl-sdr multimon-ng rtl-433 ffmpeg # ADS-B aircraft tracking sudo apt install -y dump1090-mutability @@ -162,7 +162,7 @@ Open **http://localhost:5050** in your browser. | `multimon-ng` | multimon-ng | multimon-ng | Pager decoding | | `rtl_433` | rtl-433 | rtl_433 | 433MHz sensors | | `dump1090` | dump1090-mutability | dump1090-mutability | ADS-B tracking | -| `sox` | sox | sox | Listening Post audio | +| `ffmpeg` | ffmpeg | ffmpeg | Listening Post audio | | `airmon-ng` | aircrack-ng | aircrack-ng | WiFi monitor mode | | `airodump-ng` | aircrack-ng | aircrack-ng | WiFi scanning | | `aireplay-ng` | aircrack-ng | aircrack-ng | WiFi deauth (optional) | diff --git a/routes/listening_post.py b/routes/listening_post.py index 311382b..1b173dd 100644 --- a/routes/listening_post.py +++ b/routes/listening_post.py @@ -79,9 +79,6 @@ def find_ffmpeg() -> str | None: return shutil.which('ffmpeg') -def find_sox() -> str | None: - """Find sox for audio encoding.""" - return shutil.which('sox') def add_activity_log(event_type: str, frequency: float, details: str = ''): @@ -450,15 +447,11 @@ def check_tools() -> Response: """Check for required tools.""" rtl_fm = find_rtl_fm() ffmpeg = find_ffmpeg() - sox = find_sox() - can_stream = ffmpeg is not None or sox is not None return jsonify({ 'rtl_fm': rtl_fm is not None, 'ffmpeg': ffmpeg is not None, - 'sox': sox is not None, - 'can_stream': can_stream, - 'available': rtl_fm is not None and can_stream + 'available': rtl_fm is not None and ffmpeg is not None }) diff --git a/setup.sh b/setup.sh index 80b3871..f529c72 100755 --- a/setup.sh +++ b/setup.sh @@ -179,11 +179,7 @@ check_tools() { echo "" echo "Audio Tools:" - check_tool "sox" "Audio player/processor" "audio" - # ffmpeg is optional alternative to sox - if check_cmd ffmpeg; then - echo -e " ${GREEN}✓${NC} ffmpeg - Audio encoder (optional)" - fi + check_tool "ffmpeg" "Audio encoder for streaming" "audio" echo "" echo "WiFi Tools:" @@ -258,7 +254,7 @@ install_macos_tools() { echo "" echo -e "${YELLOW}The following will be installed:${NC}" $MISSING_CORE && echo " - Core SDR tools (rtl-sdr, multimon-ng, rtl_433, dump1090)" - $MISSING_AUDIO && echo " - Audio tools (sox)" + $MISSING_AUDIO && echo " - Audio tools (ffmpeg)" $MISSING_WIFI && echo " - WiFi tools (aircrack-ng)" echo "" @@ -283,7 +279,7 @@ install_macos_tools() { if $MISSING_AUDIO; then echo "" echo -e "${BLUE}Installing Audio tools...${NC}" - brew install sox + brew install ffmpeg fi # WiFi tools @@ -305,7 +301,7 @@ show_macos_manual() { echo -e "${BLUE}Manual installation (macOS):${NC}" echo "" echo "# Required tools" - echo "brew install librtlsdr multimon-ng rtl_433 sox" + echo "brew install librtlsdr multimon-ng rtl_433 ffmpeg" echo "" echo "# ADS-B tracking" echo "brew install dump1090-mutability" @@ -329,7 +325,7 @@ install_debian_tools() { echo -e "${YELLOW}The following will be installed:${NC}" $MISSING_CORE && echo " - Core SDR tools (rtl-sdr, multimon-ng, rtl-433, dump1090)" - $MISSING_AUDIO && echo " - Audio tools (sox)" + $MISSING_AUDIO && echo " - Audio tools (ffmpeg)" $MISSING_WIFI && echo " - WiFi tools (aircrack-ng)" $MISSING_BLUETOOTH && echo " - Bluetooth tools (bluez)" echo "" @@ -376,7 +372,7 @@ install_debian_tools() { if $MISSING_AUDIO; then echo "" echo -e "${BLUE}Installing Audio tools...${NC}" - $SUDO apt install -y sox + $SUDO apt install -y ffmpeg fi # WiFi tools @@ -408,7 +404,7 @@ show_debian_manual() { echo -e "${BLUE}Manual installation (Debian/Ubuntu):${NC}" echo "" echo "# Required tools" - echo "sudo apt install rtl-sdr multimon-ng rtl-433 sox" + echo "sudo apt install rtl-sdr multimon-ng rtl-433 ffmpeg" echo "" echo "# ADS-B tracking" echo "sudo apt install dump1090-mutability # or dump1090-fa" diff --git a/templates/adsb_dashboard.html b/templates/adsb_dashboard.html index ff3d222..842fb73 100644 --- a/templates/adsb_dashboard.html +++ b/templates/adsb_dashboard.html @@ -1780,7 +1780,7 @@ sudo make install .then(data => { const missingTools = []; if (!data.rtl_fm) missingTools.push('rtl_fm'); - if (!data.sox) missingTools.push('sox (audio player)'); + if (!data.ffmpeg) missingTools.push('ffmpeg (audio encoder)'); if (missingTools.length > 0) { document.getElementById('airbandBtn').disabled = true; @@ -1825,7 +1825,7 @@ sudo make install
⚠️ Airband Listen Unavailable
Missing required tools: ${toolList}
- Install with: sudo apt install rtl-sdr sox (Debian) or brew install librtlsdr sox (macOS) + Install with: sudo apt install rtl-sdr ffmpeg (Debian) or brew install librtlsdr ffmpeg (macOS)
`; diff --git a/templates/index.html b/templates/index.html index 0750d9e..505b6dd 100644 --- a/templates/index.html +++ b/templates/index.html @@ -8775,7 +8775,7 @@ // ============================================ let isAudioPlaying = false; - let audioToolsAvailable = { rtl_fm: false, audio_player: false }; + let audioToolsAvailable = { rtl_fm: false, ffmpeg: false }; // Web Audio API for visualization let visualizerContext = null; @@ -8919,14 +8919,14 @@ .then(r => r.json()) .then(data => { audioToolsAvailable.rtl_fm = data.rtl_fm; - audioToolsAvailable.can_stream = data.can_stream; + audioToolsAvailable.ffmpeg = data.ffmpeg; const warnings = []; if (!data.rtl_fm) { warnings.push('rtl_fm not found - install rtl-sdr tools'); } - if (!data.can_stream) { - warnings.push('No audio encoder (ffmpeg/sox) - install: brew install ffmpeg (macOS) or apt install ffmpeg (Linux)'); + if (!data.ffmpeg) { + warnings.push('ffmpeg not found - install: brew install ffmpeg (macOS) or apt install ffmpeg (Linux)'); } const warningDiv = document.getElementById('audioToolsWarning');