mirror of
https://github.com/koush/scrypted.git
synced 2026-09-26 13:40:39 +01:00
ffmpeg's native opus decoder mis-parses SILK in-band FEC (LBRR) frames and outputs loud bursts of noise. Ring cameras send 60 ms SILK packets with in-band FEC, so every HKSV recording transcoded from them to AAC contained full-scale static. Force the libopus decoder when the recording source audio is Opus; the plugin already depends on libopus for live stream audio transcoding. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -176,6 +176,10 @@ export async function* handleFragmentsRequests(streamId: number, device: Scrypte
|
||||
}
|
||||
}
|
||||
|
||||
// ffmpeg's native opus decoder mis-parses SILK in-band FEC (LBRR) frames,
|
||||
// which Ring cameras send, and outputs loud bursts of noise. libopus decodes them correctly.
|
||||
if (audioCodec?.toLowerCase() === 'opus')
|
||||
inputArguments.push('-c:a', 'libopus');
|
||||
inputArguments.push(...ffmpegInput.inputArguments);
|
||||
|
||||
if (noAudio) {
|
||||
|
||||
Reference in New Issue
Block a user