Fix audio dependency to use ffmpeg instead of sox

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 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-01-06 20:53:54 +00:00
parent a90674c3a9
commit e09c78de5d
8 changed files with 24 additions and 36 deletions
+4 -4
View File
@@ -7,13 +7,13 @@ All notable changes to INTERCEPT will be documented in this file.
### Added ### Added
- **Listening Post Mode** - New frequency scanner with automatic signal detection - **Listening Post Mode** - New frequency scanner with automatic signal detection
- Scans frequency ranges and stops on detected signals - 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 - Skip button to continue scanning after signal detection
- Configurable dwell time, squelch, and step size - Configurable dwell time, squelch, and step size
- Preset frequency bands (FM broadcast, Air band, Marine, etc.) - Preset frequency bands (FM broadcast, Air band, Marine, etc.)
- Activity log of detected signals - Activity log of detected signals
- **Aircraft Dashboard Improvements** - **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 - Auto-restart audio when switching frequencies
- Fixed toolbar overflow with custom frequency input - Fixed toolbar overflow with custom frequency input
- **Device Correlation** - Match WiFi and Bluetooth devices by manufacturer - **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** - **Setup Script Rewrite**
- Full macOS support with Homebrew auto-installation - Full macOS support with Homebrew auto-installation
- Improved Debian/Ubuntu package detection - Improved Debian/Ubuntu package detection
- Added sox to tool checks - Added ffmpeg to tool checks
- Better error messages with platform-specific install commands - Better error messages with platform-specific install commands
- **Dockerfile Updated** - **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 - Added dump1090 with fallback for different package names
### Fixed ### Fixed
+1 -2
View File
@@ -20,8 +20,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# Pager decoder # Pager decoder
multimon-ng \ multimon-ng \
# Audio tools for Listening Post # Audio tools for Listening Post
sox \ ffmpeg \
libsox-fmt-all \
# WiFi tools (aircrack-ng suite) # WiFi tools (aircrack-ng suite)
aircrack-ng \ aircrack-ng \
iw \ iw \
+2 -2
View File
@@ -41,7 +41,7 @@
**2. Install dependencies:** **2. Install dependencies:**
```bash ```bash
# Required # 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 # For ADS-B aircraft tracking
brew install dump1090-mutability brew install dump1090-mutability
@@ -66,7 +66,7 @@ sudo apt update
sudo apt install -y python3 python3-pip python3-venv git sudo apt install -y python3 python3-pip python3-venv git
# Required SDR tools # 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) # For ADS-B aircraft tracking (package name varies)
sudo apt install -y dump1090-mutability # or dump1090-fa sudo apt install -y dump1090-mutability # or dump1090-fa
+3 -3
View File
@@ -21,7 +21,7 @@ INTERCEPT automatically detects connected devices.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Core tools (required) # 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 # ADS-B aircraft tracking
brew install dump1090-mutability brew install dump1090-mutability
@@ -44,7 +44,7 @@ sudo apt update
# Core tools (required) # Core tools (required)
sudo apt install -y python3 python3-pip python3-venv 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 # ADS-B aircraft tracking
sudo apt install -y dump1090-mutability 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 | | `multimon-ng` | multimon-ng | multimon-ng | Pager decoding |
| `rtl_433` | rtl-433 | rtl_433 | 433MHz sensors | | `rtl_433` | rtl-433 | rtl_433 | 433MHz sensors |
| `dump1090` | dump1090-mutability | dump1090-mutability | ADS-B tracking | | `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 | | `airmon-ng` | aircrack-ng | aircrack-ng | WiFi monitor mode |
| `airodump-ng` | aircrack-ng | aircrack-ng | WiFi scanning | | `airodump-ng` | aircrack-ng | aircrack-ng | WiFi scanning |
| `aireplay-ng` | aircrack-ng | aircrack-ng | WiFi deauth (optional) | | `aireplay-ng` | aircrack-ng | aircrack-ng | WiFi deauth (optional) |
+1 -8
View File
@@ -79,9 +79,6 @@ def find_ffmpeg() -> str | None:
return shutil.which('ffmpeg') 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 = ''): def add_activity_log(event_type: str, frequency: float, details: str = ''):
@@ -450,15 +447,11 @@ def check_tools() -> Response:
"""Check for required tools.""" """Check for required tools."""
rtl_fm = find_rtl_fm() rtl_fm = find_rtl_fm()
ffmpeg = find_ffmpeg() ffmpeg = find_ffmpeg()
sox = find_sox()
can_stream = ffmpeg is not None or sox is not None
return jsonify({ return jsonify({
'rtl_fm': rtl_fm is not None, 'rtl_fm': rtl_fm is not None,
'ffmpeg': ffmpeg is not None, 'ffmpeg': ffmpeg is not None,
'sox': sox is not None, 'available': rtl_fm is not None and ffmpeg is not None
'can_stream': can_stream,
'available': rtl_fm is not None and can_stream
}) })
+7 -11
View File
@@ -179,11 +179,7 @@ check_tools() {
echo "" echo ""
echo "Audio Tools:" echo "Audio Tools:"
check_tool "sox" "Audio player/processor" "audio" check_tool "ffmpeg" "Audio encoder for streaming" "audio"
# ffmpeg is optional alternative to sox
if check_cmd ffmpeg; then
echo -e " ${GREEN}${NC} ffmpeg - Audio encoder (optional)"
fi
echo "" echo ""
echo "WiFi Tools:" echo "WiFi Tools:"
@@ -258,7 +254,7 @@ install_macos_tools() {
echo "" echo ""
echo -e "${YELLOW}The following will be installed:${NC}" echo -e "${YELLOW}The following will be installed:${NC}"
$MISSING_CORE && echo " - Core SDR tools (rtl-sdr, multimon-ng, rtl_433, dump1090)" $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_WIFI && echo " - WiFi tools (aircrack-ng)"
echo "" echo ""
@@ -283,7 +279,7 @@ install_macos_tools() {
if $MISSING_AUDIO; then if $MISSING_AUDIO; then
echo "" echo ""
echo -e "${BLUE}Installing Audio tools...${NC}" echo -e "${BLUE}Installing Audio tools...${NC}"
brew install sox brew install ffmpeg
fi fi
# WiFi tools # WiFi tools
@@ -305,7 +301,7 @@ show_macos_manual() {
echo -e "${BLUE}Manual installation (macOS):${NC}" echo -e "${BLUE}Manual installation (macOS):${NC}"
echo "" echo ""
echo "# Required tools" echo "# Required tools"
echo "brew install librtlsdr multimon-ng rtl_433 sox" echo "brew install librtlsdr multimon-ng rtl_433 ffmpeg"
echo "" echo ""
echo "# ADS-B tracking" echo "# ADS-B tracking"
echo "brew install dump1090-mutability" echo "brew install dump1090-mutability"
@@ -329,7 +325,7 @@ install_debian_tools() {
echo -e "${YELLOW}The following will be installed:${NC}" echo -e "${YELLOW}The following will be installed:${NC}"
$MISSING_CORE && echo " - Core SDR tools (rtl-sdr, multimon-ng, rtl-433, dump1090)" $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_WIFI && echo " - WiFi tools (aircrack-ng)"
$MISSING_BLUETOOTH && echo " - Bluetooth tools (bluez)" $MISSING_BLUETOOTH && echo " - Bluetooth tools (bluez)"
echo "" echo ""
@@ -376,7 +372,7 @@ install_debian_tools() {
if $MISSING_AUDIO; then if $MISSING_AUDIO; then
echo "" echo ""
echo -e "${BLUE}Installing Audio tools...${NC}" echo -e "${BLUE}Installing Audio tools...${NC}"
$SUDO apt install -y sox $SUDO apt install -y ffmpeg
fi fi
# WiFi tools # WiFi tools
@@ -408,7 +404,7 @@ show_debian_manual() {
echo -e "${BLUE}Manual installation (Debian/Ubuntu):${NC}" echo -e "${BLUE}Manual installation (Debian/Ubuntu):${NC}"
echo "" echo ""
echo "# Required tools" 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 ""
echo "# ADS-B tracking" echo "# ADS-B tracking"
echo "sudo apt install dump1090-mutability # or dump1090-fa" echo "sudo apt install dump1090-mutability # or dump1090-fa"
+2 -2
View File
@@ -1780,7 +1780,7 @@ sudo make install</code>
.then(data => { .then(data => {
const missingTools = []; const missingTools = [];
if (!data.rtl_fm) missingTools.push('rtl_fm'); 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) { if (missingTools.length > 0) {
document.getElementById('airbandBtn').disabled = true; document.getElementById('airbandBtn').disabled = true;
@@ -1825,7 +1825,7 @@ sudo make install</code>
<div style="font-weight: bold; margin-bottom: 6px;">⚠️ Airband Listen Unavailable</div> <div style="font-weight: bold; margin-bottom: 6px;">⚠️ Airband Listen Unavailable</div>
<div>Missing required tools: <strong>${toolList}</strong></div> <div>Missing required tools: <strong>${toolList}</strong></div>
<div style="margin-top: 8px; font-size: 10px; opacity: 0.9;"> <div style="margin-top: 8px; font-size: 10px; opacity: 0.9;">
Install with: <code style="background: rgba(0,0,0,0.3); padding: 2px 6px; border-radius: 3px;">sudo apt install rtl-sdr sox</code> (Debian) or <code style="background: rgba(0,0,0,0.3); padding: 2px 6px; border-radius: 3px;">brew install librtlsdr sox</code> (macOS) Install with: <code style="background: rgba(0,0,0,0.3); padding: 2px 6px; border-radius: 3px;">sudo apt install rtl-sdr ffmpeg</code> (Debian) or <code style="background: rgba(0,0,0,0.3); padding: 2px 6px; border-radius: 3px;">brew install librtlsdr ffmpeg</code> (macOS)
</div> </div>
<button onclick="this.parentElement.remove()" style="position: absolute; top: 5px; right: 8px; background: none; border: none; color: white; cursor: pointer; font-size: 14px;">×</button> <button onclick="this.parentElement.remove()" style="position: absolute; top: 5px; right: 8px; background: none; border: none; color: white; cursor: pointer; font-size: 14px;">×</button>
`; `;
+4 -4
View File
@@ -8775,7 +8775,7 @@
// ============================================ // ============================================
let isAudioPlaying = false; let isAudioPlaying = false;
let audioToolsAvailable = { rtl_fm: false, audio_player: false }; let audioToolsAvailable = { rtl_fm: false, ffmpeg: false };
// Web Audio API for visualization // Web Audio API for visualization
let visualizerContext = null; let visualizerContext = null;
@@ -8919,14 +8919,14 @@
.then(r => r.json()) .then(r => r.json())
.then(data => { .then(data => {
audioToolsAvailable.rtl_fm = data.rtl_fm; audioToolsAvailable.rtl_fm = data.rtl_fm;
audioToolsAvailable.can_stream = data.can_stream; audioToolsAvailable.ffmpeg = data.ffmpeg;
const warnings = []; const warnings = [];
if (!data.rtl_fm) { if (!data.rtl_fm) {
warnings.push('rtl_fm not found - install rtl-sdr tools'); warnings.push('rtl_fm not found - install rtl-sdr tools');
} }
if (!data.can_stream) { if (!data.ffmpeg) {
warnings.push('No audio encoder (ffmpeg/sox) - install: brew install ffmpeg (macOS) or apt install ffmpeg (Linux)'); warnings.push('ffmpeg not found - install: brew install ffmpeg (macOS) or apt install ffmpeg (Linux)');
} }
const warningDiv = document.getElementById('audioToolsWarning'); const warningDiv = document.getElementById('audioToolsWarning');