Files
GMW/services
MythEclipseandClaude Opus 4.8 942605661a fix(voice): use FFmpeg for OggOpus encoding in transmitter
- Replace prism Opus.Encoder + OggLogicalBitstream with FFmpeg
- FFmpeg handles upsampling, encoding, and OGG container in one process
- Input: raw PCM 24kHz mono s16le via stdin
- Output: OggOpus via stdout (StreamType.OggOpus)
- FFmpeg arguments optimized for real-time low-delay streaming

Previous approach failed because:
1. Raw Opus packets without OGG wrapper don't work with @discordjs/voice
2. prism's OggLogicalBitstream has CRC bug with node-crc native bindings
3. Manual upsampling was error-prone

Pipeline:
  Browser Mic → base64 PCM → Redis → FFmpeg → OggOpus → Discord

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 22:11:07 +07:00
..